You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/02/12 03:40:04 UTC
[GitHub] [cordova-ios] erisu opened a new pull request #782: fix (node):
require failure with shebang interpreter
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-ios] erisu commented on issue #782: fix (node): require
failure with shebang interpreter
Posted by GitBox <gi...@apache.org>.
erisu commented on issue #782: fix (node): require failure with shebang interpreter
URL: https://github.com/apache/cordova-ios/pull/782#issuecomment-585504255
Additional Feedback:
After more investigation the issue seems to be a combination of using the new node with the 2 year old `rewire` npm package.
I was able to recreate the issue here: https://github.com/erisu/shebang-test
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-ios] codecov-io commented on issue #782: fix (node):
require failure with shebang interpreter
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #782: fix (node): require failure with shebang interpreter
URL: https://github.com/apache/cordova-ios/pull/782#issuecomment-585014164
# [Codecov](https://codecov.io/gh/apache/cordova-ios/pull/782?src=pr&el=h1) Report
> Merging [#782](https://codecov.io/gh/apache/cordova-ios/pull/782?src=pr&el=desc) into [master](https://codecov.io/gh/apache/cordova-ios/commit/59d0dd712ff362e5165ce9a50f078425f83e637d?src=pr&el=desc) will **increase** coverage by `0.28%`.
> The diff coverage is `78.57%`.
[](https://codecov.io/gh/apache/cordova-ios/pull/782?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #782 +/- ##
==========================================
+ Coverage 74.26% 74.55% +0.28%
==========================================
Files 11 13 +2
Lines 1815 1835 +20
==========================================
+ Hits 1348 1368 +20
Misses 467 467
```
| [Impacted Files](https://codecov.io/gh/apache/cordova-ios/pull/782?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [bin/templates/scripts/cordova/lib/versions.js](https://codecov.io/gh/apache/cordova-ios/pull/782/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9zY3JpcHRzL2NvcmRvdmEvbGliL3ZlcnNpb25zLmpz) | `90.24% <ø> (ø)` | :arrow_up: |
| [bin/templates/scripts/cordova/lib/run.js](https://codecov.io/gh/apache/cordova-ios/pull/782/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9zY3JpcHRzL2NvcmRvdmEvbGliL3J1bi5qcw==) | `21.42% <0%> (ø)` | :arrow_up: |
| [bin/templates/scripts/cordova/Api.js](https://codecov.io/gh/apache/cordova-ios/pull/782/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9zY3JpcHRzL2NvcmRvdmEvQXBpLmpz) | `71.42% <100%> (+0.3%)` | :arrow_up: |
| [bin/templates/scripts/cordova/lib/listDevices.js](https://codecov.io/gh/apache/cordova-ios/pull/782/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9zY3JpcHRzL2NvcmRvdmEvbGliL2xpc3REZXZpY2VzLmpz) | `100% <100%> (ø)` | |
| [...emplates/scripts/cordova/lib/listEmulatorImages.js](https://codecov.io/gh/apache/cordova-ios/pull/782/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9zY3JpcHRzL2NvcmRvdmEvbGliL2xpc3RFbXVsYXRvckltYWdlcy5qcw==) | `100% <100%> (ø)` | |
| [bin/templates/scripts/cordova/lib/build.js](https://codecov.io/gh/apache/cordova-ios/pull/782/diff?src=pr&el=tree#diff-YmluL3RlbXBsYXRlcy9zY3JpcHRzL2NvcmRvdmEvbGliL2J1aWxkLmpz) | `50.76% <33.33%> (ø)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-ios/pull/782?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/cordova-ios/pull/782?src=pr&el=footer). Last update [59d0dd7...4aaa143](https://codecov.io/gh/apache/cordova-ios/pull/782?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-ios] erisu merged pull request #782: fix (node): require
failure with shebang interpreter
Posted by GitBox <gi...@apache.org>.
erisu merged pull request #782: fix (node): require failure with shebang interpreter
URL: https://github.com/apache/cordova-ios/pull/782
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-ios] erisu commented on issue #782: fix (node): require
failure with shebang interpreter
Posted by GitBox <gi...@apache.org>.
erisu commented on issue #782: fix (node): require failure with shebang interpreter
URL: https://github.com/apache/cordova-ios/pull/782#issuecomment-585510960
I went ahead and merged this PR to unblock other PRs from the failing tests. Because of `rewire` has not been maintained or updated in the past 2 years, it would be best to look in alternatives or how to test without rewire.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-ios] NiklasMerz commented on issue #782: fix (node):
require failure with shebang interpreter
Posted by GitBox <gi...@apache.org>.
NiklasMerz commented on issue #782: fix (node): require failure with shebang interpreter
URL: https://github.com/apache/cordova-ios/pull/782#issuecomment-585584499
> I went ahead and merged this PR to unblock other PRs from the failing tests. Because of `rewire` has not been maintained or updated in the past 2 years, it would be best to look in alternatives or how to test without rewire.
Should we create an issue for that?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org