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 5f17245
Browse filesBrowse the repository at this point in the historyBrowse files
build(schematics): keep only architect declared, bundle jsonc-parser (#3808)
* build(schematics): keep only architect declared, bundle jsonc-parser
The published manifest declared five build-time packages that only the
schematics and the ng deploy builder use. The Angular CLI runs schematics
installed under node_modules/@angular/ through its own loader, which
supplies @angular-devkit/* and @schematics/* from the CLI's copy, so
declaring @angular-devkit/schematics, @angular-devkit/core and
@schematics/angular never changed which copy ran. They leave the
manifest, and jsonc-parser, the one package the schematics had to
resolve on their own, is bundled.
@angular-devkit/architect stays: the architect host loads the deploy
builder with a plain require, outside that loader. The deploy bundles
stop importing the schematic packages (the .firebaserc helper moves out
of utils.ts, SchematicsException becomes Error), and the build now fails
if a deploy bundle requires a package the manifest does not declare.
On a build of this commit, ng add and the deploy builder load under Yarn
Plug'n'Play and pnpm hoist=false, and the full ng add command works
through a registry on npm. The same change built before #3803 merged ran
the wider set of yarn and pnpm layouts and the ng update migration. A
production install of a CLI app lists 112 packages instead of 136.
Fixes#3694
Refs #3746
* docs: note the build-time packages @angular/fire no longer installs
Copy file name to clipboardExpand all lines: docs/version-22-upgrade.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,3 +56,9 @@ An older version installs anyway with a warning (`has incorrect peer dependency
56
56
pnpm 8 and later install a missing `firebase` automatically. An older version installs anyway with a warning (`unmet peer firebase@^12.18.0: found 11.x` on pnpm 9 and 10, `Issues with peer dependencies found. Run "pnpm peers check" to list them.` on pnpm 11 and 12), and pnpm prints that warning only once, when it first resolves the tree, never on a later install from the committed lockfile.
57
57
58
58
Set `strict-peer-dependencies=true` in `.npmrc` to make pnpm refuse the mismatch outright.
59
+
60
+
## Fewer build-time packages
61
+
62
+
`@angular/fire` no longer installs `@angular-devkit/schematics`, `@angular-devkit/core` or `@schematics/angular`. The Angular CLI supplies them when it runs `ng add` and `ng update`, so nothing changes for an Angular CLI or Nx workspace.
63
+
64
+
If you run AngularFire's schematics with the standalone `schematics` command on pnpm with `hoist=false`, add those three packages to your own `package.json`.
@@ -432,6 +445,35 @@ async function compileSchematics() {
432
445
constrequired=unlistedSubpaths.map(subpath=>`\n ${subpath}, imported by ${importersBySubpath.get(subpath)?.join(', ')}`);
433
446
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.`);
434
447
}
448
+
/* Every package the deploy builder bundles require at run time must be a dependency or peer of
449
+
* the published package (src/package.json), because nothing else resolves them for the builder. */
thrownewError(`The deploy builder bundles require packages that src/package.json does not declare:${undeclaredInBuilder.join('')}\n@angular-devkit/architect loads the builder outside the Angular CLI's schematic loader, which supplies @angular-devkit/* and @schematics/* to schematics only. Declare the package in src/package.json, or remove the import from the builder's import graph (a module-level import in a shared file is enough to pull it in).`);
0 commit comments