diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e250fce..37fda14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [18.x, 20.x, 22.x] + node-version: [18.x, 20.x, 22.x, 23.x] os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4787952..0e4a65d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # changelog + * 2.6.9 _Oct.18.2024_ + * [added node v23 to test matrix](https://github.com/iambumblehead/esmock/pull/316) + * [resolve v23-related error](https://github.com/iambumblehead/esmock/pull/316) when `module.exports` is exported * 2.6.8 _Oct.17.2024_ * [added pnpm unit-test,](https://github.com/iambumblehead/esmock/pull/315) thanks @darcyrush * [resolve issue for pnpm](https://github.com/iambumblehead/esmock/pull/315) by escaping '+' char in regexp diff --git a/package.json b/package.json index 6df7c62..b987579 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ }, "devDependencies": { "c8": "^10.1.2", - "eslint": "^9.5.0", + "eslint": "^9.13.0", "eslint-plugin-markdown": "^5.0.0", "typescript-eslint": "^8.0.0-alpha.30", "@typescript-eslint/parser": "^8.0.0-alpha.30", diff --git a/src/esmockModule.js b/src/esmockModule.js index 1eaf940..57a3dd8 100644 --- a/src/esmockModule.js +++ b/src/esmockModule.js @@ -24,7 +24,7 @@ const isJSONExtnRe = /\.json$/i // https://github.com/iambumblehead/esmock/issues/284 // older applications may export names that are reserved in newer runtimes -const reservedKeywordsFoundInWild = /(^|,)static($|,)/g +const reservedKeywordsFoundInWild = /(^|,)(static|module\.exports)($|,)/g // assigning the object to its own prototypal inheritor can error, eg // 'Cannot assign to read only property \'F_OK\' of object \'#\''