Skip to content

feat(app, sdk): bump Firebase JS SDK to 13.4.0 - #9532

Merged
russellwheatley merged 1 commit into
mainfrom
build/firebase-js-sdk-13.4.0
Dec 3, 2026
Merged

russellwheatley merged 1 commit into
mainfrom
build/firebase-js-sdk-13.4.0

Conversation

@Mastersam07

@Mastersam07 Mastersam07 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Bumps the Firebase JS SDK to 13.4.0 (packages/app dependency, root, tests/ and tests-macos/).

The 13.1.0 and 13.3.0 bumps only moved packages/app. Compare-types reads the root node_modules/firebase, so it kept checking against 13.0.0. Moving the root pin brings in the public API that landed in 13.1.0 and 13.3.0. This PR documents it in the compare-types configs and leaves the implementation for later.

configs/ai.ts

  • SpeechMetadata (missing) and TextPart.speechMetadata (different shape): multi-speaker TTS hints. RN Firebase AI has no multi-speaker TTS path.
  • AIErrorCode (different shape): new ALREADY_INITIALIZED for getAI() calls that conflict with a cached instance. RN getAI() does not cache instances, so it never raises this code.

configs/firestore-pipelines.ts

  • Window functions, in preview upstream: rank, WindowFunction, AliasedWindowFunction, WindowSpec, DocumentWindowFrame, RangeWindowFrame, AddWindowFieldsStageOptions, plus 'WindowFunction' in ExpressionType.
  • DML stages: InsertStageOptions, UpdateStageOptions, UpsertStageOptions, DeleteStageOptions, plus atomic on PipelineExecuteOptions.
  • LiteralsStageOptions: the literals() pipeline source.

Pin guard

  • compare-types now exits 1 before comparing if the firebase versions in the root, packages/app, tests and tests-macos package.json files differ.

Once this lands, the firebase part of the Dependabot npm-minor-patch group is already on main, which leaves #9450 with only web-streams-polyfill and @expo/plist.

Validation

  • Root yarn exits 0.
  • yarn compare:types passes, with every package documented.
  • Setting tests-macos back to 13.0.0 makes compare-types exit 1 with the version map.
  • yarn lint:js, yarn tsc:compile and Prettier on the changed lines pass.
  • Jest: 130 suites, 2143 tests pass.

@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.76%. Comparing base (dbf8187) to head (2a12d26).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9532      +/-   ##
============================================
+ Coverage     75.52%   75.76%   +0.25%     
  Complexity     2361     2361              
============================================
  Files           633      637       +4     
  Lines         42025    42406     +381     
  Branches       5287     5312      +25     
============================================
+ Hits          31736    32126     +390     
+ Misses         8718     8717       -1     
+ Partials       1571     1563       -8     
Flag Coverage Δ
android-native 71.00% <ø> (ø)
e2e-ts-android 53.90% <ø> (ø)
e2e-ts-ios 53.26% <ø> (ø)
e2e-ts-macos 49.63% <ø> (ø)
ios-native 79.68% <ø> (+0.18%) ⬆️
ios-ruby 100.00% <ø> (ø)
jest 55.31% <ø> (+1.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@russellwheatley russellwheatley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of things before this goes in, mainly a guard so the firebase pins can't drift apart again. Also iOS (debug, 0) was cancelled in Pre-Boot Simulator before any tests ran, so that just needs a re-run.


import type { PackageConfig } from '../src/types';

const WINDOW_FUNCTIONS =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these version labels are off. 13.4.0 pulls the same @firebase/firestore@4.20.0 and @firebase/ai@3.1.0 as 13.3.0, so nothing documented here is new in 13.4. From the published d.ts files, the DML stages, literals() and atomic landed in 13.1.0 (firestore 4.19.0), and window functions plus the AI SpeechMetadata / ALREADY_INITIALIZED changes landed in 13.3.0 (firestore 4.20.0, ai 3.1.0). They only surface now because root firebase was still on 13.0.0 after the last two bumps. Might be simplest to drop the version from these strings ("firebase-js-sdk added ...") rather than correct each one. Same for line 80, the commit body and the PR description.

@Mastersam07 Mastersam07 Dec 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped the version from every reason string, and fixed the commit body and PR description to match.

Comment thread package.json
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react": "^7.37.5",
"firebase": "13.0.0",
"firebase": "13.4.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 13.1.0 and 13.3.0 bumps only moved packages/app, so compare-types (which reads root node_modules/firebase) was checking against 13.0.0 for two releases without anyone noticing. Can we add a simple check so these stay in sync? Something at the top of main() in .github/scripts/compare-types/src/index.ts would do, since that already runs in CI:

const pins = ['package.json', 'packages/app/package.json', 'tests/package.json', 'tests-macos/package.json'].map(
  f => {
    const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, f), 'utf8'));
    return [f, pkg.dependencies?.firebase ?? pkg.devDependencies?.firebase] as const;
  },
);
if (new Set(pins.map(([, v]) => v)).size !== 1) {
  console.error('\n❌ firebase versions out of sync:', Object.fromEntries(pins));
  process.exit(1);
}

Doesn't need to be that exactly, a standalone script wired into lint would be fine too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added checkFirebasePinsInSync() at the top of main() in src/index.ts, close to your snippet. REPO_ROOT is now exported from registry.ts. Checked it by setting tests-macos back to 13.0.0: it prints the version map and exits 1.

reason:
'firebase-js-sdk adds `ALREADY_INITIALIZED` for getAI() calls that conflict with a cached ' +
'AI instance. RN Firebase getAI() does not cache instances, so it never raises this code. ' +
'The JS SDK also declares a readonly object while RN uses an enum.',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can drop this last sentence. compare-types already treats the readonly object and the enum as equivalent (enumLikeVariableShape in compare.ts), which is why AIErrorCode wasn't listed before. The only real difference is ALREADY_INITIALIZED.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped it, thanks.

Move firebase to 13.4.0 in packages/app, the root and the test apps. The 13.1.0 and 13.3.0 bumps only moved packages/app, so compare-types kept reading firebase 13.0.0 from the root. Document the public API it now sees: AI multi-speaker speech metadata and the ALREADY_INITIALIZED error code, and Firestore pipelines window functions, DML stages and the literals() source.

compare-types now fails when the firebase pins in the root, packages/app, tests and tests-macos package.json files differ.
@Mastersam07
Mastersam07 force-pushed the build/firebase-js-sdk-13.4.0 branch from 63b8421 to 2a12d26 Compare December 2, 2026 13:24

@russellwheatley russellwheatley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@russellwheatley
russellwheatley merged commit 77a8177 into main Dec 3, 2026
54 of 56 checks passed
@russellwheatley
russellwheatley deleted the build/firebase-js-sdk-13.4.0 branch December 3, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants