Skip to content

Commit 4b5d6a5

Browse files
authored
Update enhanced-resolve 5.20.1 → 5.21.0 (minor) (#19998)
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ enhanced-resolve (5.20.1 → 5.21.0) · [Repo](https://github.com/webpack/enhanced-resolve) · [Changelog](https://github.com/webpack/enhanced-resolve/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/webpack/enhanced-resolve/releases/tag/v5.21.0">5.21.0</a></h4> <blockquote><h3 dir="auto">Minor Changes</h3> <ul dir="auto"> <li> <p dir="auto">Added promise API and support to resolve without <code class="notranslate">context</code> and <code class="notranslate">resolveContext</code>. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/520">#520</a>)</p> </li> <li> <p dir="auto">Add <code class="notranslate">extensionAliasForExports</code> option. When <code class="notranslate">true</code>, <code class="notranslate">extensionAlias</code> also applies to paths resolved through the <code class="notranslate">package.json</code> <code class="notranslate">exports</code> field. Off by default to match Node.js; opt in for full TypeScript-resolver parity with packages that ship <code class="notranslate">.ts</code> sources alongside the compiled <code class="notranslate">.js</code> they declare in <code class="notranslate">exports</code>. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/554">#554</a>)</p> </li> </ul> <h3 dir="auto">Patch Changes</h3> <ul dir="auto"> <li> <p dir="auto">Properly handle DOS device paths (<code class="notranslate">\\?\…</code> and <code class="notranslate">\\.\…</code>). (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/551">#551</a>)</p> </li> <li> <p dir="auto">Prevent fallback to parent node_modules when the <code class="notranslate">exports</code> field target file is not found. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/495">#495</a>)</p> </li> <li> <p dir="auto">Imports field spec deviation: non-relative targets (e.g. <code class="notranslate">"#a": "#b"</code>) no longer re-enter imports resolution, aligning with the Node.js ESM spec where <code class="notranslate">PACKAGE_IMPORTS_RESOLVE</code> does not recursively resolve <code class="notranslate">#</code> specifiers. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/503">#503</a>)</p> <p dir="auto">Previously <code class="notranslate">{ "#a": "#b", "#b": "./the.js" }</code> would chain-resolve <code class="notranslate">#a</code> to <code class="notranslate">./the.js</code>; now it correctly fails, matching Node.js behavior.</p> </li> <li> <p dir="auto">Move <code class="notranslate">cachedJoin</code>/<code class="notranslate">cachedDirname</code>/<code class="notranslate">createCachedBasename</code> caches from module-level globals to per-Resolver instances. This prevents unbounded memory growth in long-running processes — when a Resolver is garbage collected, its join/dirname/basename caches are released with it. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/507">#507</a>)</p> </li> <li> <p dir="auto">Fixed when <code class="notranslate">tsconfig: true</code> is used (default config file) and no <code class="notranslate">tsconfig.json</code> exists. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/502">#502</a>)</p> </li> <li> <p dir="auto">Apply the <code class="notranslate">extensionAlias</code> option to the <code class="notranslate">imports</code> field to be align with typescript resolution. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/549">#549</a>)</p> </li> <li> <p dir="auto">Improved performance of the many plugins. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/529">#529</a>)</p> </li> <li> <p dir="auto">Replace the <code class="notranslate">Set&lt;string&gt;</code>-based resolver stack with a singly-linked <code class="notranslate">StackEntry</code> class that exposes a Set-compatible API. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/526">#526</a>)</p> <p dir="auto">Each <code class="notranslate">doResolve</code> call now prepends a single linked-list node instead of cloning the entire Set, making stack push O(1) in time and memory. Recursion detection walks the linked list (O(n)), but because the stack is typically shallow this is much cheaper than cloning a Set per call.</p> </li> <li> <p dir="auto">Cache the result of <code class="notranslate">stripJsonComments</code> + <code class="notranslate">JSON.parse</code> in <code class="notranslate">readJson</code> using a <code class="notranslate">WeakMap</code> keyed by the raw file buffer. This avoids redundant comment-stripping and JSON parsing on every resolve call that reads tsconfig.json files (via <code class="notranslate">stripComments: true</code>), improving TsconfigPathsPlugin warm performance by ~20-35% depending on the depth of the <code class="notranslate">extends</code> chain. (by <a href="https://bounce.depfu.com/github.com/xiaoxiaojx">@xiaoxiaojx</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/524">#524</a>)</p> </li> <li> <p dir="auto">Avoid OOM in CachedInputFileSystem when duration is Infinity. (by <a href="https://bounce.depfu.com/github.com/alexander-akait">@alexander-akait</a> in <a href="https://bounce.depfu.com/github.com/webpack/enhanced-resolve/pull/527">#527</a>)</p> </li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/enhanced-resolve/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/webpack/enhanced-resolve/compare/ebc67d38969e8abe6789a51968380fa721fea778...35035ca158f1c8ada86fcf1653f319cbce669200">See the full diff on Github</a>. The new version differs by more commits than we can show here.</p> </details> --- ![Depfu Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg) [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@​depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@​depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
1 parent 52f94c7 commit 4b5d6a5

5 files changed

Lines changed: 38 additions & 17 deletions

File tree

packages/@tailwindcss-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@parcel/watcher": "^2.5.1",
3333
"@tailwindcss/node": "workspace:*",
3434
"@tailwindcss/oxide": "workspace:*",
35-
"enhanced-resolve": "^5.20.1",
35+
"enhanced-resolve": "^5.21.0",
3636
"mri": "^1.2.0",
3737
"picocolors": "^1.1.1",
3838
"tailwindcss": "workspace:*"

packages/@tailwindcss-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"dependencies": {
4040
"@jridgewell/remapping": "^2.3.5",
41-
"enhanced-resolve": "^5.20.1",
41+
"enhanced-resolve": "^5.21.0",
4242
"jiti": "^2.6.1",
4343
"lightningcss": "catalog:",
4444
"magic-string": "^0.30.21",

packages/@tailwindcss-standalone/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@tailwindcss/forms": "^0.5.11",
3131
"@tailwindcss/typography": "^0.5.19",
3232
"detect-libc": "1.0.3",
33-
"enhanced-resolve": "^5.20.1",
33+
"enhanced-resolve": "^5.21.0",
3434
"tailwindcss": "workspace:*"
3535
},
3636
"__notes": "These binary packages must be included so Bun can build the CLI for all supported platforms. We also rely on Lightning CSS and Parcel being patched so Bun can statically analyze the executables.",

packages/@tailwindcss-upgrade/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@tailwindcss/node": "workspace:*",
3131
"@tailwindcss/oxide": "workspace:*",
3232
"dedent": "1.7.2",
33-
"enhanced-resolve": "^5.20.1",
33+
"enhanced-resolve": "^5.21.0",
3434
"globby": "^16.2.0",
3535
"jiti": "^2.6.1",
3636
"mri": "^1.2.0",

pnpm-lock.yaml

Lines changed: 34 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)