Visitar URL original
Releases · webpack/enhanced-resolve · GitHub
Skip to content

Releases

v5.27.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 15:34
66e2e72

Minor Changes

  • Add a readdirPrefix option to CachedInputFileSystem#purge that, with exact: true, still removes the cached directory listings below what. (by @alexander-akait in #712)

v5.26.2

Choose a tag to compare

@github-actions github-actions released this 12 Nov 11:25
9704b87

Patch Changes

  • Export the UnsafeCache type of the unsafeCache option. (by @alexander-akait in #703)

  • Resolve tsconfig extends the way tsc does, including package exports. (by @abrahamguo in #709)

  • Resolve paths inherited through extends (with no baseUrl) relative to the tsconfig that declares them, substitute ${configDir} in an inherited baseUrl, treat an empty baseUrl as the directory of its tsconfig, like tsc, and stop extending a tsconfig from changing it for later loads that share the file system cache. (by @alexander-akait in #711)

v5.26.1

Choose a tag to compare

@github-actions github-actions released this 03 Nov 09:13
578b2f8

Patch Changes

v5.26.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 12:26
c65e40a

Minor Changes

  • Add experimental support for Node.js package maps through a new packageMap option, which takes the path of the configuration file (or a file: URL) or an already-parsed packages object. When it is set, a bare specifier is resolved through the importing package's dependencies table and the target package's location is handed to the regular pipeline, instead of walking node_modules; relative and absolute requests and node: builtins are unaffected. Because several package entries may share one url, the package a request resolved into is exposed as packageId on the result and can be passed back in as context.packageId to resolve from that package unambiguously. Package maps are stability 1 (experimental) in Node.js, and this option tracks that specification and may change with it. (by @alexander-akait in #667)

  • Explain an exports/imports field whose conditions wrap subpaths, instead of failing with a message that points at the request. A field shaped like { "import": { ".": "./esm/index.js", "./*": "./esm/*.js" }, "require": "./build/bundle.js" } is not supported by Node.js: the subpaths inside a condition are read as condition names, so they match nothing, and every request into the package failed as "./foo" is not exported under the conditions [...] — which reads as though the package forgot to export ./foo. Such a failure now names the offending keys and shows the arrangement that works, with the subpaths at the top level and the conditions nested inside them. Resolution itself is unchanged: the diagnosis runs only on a request that has already failed, so nothing that resolves today starts failing, and a successful resolve does no extra work. Errors raised while processing either field also name the package.json they came from, which previously only appeared in the resolver log. (by @alexander-akait in #676)

  • Generate the published type declarations with TypeScript instead of webpack/tooling, which is no longer a dependency. Every name the package exported before is still exported, and types.d.ts is still the entry point, but the declarations themselves now live in types/ and are emitted by tsc from the JSDoc in lib/. Two shapes follow the sources more closely than the previous generator did: the object form of Plugin no longer declares this: Resolver on apply (it is called as plugin.apply(resolver), so this is the plugin), and the entries of ResolveContext.stack declare name: string | undefined rather than an optional name. Class fields that the old generator dropped, such as the cache backends on CachedInputFileSystem, are now part of the declarations. (by @alexander-akait in #675)

Patch Changes

  • Size the ancestor path and segment arrays that getPathsCached keeps to what they actually hold: a push-built store keeps room for 17 entries while a path has a handful, and the cache holds these for the filesystem's lifetime. (by @alexander-akait in #681)

v5.25.1

Choose a tag to compare

@github-actions github-actions released this 13 Sep 13:56
e913bc5

Patch Changes

v5.25.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 15:01
835c4fe

Minor Changes

  • Accept file: URL strings wherever an option or the context path takes a path. (by @alexander-akait in #668)

v5.24.5

Choose a tag to compare

@github-actions github-actions released this 30 Jul 10:14
aefeac3

Patch Changes

  • Soft-fail when auto tsconfig discovery loads a broken config, and keep relative extends paths relative. (by @xiaoxiaojx in #645)

v5.24.4

Choose a tag to compare

@github-actions github-actions released this 28 Jul 17:22
24c3521

Patch Changes

  • Keep the original request resolvable when extensionAlias lists its own extension. (by @alexander-akait in #641)

  • Fix string restrictions boundary checks: a restriction ending with a separator no longer rejects everything inside it, restrictions are normalized before they are compared, and a Windows path now matches the way path.win32 does, treating / and \ as interchangeable and comparing case-insensitively, while \ stays a filename character in a posix path. The same comparison backs tsconfig path matching. (by @alexander-akait in #643)

  • Treat a UNC path (\\server\share\…) as a Windows path, so it normalizes, joins and walks up with path.win32 semantics instead of being taken for a bare module request. (by @alexander-akait in #644)

v5.24.3

Choose a tag to compare

@github-actions github-actions released this 20 Jul 05:39
b37222e

Patch Changes

  • Resolve tsconfig extends package specifiers from ancestor node_modules directories (workspace hoisting). (by @alexander-akait in #631)

v5.24.2

Choose a tag to compare

@github-actions github-actions released this 06 Jul 11:36
82026bf

Patch Changes

  • Batch cached filesystem callbacks from one synchronous burst into a single tick. (by @alexander-akait in #623)