Releases: iambumblehead/esmock
Releases · iambumblehead/esmock
esmock.d.ts correction
corrected esmock.d.ts errors credit @jakebailey
resolve critical error, restore exports main
resolve critical error, restore exports main, credit @tripodsan
define package.json exports to improve TS support
- define package.json exports to improve TS support per advice from @scott-lc, see iambumblehead/form-urlencoded#45
- added README note about esmock's inability to resolve some export expressions
mock modules that use exports.import path string
- supports mocking modules that use exports.import path string by using newest resolvewithplus,
- added live coverage badge to show, for example, 98% coverage,
- add linting for README examples,
- improve unit-test for mocking non-extensible objects and adding a comment,
- improve node-version definition of
isLT1612
per review @aladdin-add, - use smaller and specific condition for calling nextResolve at loader
resolve runtime error
- resolve error, do not define default on extensible objects, credit @tripodsan
resolve node v14 runtime error
- add node v14 test pipeline, credit @aladdin-add
- resolve node v14 loader runtime error
- moved c8 from dependencies to devDependencies
add jest-light-runner support
- adds a jest-light-runner unit-test and README script entry. cc @nicolo-ribaudo
add tsm support
This release adds support for tsm and many stability improvements,
- Adds a tsm unit test and example to the README
- Adds typescript and node-native runner tests for windows CI. Previously, these were disabled because there was no condition to detect node v18+ in windows CI. The detect-node package is added to enable tests requiring node v18+,
- Renames esmockLoader.mjs to esmockLoader.js. Esbuild minification would not preserve the .mjs extension and the extension isn't needed because it was used to trigger "esm" mode when esmock previously attempted to support cjs unit-tests,
- Uses runner-specific test folders. These allow each test folder to define their own tsconfig.json, specific version of a dependency and other things,
- Updates a test that depended on an old package version --removes the old package and use a local module instead. The old package and new local module reproduce a babel-generated type of CJS file.
esmock is 50% smaller! 16.6kB (from 31.8kB)
esmock is 50% smaller and minified sources are verified by the CI pipeline. Unit-tests are moved to a sub-directory to prepare for testing situations using specific runner and loader combinations, for example ava
+ ts-node/esm
get the latest version with npm install -D esmock@latest
The size of esmock was reduced from 31.8kB to 16.6kB with the following changes,
improved support for symlinked paths
- improved support for symlinked paths, credit @Swivelgames