Skip to content

build(deps): bump enhanced-resolve from 5.20.1 to 5.21.0#3499

Merged
github-actions[bot] merged 1 commit into
masterfrom
dependabot/npm_and_yarn/enhanced-resolve-5.21.0
Apr 24, 2026
Merged

build(deps): bump enhanced-resolve from 5.20.1 to 5.21.0#3499
github-actions[bot] merged 1 commit into
masterfrom
dependabot/npm_and_yarn/enhanced-resolve-5.21.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 24, 2026

Copy link
Copy Markdown
Contributor

Bumps enhanced-resolve from 5.20.1 to 5.21.0.

Release notes

Sourced from enhanced-resolve's releases.

v5.21.0

Minor Changes

  • Added promise API and support to resolve without context and resolveContext. (by @​alexander-akait in #520)

  • Add extensionAliasForExports option. When true, extensionAlias also applies to paths resolved through the package.json exports field. Off by default to match Node.js; opt in for full TypeScript-resolver parity with packages that ship .ts sources alongside the compiled .js they declare in exports. (by @​alexander-akait in #554)

Patch Changes

  • Properly handle DOS device paths (\\?\… and \\.\…). (by @​alexander-akait in #551)

  • Prevent fallback to parent node_modules when the exports field target file is not found. (by @​xiaoxiaojx in #495)

  • Imports field spec deviation: non-relative targets (e.g. "#a": "#b") no longer re-enter imports resolution, aligning with the Node.js ESM spec where PACKAGE_IMPORTS_RESOLVE does not recursively resolve # specifiers. (by @​xiaoxiaojx in #503)

    Previously { "#a": "#b", "#b": "./the.js" } would chain-resolve #a to ./the.js; now it correctly fails, matching Node.js behavior.

  • Move cachedJoin/cachedDirname/createCachedBasename 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 @​xiaoxiaojx in #507)

  • Fixed when tsconfig: true is used (default config file) and no tsconfig.json exists. (by @​xiaoxiaojx in #502)

  • Apply the extensionAlias option to the imports field to be align with typescript resolution. (by @​alexander-akait in #549)

  • Improved performance of the many plugins. (by @​alexander-akait in #529)

  • Replace the Set<string>-based resolver stack with a singly-linked StackEntry class that exposes a Set-compatible API. (by @​xiaoxiaojx in #526)

    Each doResolve 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.

  • Cache the result of stripJsonComments + JSON.parse in readJson using a WeakMap keyed by the raw file buffer. This avoids redundant comment-stripping and JSON parsing on every resolve call that reads tsconfig.json files (via stripComments: true), improving TsconfigPathsPlugin warm performance by ~20-35% depending on the depth of the extends chain. (by @​xiaoxiaojx in #524)

  • Avoid OOM in CachedInputFileSystem when duration is Infinity. (by @​alexander-akait in #527)

Changelog

Sourced from enhanced-resolve's changelog.

5.21.0

Minor Changes

  • Added promise API and support to resolve without context and resolveContext. (by @​alexander-akait in #520)

  • Add extensionAliasForExports option. When true, extensionAlias also applies to paths resolved through the package.json exports field. Off by default to match Node.js; opt in for full TypeScript-resolver parity with packages that ship .ts sources alongside the compiled .js they declare in exports. (by @​alexander-akait in #554)

Patch Changes

  • Properly handle DOS device paths (\\?\… and \\.\…). (by @​alexander-akait in #551)

  • Prevent fallback to parent node_modules when the exports field target file is not found. (by @​xiaoxiaojx in #495)

  • Imports field spec deviation: non-relative targets (e.g. "#a": "#b") no longer re-enter imports resolution, aligning with the Node.js ESM spec where PACKAGE_IMPORTS_RESOLVE does not recursively resolve # specifiers. (by @​xiaoxiaojx in #503)

    Previously { "#a": "#b", "#b": "./the.js" } would chain-resolve #a to ./the.js; now it correctly fails, matching Node.js behavior.

  • Move cachedJoin/cachedDirname/createCachedBasename 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 @​xiaoxiaojx in #507)

  • Fixed when tsconfig: true is used (default config file) and no tsconfig.json exists. (by @​xiaoxiaojx in #502)

  • Apply the extensionAlias option to the imports field to be align with typescript resolution. (by @​alexander-akait in #549)

  • Improved performance of the many plugins. (by @​alexander-akait in #529)

  • Replace the Set<string>-based resolver stack with a singly-linked StackEntry class that exposes a Set-compatible API. (by @​xiaoxiaojx in #526)

    Each doResolve 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.

  • Cache the result of stripJsonComments + JSON.parse in readJson using a WeakMap keyed by the raw file buffer. This avoids redundant comment-stripping and JSON parsing on every resolve call that reads tsconfig.json files (via stripComments: true), improving TsconfigPathsPlugin warm performance by ~20-35% depending on the depth of the extends chain. (by @​xiaoxiaojx in #524)

  • Avoid OOM in CachedInputFileSystem when duration is Infinity. (by @​alexander-akait in #527)

Commits
  • 35035ca chore(release): new release (#496)
  • fd688b1 perf: cache conditionalMapping + per-plugin description-file lookups (#556)
  • 26f15b0 fix(path): classify DOS device paths as Windows-absolute (#551)
  • a04bc4c docs: add resolvePromise examples for Resolver and ResolverFactory (#555)
  • f9f6d57 Merge pull request #554 from webpack/claude/fix-extension-alias-alignment-xC6sZ
  • c1319d1 chore: regenerate types.d.ts after option rename
  • 5a00e63 refactor: rename applyExtensionAliasToExportsField to extensionAliasForExports
  • f5adeee test(alias): guard that absolute path aliasing is not skipped (#553)
  • faa178f fix(TsconfigPathsPlugin): give references priority over main paths (#552)
  • e82275d test(imports/exports): cover query and fragment in field resolution
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [enhanced-resolve](https://github.com/webpack/enhanced-resolve) from 5.20.1 to 5.21.0.
- [Release notes](https://github.com/webpack/enhanced-resolve/releases)
- [Changelog](https://github.com/webpack/enhanced-resolve/blob/main/CHANGELOG.md)
- [Commits](webpack/enhanced-resolve@v5.20.1...v5.21.0)

---
updated-dependencies:
- dependency-name: enhanced-resolve
  dependency-version: 5.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Apr 24, 2026
@github-actions
github-actions Bot merged commit 61707f0 into master Apr 24, 2026
2 of 3 checks passed
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/enhanced-resolve-5.21.0 branch April 24, 2026 04:03
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the enhanced-resolve dependency from version 5.20.1 to 5.21.0. The update includes a new Promise API, memory growth fixes, and performance optimizations. Codacy analysis indicates that the changes are up to standards, with no new issues, clones, or complexity increases. The version update is correctly reflected in both package.json and package-lock.json.

Test suggestions

  • Verify the dependency version is correctly updated to 5.21.0 in both manifests
  • Regression test to ensure module resolution still functions correctly after the update
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Regression test to ensure module resolution still functions correctly after the update

🗒️ Improve review quality by adding custom instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants