Repository navigation
Releases
v5.27.0
Minor Changes
- Add a
readdirPrefixoption toCachedInputFileSystem#purgethat, withexact: true, still removes the cached directory listings belowwhat. (by @alexander-akait in #712)
v5.26.2
Patch Changes
-
Export the
UnsafeCachetype of theunsafeCacheoption. (by @alexander-akait in #703) -
Resolve tsconfig
extendsthe way tsc does, including packageexports. (by @abrahamguo in #709) -
Resolve
pathsinherited throughextends(with nobaseUrl) relative to the tsconfig that declares them, substitute${configDir}in an inheritedbaseUrl, treat an emptybaseUrlas 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
Patch Changes
- Accept
fstyped by@types/node26 in the file system types. (by @alexander-akait in #700)
v5.26.0
Minor Changes
-
Add experimental support for Node.js package maps through a new
packageMapoption, which takes the path of the configuration file (or afile:URL) or an already-parsedpackagesobject. When it is set, a bare specifier is resolved through the importing package'sdependenciestable and the target package's location is handed to the regular pipeline, instead of walkingnode_modules; relative and absolute requests andnode:builtins are unaffected. Because several package entries may share oneurl, the package a request resolved into is exposed aspackageIdon the result and can be passed back in ascontext.packageIdto 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/importsfield 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 thepackage.jsonthey 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, andtypes.d.tsis still the entry point, but the declarations themselves now live intypes/and are emitted bytscfrom the JSDoc inlib/. Two shapes follow the sources more closely than the previous generator did: the object form ofPluginno longer declaresthis: Resolveronapply(it is called asplugin.apply(resolver), sothisis the plugin), and the entries ofResolveContext.stackdeclarename: string | undefinedrather than an optionalname. Class fields that the old generator dropped, such as the cache backends onCachedInputFileSystem, are now part of the declarations. (by @alexander-akait in #675)
Patch Changes
- Size the ancestor path and segment arrays that
getPathsCachedkeeps to what they actually hold: apush-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
Patch Changes
- Read a
file:URL the way Node does when parsing a request. (by @alexander-akait in #670)
v5.25.0
Minor Changes
- Accept
file:URL strings wherever an option or the context path takes a path. (by @alexander-akait in #668)
v5.24.5
Patch Changes
- Soft-fail when auto tsconfig discovery loads a broken config, and keep relative
extendspaths relative. (by @xiaoxiaojx in #645)
v5.24.4
Patch Changes
-
Keep the original request resolvable when
extensionAliaslists its own extension. (by @alexander-akait in #641) -
Fix string
restrictionsboundary 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 waypath.win32does, treating/and\as interchangeable and comparing case-insensitively, while\stays a filename character in a posix path. The same comparison backstsconfigpath matching. (by @alexander-akait in #643) -
Treat a UNC path (
\\server\share\…) as a Windows path, so it normalizes, joins and walks up withpath.win32semantics instead of being taken for a bare module request. (by @alexander-akait in #644)
v5.24.3
Patch Changes
- Resolve tsconfig
extendspackage specifiers from ancestor node_modules directories (workspace hoisting). (by @alexander-akait in #631)
v5.24.2
Patch Changes
- Batch cached filesystem callbacks from one synchronous burst into a single tick. (by @alexander-akait in #623)