erisu opened a new pull request #782: fix (node): require failure with shebang 
interpreter
URL: https://github.com/apache/cordova-ios/pull/782
 
 
   ### Motivation and Context
   
   Fix failing tests.
   Bin files that contains the shebang interpreter fails when being required.
   
   Example Error:
   
   > 
/Users/travis/build/apache/cordova-ios/bin/templates/scripts/cordova/lib/list-devices:1
   (function (exports, require, module, __filename, __dirname) { #!/usr/bin/env 
node
                                                                 ^
   > SyntaxError: Invalid or unexpected token
   
   https://travis-ci.org/apache/cordova-ios/jobs/649198385#L1474
   
   ### Description
   
   * Keep the bin files with the shebang interpreter but pull out all the code 
into a separate JS file. The bin files require the newly created JS files and 
execute them as usual.
   
   * Update everywhere else that use to require the bin but now require the 
newly created JS files which do not contain the shebang interpreter.
   
   **Additional Notes:**
   
   The version bin file, which contains the platform version, is updated by 
coho during release. Coho should now update the version in `Api.js` instead. It 
would be better if the version is pulled from `package.json` but the 
platform-centered workflow does not have this file. Additional investigation to 
improve this should be done but preferably outside of this PR.
   
   ### Testing
   
   - `npm t`
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to