Repository navigation
From this release, esmock now supports minimum node version 22.15. Changes here are mostly credit to @tommy-mitchell.
Older versions of esmock supported numerous different scenarious as required by legacy versions of nodejs, which added complexity and noise to source code, to bundling operations and to unit-tests. As a result of dropping support for older node versions, esmock's install size is smaller than ever, ~20.5Kb; its CI test-coverage is higher than ever, 100%, its test pipeline finishes sooner and its source code is more readable.
- streamline and update test-suite. remove logic to run "--loader" and non-"--loader" specific tests. remove logic to run or skip tests for specific (older) versions of node. remove logic to run or skip tests depending upon windows or linux environment. remove un-maintained testing-tools from the test suite: ts-node, tsm and uvu. greatly simplifies the tests
- drop support for pre-v20 node --loader behaviour. removal of some code that was un-usual and un-intuitive. removes mention of "--loader" from README.md for slightly smaller README.md,
- drop all support for node v20 and earlier, credit @tommy-mitchell
- publish a single minified file. previous versions published separate loader and loader.deprecated files.
npm publish --dry-runshows smaller package-size @v3.0.0 8.4 kB (was @v2.8.0 10.3 kB), - support simultaneous local and global import mocks. Previously, local and global import mocks sharing the same name would resolve the global variant. credit @tommy-mitchell, thank you