Skip to content

Commit 88eb17a

Browse files
authored
Merge pull request #248 from iambumblehead/update-resolver-improve-module-resolution
update resolver to improve module resolution
2 parents 90e3e57 + 63d8680 commit 88eb17a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# changelog
22

3+
* 2.5.2 _Oct.06.2023_
4+
* [update resolver](https://github.com/iambumblehead/esmock/pull/243) to improve module resolution. See resolvewithplus tags [v2.0.6](https://github.com/iambumblehead/resolvewithplus/releases/tag/v2.0.6) and [v2.0.7.](https://github.com/iambumblehead/resolvewithplus/releases/tag/v2.0.7)
5+
* **resolve "exports" before "main".** The [spec says:](https://nodejs.org/api/packages.html#package-entry-points) _the "exports" field takes precedence over "main" in supported versions of Node.js._ The updated resolver correctly returns "main" before "exports" (older resolver did not).
6+
* **use package.json "type" to return "import" or "require".** The older resolver did not read package.json type and returned incorrect "require" values for some packages. For example, if this [inferno package]( https://www.npmjs.com/package/inferno) where changed to use type "module", the older resolver would return "index.js" rather than "index.esm.js"
37
* 2.5.1 _Sep.13.2023_
48
* [resolve existing ".ts" files,](https://github.com/iambumblehead/esmock/pull/243) rather than ".js" files, when typescript detected, thanks @tpluscode
59
* 2.5.0 _Sep.09.2023_

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"node": ">=14.16.0"
6161
},
6262
"dependencies": {
63-
"resolvewithplus": "^2.0.4"
63+
"resolvewithplus": "^2.0.7"
6464
},
6565
"devDependencies": {
6666
"c8": "^8.0.1",

0 commit comments

Comments
 (0)