GitHub user OminousWater reopened a pull request:

    https://github.com/apache/cordova-lib/pull/597

    CB-13451 (all platforms) "pkg not defined" exception when running plugman 
with createpackagejson command-line

    A global js-lint pass on the cordova-lib codebase on the 30/8/2017 caused 
references to the global 'package' variable in init-default.js to be renamed to 
'pkg’, presumably because the cordova-lib source doesn’t declare a global 
variable called ‘package’ but _does_ declare a global variable called 
‘pkg’ (in src/cordova/info.js). However in this case, the ‘package’ 
variable refers to the one declared in the plugman source, specifically 
main.js, so it should have stayed as 'package’. To test the fix, run:
    
        plugman createpackagejson .
    
    Without the fix, this will trigger the following exception: 'pkg is not 
defined'. Having patched in the fix, running the command line should work as 
expected, prompting the user with questions and then spitting out a 
package.json file.
    
    <!--
    Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist
    is intended as a quick reference, for complete details please see our 
Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    All
    
    ### What does this PR do?
    Fixes an bug where an exception would be thrown when running 'plugman 
createpackagejson .'
    
    ### What testing has been done on this change?
    The command in question ('plugman createpackagejson .') has been tested 
with and without the fix to confirm that the fix fixes the problem.
    
    ### Checklist
    - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
    - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform 
affected.
    - [ ] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/OminousWater/cordova-lib master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-lib/pull/597.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #597
    
----
commit e321bc319b94c86b77d993981491f99bac6f27f9
Author: Roland <rol...@fraction7.com>
Date:   2017-10-16T20:57:59Z

    Fix for 'pkg is not defined' exception
    A global js-lint pass on the cordova-lib codebase on the 30/8/2017 caused 
references to the global 'package' variable in init-default.js to be renamed to 
'pkg’, presumably because the cordova-lib source doesn’t declare a global 
variable called ‘package’ but _does_ declare a global variable called 
‘pkg’ (in cordova/info.js). However in this case, the ‘package’ 
variable refers to the one declared in the plugman source, specifically 
main.js, so it should have stayed as 'package’. To test the fix, run:
    
        plugman createpackagejson .
    
    Without the fix, this will trigger the following exception: 'pkg is not 
defined'. Having patched in the fix, running the command line should work as 
expected, prompting the user with questions and then spitting out a 
package.json file.

commit 91614eb341735fde77661f3643c9a328fd09ac0c
Author: Roland <rol...@fraction7.com>
Date:   2017-10-18T19:45:23Z

    Revert "Fix for 'pkg is not defined' exception"
    
    This reverts commit e321bc319b94c86b77d993981491f99bac6f27f9.

commit 62c5d2631c56ed40fda0576bc726b61bc0eb7806
Author: Roland <rol...@fraction7.com>
Date:   2017-10-19T20:45:23Z

    Second attempt at fix for CB-13451

commit f3dec27bfe9e4e6dce2f8d5ef6d3997c1ca2b925
Author: Roland <rol...@fraction7.com>
Date:   2017-10-20T07:00:32Z

    Make eslint ignore init-defaults.js file(s) as it will fail otherwise on 
'package' keword that PromZard injects

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to