Releases: iambumblehead/esmock
support node v23
Add node 23 ro the test matrix and update to support node 23,
- added node v23 to test matrix
- resolve v23-related error when
module.exports
is exported - added --glob option for rimraf usage to remove un-used sources; brings install size back down from 35.8Kb to 25.6Kb
add pnpm test
fixes an issue that prevented esmock from being used with pnpm,
- added pnpm unit-test, thanks @darcyrush
- resolve issue for pnpm by escaping '+' char in regexp
- add log utility function for debugging loader
- dropped ava and jest from test sequence, node v22 --loader issues
add swc tests
migrate eslint 9 add tsx tests
migrate eslint 9 add tsx tests,
- add tsx tests and remove tsx caution from README thanks @galexite
- pin node 22.1 at test CI and ignore regressions in new node 22
- migrate to eslint 9
add node v22 to test matrix
add node 22 to ci test pipeline and use with { type: 'json' }
import syntax for node >= 20,
- add node 22 to ci test pipeline thanks @aladdin-add
- use json import syntax
with { type: 'json' }
for node 22 - skip node 22 tests on windows-latest ci, where node 22 is in a broken state, see nodejs/node#52682
improve esm wildcard expansion
Essentially, this release enables esmock to resolve the following esm export, see #293
{
"exports": {
"./*": {
"require": "./*.js",
"import": "./*.js"
}
}
}
the following is added to the README,
Note: Typescript loaders ts-node
👍 and tsm
👍 are compatible with other loaders, including esmock. swc
👎 and tsx
👎 are demonstrated as incompatible with other loaders, including esmock.
Full list of changes,
- update README with notice about incompatible typescript loaders
- increment resolvewithplus to support more export patterns, see resolvewithplus v2.1.5
- update publish spec job actions, to use checkout@v4 and setup-node@v4
- remove node 16 from test job matrix, eol 2023, Sep 11 #254 esmock can be used with node 16 today, but removing node 16 from your own test pipelines is recommended
improved pattern resolution
resolve nested exports defined on named-properties with wildcards, eg exports: { './*': { default: './src/*/index.js' } }
resolves this issue at esmock thanks @dschnare
remove reserved keywords from export names list
remove reserved keywords from export names lists, allows express to be mocked, thanks @lcapel
resolve mocking builtins imported globally with `await import`
mostly this release resolves an issue mocking builtins imported globally with await import
- update ci job to use checkout v4
- update README to work w/ eslint-plugin-markdown
- update eslint disallow trailing white-space
- update esmock to correctly mock builtins imported with
await import
thanks @btakita - update eslint package to resolve failing lint command