René's URL Explorer Experiment


Title: fix(schematics): align the workspace firebase dependency with the supported range by armando-navarro · Pull Request #3722 · angular/angularfire · GitHub

Open Graph Title: fix(schematics): align the workspace firebase dependency with the supported range by armando-navarro · Pull Request #3722 · angular/angularfire

X Title: fix(schematics): align the workspace firebase dependency with the supported range by armando-navarro · Pull Request #3722 · angular/angularfire

Description: Checklist Issue number for this PR: #3684 (also #3681 and #3682; all three share the root cause this PR addresses. Referenced with Refs rather than Fixes: no published build carries the change until the next release is cut or a canary is published, so the issues should close when reporters can actually install the fix.) Docs included?: No. The migration and ng add print a one-line explanation whenever they change anything, and the v21 upgrade documentation is tracked with the release notes. Test units included?: Yes (15 new specs: the alignment helper's range handling, warning behavior, both-dependency-sections handling, idempotency, a constant-sync check against src/package.json, and the migration's install-task behavior). In a clean directory, yarn install, yarn test run successfully? Yes; npm run build and the node test suites run green locally (55 specs), and the migration was verified end-to-end against a packed build (below). Description Upgrading an app to @angular/fire 21 while its own package.json still requests firebase@11 produces an install with two copies of the firebase SDK: npm keeps 11 at the root and nests 12 under @angular/fire. No install-time error fires, and the two copies reject each other's objects at runtime. #3684, #3681, and #3682 are all this one failure (analysis and reproductions in those threads). This PR makes the schematics keep the workspace's firebase entry aligned with the range the library requires: a shared alignFirebaseVersion helper and firebaseVersionRange constant in src/schematics/common.ts; ng add writes the entry when missing and realigns an incompatible one before its install task runs; a new migration-v21 runs the same alignment during ng update @angular/fire, scheduling an install only when it changed something (the CLI re-runs the migration on rc-to-stable updates, so the no-op path matters). Behavior details: A range is rewritten only when it is not entirely inside ^12.4.0 (semver.subset); intersects would keep ranges like ^12.0.0 or >=11 that a stale lockfile still resolves below the required floor. Non-semver specifiers (dist-tags, workspace:, file:, git URLs) are never rewritten; the user gets a warning explaining the risk instead. firebaseVersionRange intentionally duplicates dependencies.firebase from src/package.json instead of being injected at build time: the build's version-injection machinery (versions.json) is under discussion in #3715, so the constant is the minimal bridge that machinery can later supersede. A spec reads src/package.json and fails the suite if the two values ever drift. Verified end-to-end against a packed build. A fixture app with firebase@11.8.0 installed next to this package (the exact broken tree from the linked issues), then ng update @angular/fire --migrate-only --from=20.0.1: ❯ Align the workspace's firebase dependency with the range @angular/fire 21 requires, so the install cannot contain two copies of the firebase SDK. Updated the firebase version in your package.json from ^11.8.0 to ^12.4.0, the range @angular/fire requires; a workspace range outside it can leave the install with a second copy of the firebase SDK, which fails at runtime. UPDATE package.json (400 bytes) ✔ Packages installed successfully. npm ls firebase afterwards shows a single firebase@12.16.0, and a second run reports "Migration completed (No changes made)". Note for reviewers src/schematics/update/v21/index.ts uses explicit .js-suffixed relative imports where v7/index.ts does not. This is intentional: the dedicated jasmine spec imports the migration directly under ESM, which requires the suffix. Please do not "fix" it back to match v7.

Open Graph Description: Checklist Issue number for this PR: #3684 (also #3681 and #3682; all three share the root cause this PR addresses. Referenced with Refs rather than Fixes: no published build carries the change unt...

X Description: Checklist Issue number for this PR: #3684 (also #3681 and #3682; all three share the root cause this PR addresses. Referenced with Refs rather than Fixes: no published build carries the change unt...

Opengraph URL: https://github.com/angular/angularfire/pull/3722

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:08865438-3e5c-d3e1-5ca9-ef43849a1c07
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCE88:358C3B:70FC1A:8EB51E:6B03697C
html-safe-nonce33208b09eff3b7098e005615e434333ff4f4280a64c5e29ebfd9457438e6a0d6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTg4OjM1OEMzQjo3MEZDMUE6OEVCNTFFOjZCMDM2OTdDIiwidmlzaXRvcl9pZCI6IjY2MDAzNzg5OTc4MDMyODA3NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac21f5c040fb1e2079b4c7b182ee7e5037b50150dfc892d5f85f5da0741091283c
hovercard-subject-tagpull_request:4104004695
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/angular/angularfire/pull/3722/files
twitter:imagehttps://avatars.githubusercontent.com/u/13904589?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/13904589?s=400&v=4
og:image:altChecklist Issue number for this PR: #3684 (also #3681 and #3682; all three share the root cause this PR addresses. Referenced with Refs rather than Fixes: no published build carries the change unt...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/angular/angularfire git https://github.com/angular/angularfire.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id49453413
octolytics-dimension-repository_nwoangular/angularfire
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49453413
octolytics-dimension-repository_network_root_nwoangular/angularfire
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angularfire/pull/3722/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fpull%2F3722%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fpull%2F3722%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=angular%2Fangularfire
Reloadhttps://github.com/angular/angularfire/pull/3722/files
Reloadhttps://github.com/angular/angularfire/pull/3722/files
Reloadhttps://github.com/angular/angularfire/pull/3722/files
angularhttps://github.com/angular
angularfirehttps://github.com/angular/angularfire
Codehttps://github.com/angular/angularfire
Issues162 (162)https://github.com/angular/angularfire/issues
Pull requests5 (5)https://github.com/angular/angularfire/pulls
Discussionshttps://github.com/angular/angularfire/discussions
Actionshttps://github.com/angular/angularfire/actions
Projectshttps://github.com/angular/angularfire/projects
Security and qualityhttps://github.com/angular/angularfire/security
Insightshttps://github.com/angular/angularfire/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangularfire%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangularfire%2Fissues%2Fnew%2Fchoose
armando-navarrohttps://github.com/armando-navarro
angular:mainhttps://github.com/angular/angularfire/tree/main
armando-navarro:a16-firebase-version-alignmenthttps://github.com/armando-navarro/angularfire/tree/a16-firebase-version-alignment
Conversation 2 https://github.com/angular/angularfire/pull/3722
Commits 2 https://github.com/angular/angularfire/pull/3722/commits
Checks 24 https://github.com/angular/angularfire/pull/3722/checks
Files changed https://github.com/angular/angularfire/pull/3722/files
Please reload this pagehttps://github.com/angular/angularfire/pull/3722/files
fix(schematics): align the workspace firebase dependency with the supported range https://github.com/angular/angularfire/pull/3722/files#top
Show all changes 2 commits https://github.com/angular/angularfire/pull/3722/files
ef48a74 fix(schematics): align the workspace firebase dependency with the sup… armando-navarro Jul 21, 2026 https://github.com/angular/angularfire/pull/3722/commits/ef48a7495fb6ba3e145f52c02a98ac01384d624e
c592c56 Merge branch 'main' into a16-firebase-version-alignment armando-navarro Jul 26, 2026 https://github.com/angular/angularfire/pull/3722/commits/c592c5697015e0d99cf41a307f0df0b12dd3bef7
Clear filters https://github.com/angular/angularfire/pull/3722/files
Please reload this pagehttps://github.com/angular/angularfire/pull/3722/files
Please reload this pagehttps://github.com/angular/angularfire/pull/3722/files
index.ts https://github.com/angular/angularfire/pull/3722/files#diff-1bb76124944ef78901845f439fa36f1e30d51017e82cc7f09ad254241ab70955
common.jasmine.ts https://github.com/angular/angularfire/pull/3722/files#diff-7659053d05665ba53c881f9f46f8179d177758d7a5ed0650c75973fab061417c
common.ts https://github.com/angular/angularfire/pull/3722/files#diff-a65fe16aec051a6f17358127ac0052378fe257ebf7cb862c82c9547afceb6dec
migration.json https://github.com/angular/angularfire/pull/3722/files#diff-433d9ccabf4e95211f1298bc1e5a59ee36d5ce38f2de2d6023a3f2e901f436f6
tsconfig.json https://github.com/angular/angularfire/pull/3722/files#diff-049909c363c970b3deea06a2eb0e8b1797c2731034abb5a0cc8ea058fb4c64d1
index.jasmine.ts https://github.com/angular/angularfire/pull/3722/files#diff-d81de3e76d77adbddf59ebbb86f538df8628254c65b41cb03e42b16592b44dfb
index.ts https://github.com/angular/angularfire/pull/3722/files#diff-3d68e00997966b5d0c05e476a6e6fb1c3a3423dc007b1776876dbc2e4cd5d73e
build.ts https://github.com/angular/angularfire/pull/3722/files#diff-1a7c808f53c100a839513de5b7bffe4aec260620e6f444071f92a143816de975
src/schematics/add/index.tshttps://github.com/angular/angularfire/pull/3722/files#diff-1bb76124944ef78901845f439fa36f1e30d51017e82cc7f09ad254241ab70955
View file https://github.com/armando-navarro/angularfire/blob/c592c5697015e0d99cf41a307f0df0b12dd3bef7/src/schematics/add/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3722/{{ revealButtonHref }}
https://github.com/angular/angularfire/pull/3722/files#diff-1bb76124944ef78901845f439fa36f1e30d51017e82cc7f09ad254241ab70955
https://github.com/angular/angularfire/pull/3722/files#diff-1bb76124944ef78901845f439fa36f1e30d51017e82cc7f09ad254241ab70955
src/schematics/common.jasmine.tshttps://github.com/angular/angularfire/pull/3722/files#diff-7659053d05665ba53c881f9f46f8179d177758d7a5ed0650c75973fab061417c
View file https://github.com/armando-navarro/angularfire/blob/c592c5697015e0d99cf41a307f0df0b12dd3bef7/src/schematics/common.jasmine.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3722/{{ revealButtonHref }}
https://github.com/angular/angularfire/pull/3722/files#diff-7659053d05665ba53c881f9f46f8179d177758d7a5ed0650c75973fab061417c
https://github.com/angular/angularfire/pull/3722/files#diff-7659053d05665ba53c881f9f46f8179d177758d7a5ed0650c75973fab061417c
src/schematics/common.tshttps://github.com/angular/angularfire/pull/3722/files#diff-a65fe16aec051a6f17358127ac0052378fe257ebf7cb862c82c9547afceb6dec
View file https://github.com/armando-navarro/angularfire/blob/c592c5697015e0d99cf41a307f0df0b12dd3bef7/src/schematics/common.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3722/{{ revealButtonHref }}
https://github.com/angular/angularfire/pull/3722/files#diff-a65fe16aec051a6f17358127ac0052378fe257ebf7cb862c82c9547afceb6dec
https://github.com/angular/angularfire/pull/3722/files#diff-a65fe16aec051a6f17358127ac0052378fe257ebf7cb862c82c9547afceb6dec
https://github.com/angular/angularfire/pull/3722/files#diff-a65fe16aec051a6f17358127ac0052378fe257ebf7cb862c82c9547afceb6dec
https://github.com/angular/angularfire/pull/3722/files#diff-a65fe16aec051a6f17358127ac0052378fe257ebf7cb862c82c9547afceb6dec
src/schematics/migration.jsonhttps://github.com/angular/angularfire/pull/3722/files#diff-433d9ccabf4e95211f1298bc1e5a59ee36d5ce38f2de2d6023a3f2e901f436f6
View file https://github.com/armando-navarro/angularfire/blob/c592c5697015e0d99cf41a307f0df0b12dd3bef7/src/schematics/migration.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3722/{{ revealButtonHref }}
https://github.com/angular/angularfire/pull/3722/files#diff-433d9ccabf4e95211f1298bc1e5a59ee36d5ce38f2de2d6023a3f2e901f436f6
https://github.com/angular/angularfire/pull/3722/files#diff-433d9ccabf4e95211f1298bc1e5a59ee36d5ce38f2de2d6023a3f2e901f436f6
src/schematics/tsconfig.jsonhttps://github.com/angular/angularfire/pull/3722/files#diff-049909c363c970b3deea06a2eb0e8b1797c2731034abb5a0cc8ea058fb4c64d1
View file https://github.com/armando-navarro/angularfire/blob/c592c5697015e0d99cf41a307f0df0b12dd3bef7/src/schematics/tsconfig.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3722/{{ revealButtonHref }}
https://github.com/angular/angularfire/pull/3722/files#diff-049909c363c970b3deea06a2eb0e8b1797c2731034abb5a0cc8ea058fb4c64d1
src/schematics/update/v21/index.jasmine.tshttps://github.com/angular/angularfire/pull/3722/files#diff-d81de3e76d77adbddf59ebbb86f538df8628254c65b41cb03e42b16592b44dfb
View file https://github.com/armando-navarro/angularfire/blob/c592c5697015e0d99cf41a307f0df0b12dd3bef7/src/schematics/update/v21/index.jasmine.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3722/{{ revealButtonHref }}
src/schematics/update/v21/index.tshttps://github.com/angular/angularfire/pull/3722/files#diff-3d68e00997966b5d0c05e476a6e6fb1c3a3423dc007b1776876dbc2e4cd5d73e
View file https://github.com/armando-navarro/angularfire/blob/c592c5697015e0d99cf41a307f0df0b12dd3bef7/src/schematics/update/v21/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3722/{{ revealButtonHref }}
tools/build.tshttps://github.com/angular/angularfire/pull/3722/files#diff-1a7c808f53c100a839513de5b7bffe4aec260620e6f444071f92a143816de975
View file https://github.com/armando-navarro/angularfire/blob/c592c5697015e0d99cf41a307f0df0b12dd3bef7/tools/build.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angularfire/pull/3722/{{ revealButtonHref }}
https://github.com/angular/angularfire/pull/3722/files#diff-1a7c808f53c100a839513de5b7bffe4aec260620e6f444071f92a143816de975
https://github.com/angular/angularfire/pull/3722/files#diff-1a7c808f53c100a839513de5b7bffe4aec260620e6f444071f92a143816de975
Please reload this pagehttps://github.com/angular/angularfire/pull/3722/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.