Skip to content
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

Support node v18 #1045

Merged
merged 1 commit into from Apr 30, 2022
Merged

Support node v18 #1045

merged 1 commit into from Apr 30, 2022

Conversation

devinivy
Copy link
Member

@devinivy devinivy commented Apr 23, 2022

This brings node v18 support to lab v25. Unfortunately this PR is a little ugly— there are two things going on here:

  • The source-map library doesn't function properly on node v18 because it thinks it's in a browser environment due to the existence of fetch() (see Broken in Node.js v18. mozilla/source-map#454). To get around this I've implemented a hack to remove and then replace fetch() as carefully as possible while requiring the source-maps module. Other options I considered were using source-maps beta version, or moving to the @jridgewell/trace-mapping module. I didn't use the beta version both because it's a beta and because it hasn't been touched in years, so there's a chance it will never leave beta. I didn't move to @jridgewell/trace-mapping because I wasn't able to assess whether we'd be able to use it for lab's HTML reporter, which uses a source-maps API that is not faithfully recreated in @jridgewell/trace-mapping.
  • I added node v18 globals to leak detection. These should be able to be removed once Revise leak detection to use fresh node globals #1044 lands in the v25 branch. I believe that we can also get rid of some other globals at that time that to my knowledge are no longer in any version of node such as the DTRACE_* globals.

@devinivy devinivy added feature New functionality or improvement dependency Update module dependency labels Apr 23, 2022
@devinivy devinivy added this to the 25.0.0 milestone Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Update module dependency feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants