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

Port to ESM #284

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Port to ESM #284

wants to merge 2 commits into from

Conversation

kherock
Copy link
Contributor

@kherock kherock commented Mar 28, 2022

This ports all library code and tests to ESM. I left test fixtures as CJS and moved all CJS-hook related things into the require/ subfolder. I tried to keep everything functioning exactly as it did before aside from some other things I cleaned up:

  • replaced the NODE_DEV_PRELOAD env variable for the dedupe hook with a --require argument appended to execArgv
  • split wrap.js into multiple CJS require hooks patch.js, patch-fork.js, and patch-vm.js
    • This fixes the --vm CLI argument. Previously, wrap.js would only read from the config file and the CLI argument had no effect
  • added an exports map to package.json
  • specified files in package.json to optimize the overall package size
  • bumped the minimum Node version up to 14.8 (Node 12 is EOL)

Because of the new ≥14.8 requirement and the large amount of code churn, this should probably released as a new major version.

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