Releases: iambumblehead/esmock
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
typings <T = any> MockFunction
mock Array-type default export
- mock Array-type default export, thanks @altearius
- support json import mocking, only working at node v21, see
catch yarn PnP exception @koshic
resolve critical error
mainly this issue resolves a critical error reported here #260
- add node 21 to test pipeline
- use latest node 18 at test pipeline
- update resolver again resolves this issue.
increment resolver
update resolver to latest version, resolves a resolution error that seems to have been introduced by a previous update from the past week.