-
-
Notifications
You must be signed in to change notification settings - Fork 33
feat!: Remove dependency on resolve module
#104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Will this break Node Single Executable Apps? |
I was going to (perhaps naively) suggest that RITM in a SEA app should no-op for non-core modules. https://nodejs.org/api/single-executable-applications.html#requireid-in-the-injected-main-script-is-not-file-based suggests that a file-based I suppose that could be considered separate work and not necessarily a breaking change? Supporting SEA apps at all was accidental. |
|
Yeah it looks like SEA apps were working out of luck before and we broke them with my change for 7.5.0. So we should merge #106 and then get some tests in place before merging this PR! |
|
Not sure if I understand the implications fully here but the SEA application I'm working on uses Sentry Node SDK to instrument itself (not just errors) which then relies on this package. If that stops working, that would be quite disappointing as I think we should be able to instrument SEA apps? |
We intend to add SEA tests before merging this PR to ensure we retain compatibility. |
|
any luck we'll see this released soon? |
|
It is still planned but it's been bumped down my priorities by other things because nothing is broken. PRs to add the extra required test coverage are welcome though! |
|
I looked at adding CI tests for Node SEA applications but couldn't get it working on macOS because the executable needs signing before it'll work. Because this PR will result in a new major version, I still think this is safe to release without a specific SEA CI test. |
resolve dependency which increases min Node version to v8.10.0resolve module
AbhiPrasad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine without the test, but
I looked at adding CI tests for Node SEA applications but couldn't get it working on macOS because the executable needs signing before it'll work.
There is github.com/byk/fossilize (https://byk.im/posts/fossilize/), but we'll still need to join the apple developer program to do this, and managing the secrets/paying the fee is quite a lot for this :(
watson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The engines.node field in package.json should be updated accordingly
I used this to build the test app! A Windows or Linux test might be fine but then a large proportion of us won't be able to run it. |
|
There's a way to use a self-signed cert and allow-list it for CI and dev mode. Happy to explore and help there if there's interest |
package.json
Outdated
| "homepage": "https://github.com/nodejs/require-in-the-middle#readme", | ||
| "engines": { | ||
| "node": ">=8.6.0" | ||
| "node": ">=8.10.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny nit: I can't remember if Node.js 9 is technically supported by this lib (it's no longer tested), but to be consistent with the new error thrown in this PR, shouldn't it be like this?
| "node": ">=8.10.0" | |
| "node": ">=9.3.0 || >=8.10.0 <9.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep good call!
Co-authored-by: Thomas Watson <w@tson.dk>
This PR removes
resolveas a dependency and instead usesrequire.resolve. This changes our minimum supported Node version from v8.0.0 to v8.10.0 which is a breaking change.Before this change our dependencies looked like this:
