node-dev
node-dev copied to clipboard
Port to ESM
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 thededupe
hook with a--require
argument appended toexecArgv
- split
wrap.js
into multiple CJS require hookspatch.js
,patch-fork.js
, andpatch-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
- This fixes the
- 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.