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

Isaacs/node 20 loaders #884

Merged
merged 23 commits into from Sep 10, 2023
Merged

Isaacs/node 20 loaders #884

merged 23 commits into from Sep 10, 2023

Conversation

isaacs
Copy link
Member

@isaacs isaacs commented Sep 10, 2023

No description provided.

If plugins export an `importLoader`, and Module.register exists, then
use that instead of their `loader` export.

process.exitCode became {configurable:false} in
nodejs/node#44711

Can bring back exitCode interception when/if it becomes configurable
again, re nodejs/node#49579

For now, just set it, and then verify it's the expected value, and put
it back to 0 if so.
Some error stack frames string values changed subtly.

Test some things in both CJS and MJS flavors, because this module is
loaded as part of the load process, and then is already cached when
coverage is applied, so we need to run the tests against both to get
full coverage to register.
Might make this the default.
20.6.0 had a bug that broke module loading order of CJS in some cases
@isaacs isaacs force-pushed the isaacs/node-20-loaders branch 2 times, most recently from 2b0fb16 to 4b23ce8 Compare September 10, 2023 16:39
v12 hasn't been supported for a long time, and this check
is a false-positive on node v20
@isaacs isaacs force-pushed the isaacs/node-20-loaders branch 2 times, most recently from a0ba25f to fd9908e Compare September 10, 2023 17:00
They have the code in the stack string in a weird way

This also normalizes the \n ending for all stack strings, and fixes an
issue where thrown Error stacks were being re-parsed incorrectly instead
of respecting the stack that was already parsed in a previous step.
@isaacs isaacs merged commit c5972e7 into main Sep 10, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant