CI rehearsal for the 20.0.2 release (do not merge) - #1
Closed
armando-navarro wants to merge 7 commits into
Closed
Conversation
…config (angular#3707) The Firebase CLI's apps.sdkconfig response includes management-API fields (projectNumber, version, locationId) alongside the web app config. The schematic only deleted locationId and inlined the rest into initializeApp(), so the generated app failed to compile with TS2769: 'projectNumber' does not exist in type 'FirebaseOptions'. Keep only the keys FirebaseOptions accepts, so future additions to the CLI response cannot break the generated config again.
…functions (angular#3730) The SSR Cloud Function generated by `ng deploy` crashed at cold start: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/logger/compat' is not defined by "exports" in node_modules/firebase-functions/package.json Both generated templates required `firebase-functions/lib/logger/compat`. firebase-functions declares an exports map, and the internal `lib/` path is not in it. The exported subpath is `firebase-functions/logger/compat`, which maps to the same file. Verified by generating the function source and loading it against a real firebase-functions install: the shipped path throws, the exported path loads and emits structured Cloud Logging JSON, which is what the compat logger is there to do. This affects the deployed function rather than the build, so it fails at runtime in Cloud Functions rather than during `ng deploy`, and it is present in both the 20.x and 21.x lines. (cherry picked from commit a99f09b)
…ular#3718) Every platform-browser-dynamic 20.x/21.x patch release requires the exact @angular/core and @angular/common version matching its own patch. Declaring pbd as a required peer therefore makes npm pull in a pbd version whose required core/common usually differs from the app's installed core/common, failing `ng add @angular/fire` with ERESOLVE on Angular >= 20.1 apps. Nothing in the published package imports platform-browser-dynamic; the only usage in the repo is the Karma test bootstrap (src/test.ts), which is supplied by the root package.json and is unaffected. Removing a peer nothing imports is non-breaking for consumers. Considered marking the peer optional via peerDependenciesMeta instead (the manifest already uses that pattern for firebase-tools and platform-server); it would also avoid the ERESOLVE on npm, but it keeps advertising a dependency relationship that does not exist and relies on npm-specific resolver behavior. Deletion fixes every package manager. Refs angular#3667 (cherry picked from commit 8dfcc2c)
…uirement (angular#3662) (cherry picked from commit 8bf386e)
…3702) The optional firebase-tools peerDependency was capped at ^14.0.0, which excludes the current major (15.x). The ng add version check already accepts anything >= 14.0.0 and the schematic runs fine on 15.x, so the narrow range only produces spurious peer-dependency warnings for users on the current CLI. (cherry picked from commit 45f138d)
ng deploy with SSR to Cloud Functions generated a package.json that could not install and, once installable, could not run. Three defects, each hidden behind the previous one. The manifest pinned both dependencies to 0.0.0, which npm rejects with ETARGET. deploy/actions.ts statically imports ../versions.json, so esbuild inlines the placeholder values into the emitted bundle, while replaceSchematicVersions only rewrote the copied dist versions.json that the v20 runtime never reads. The build now rewrites the placeholders in the emitted bundles as well, using a distinctive per-package token. A blind replace of "0.0.0" was not an option: it appears eleven more times per bundle as sentinels inside the bundled semver library. firebase-admin joins the root package.json so the existing resolution finds a version for it. It is not a phantom dependency, as an earlier analysis of this bug claimed. firebase-functions declares it a required, non-optional peer and loads it eagerly, so omitting it produces a function that installs cleanly and then throws "Cannot find module 'firebase-admin/app-check'" on its first request. The firebase-functions floor moves to ^6.1.1 because 6.0.0 through 6.1.0 declare a peer range that excludes firebase-admin 13, which would ERESOLVE. DEFAULT_NODE_VERSION moves from 14 to 22. Cloud Functions decommissioned nodejs14 in early 2025, so the deploy failed at the runtime check even with correct dependency versions. 22 is the only value that Cloud Functions still accepts, satisfies the engines of both @angular/core and firebase-admin, and is not already past end of life. The generated first-generation template now requires firebase-functions/v1 rather than the package root, where .region() stopped living as of firebase-functions 6. The old form resolved fine and threw only once the deployed function served a request. Considered and rejected: porting v21's runtime read of versions.json, which changes module loading in a patch release and is the class of change that broke 21.0.0-rc.0. Also rejected was defaulting CF3v2 to true, which would fix the first-generation crash by moving every user to 2nd gen, a swap Google refuses in place for an existing function of the same name. Verified against a real Angular 20.3.27 application: published 20.0.1 fails with ERESOLVE and this build installs cleanly. The generated manifest installs and both templates load, including under --legacy-peer-deps. Both new build checks were mutation-tested. Also raises the version to 20.0.2 and corrects a docs example that told users to select the decommissioned nodejs12 runtime.
firebase-tools now refuses to start the emulators on anything below Java 21, so every browser test job on this branch failed with "firebase-tools no longer supports Java version before 21". The branch was cut from the 20.0.1 tag and still pinned java-version 11. main moved to 21 already. This blocks the release rather than just the tests: Publish (NPM) needs the browser jobs, so a release cut from this branch would have run the suite, failed, and published nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs the test suite on a clean machine against the exact 20.0.2 release candidate before it is tagged upstream.
The base branch is pinned at the 20.0.1 tag, so the diff here is precisely what 20.0.2 changes for users.
Not intended to merge. It exists to produce a CI run.