You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d88d4d6
Browse filesBrowse the repository at this point in the historyBrowse files
fix(schematics): require only exported devkit paths from the shipped schematics
@angular-devkit/schematics 22.3 adds an exports map that allows ./tasks
but not ./tasks/index.js. The shipped setup, deploy builder and v21
migration bundles required tasks/index.js, so `ng update` crashed after
installing whenever it ran a 22.3 CLI, and the v21 migration never ran.
The source keeps the index.js spelling, which the ESM spec run needs
while the repo's devkit 21 has no exports map. An esbuild alias rewrites
it in the bundles, and the build now fails when a bundle requires a
package subpath that is not in exportedSubpaths, naming the importers.
typescript stays external so the v21 migration uses the compiler from
the user's workspace at ng update time, rather than adding about 3.5 MB
to the package.
constrequired=unlistedSubpaths.map(subpath=>`\n ${subpath}, imported by ${importersBySubpath.get(subpath)?.join(', ')}`);
429
+
thrownewError(`The schematics require package paths that exportedSubpaths does not list:${required.join('')}\nAdd an alias in compileSchematics to a path the package exports, or, if the exports map in the newest published version lists the path (npm view <package>@next exports), add it to exportedSubpaths.`);
0 commit comments