Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This brings node v18 support to lab v25. Unfortunately this PR is a little ugly— there are two things going on here:
fetch()
(see Broken in Node.js v18. mozilla/source-map#454). To get around this I've implemented a hack to remove and then replacefetch()
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 theDTRACE_*
globals.