Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/scripts/compare-types/configs/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,36 @@ const config: PackageConfig = {
reason:
'Chrome Prompt API prompt options type used by browser-only on-device language model integration.',
},
{
name: 'AgentPlatformBackend',
reason:
'firebase-js-sdk Agent Platform backend type is not yet wired in React Native Firebase AI.',
},
{
name: 'BaseSpeechConfig',
reason:
'Shared speech-config base type for multi/single-speaker TTS options newly exported by firebase-js-sdk. RN Firebase still uses the simpler VoiceConfig-based SpeechConfig shape.',
},
{
name: 'MultiSpeakerSpeechConfig',
reason:
'Multi-speaker speech config type added in firebase-js-sdk; not yet surfaced in React Native Firebase AI.',
},
{
name: 'MultiSpeakerVoiceConfig',
reason:
'Multi-speaker voice config type added in firebase-js-sdk; not yet surfaced in React Native Firebase AI.',
},
{
name: 'SingleSpeakerSpeechConfig',
reason:
'Single-speaker speech config type added in firebase-js-sdk; RN Firebase still uses the legacy VoiceConfig-based SpeechConfig object.',
},
{
name: 'SpeakerVoiceConfig',
reason:
'Per-speaker voice config type added in firebase-js-sdk for multi-speaker TTS; not yet surfaced in React Native Firebase AI.',
},
],
extraInRN: [
{
Expand Down Expand Up @@ -139,6 +169,11 @@ const config: PackageConfig = {
reason:
'RN Firebase includes direct `auth` and `appCheck` modules in options because it does not use firebase-js-sdk providers.',
},
{
name: 'BackendType',
reason:
'firebase-js-sdk BackendType now includes `AGENT_PLATFORM`; React Native Firebase AI still exposes only `VERTEX_AI` and `GOOGLE_AI`.',
},
{
name: 'EnhancedGenerateContentResponse',
reason:
Expand All @@ -149,11 +184,21 @@ const config: PackageConfig = {
reason:
'RN Firebase inlines the protobuf date type as local `Date`, while the firebase-js-sdk declaration references a generated alias name. The public structure is equivalent.',
},
{
name: 'GenerationConfig',
reason:
'firebase-js-sdk GenerationConfig gained optional `speechConfig` for TTS. RN Firebase has not yet added that field to GenerationConfig.',
},
{
name: 'InferenceMode',
reason:
'RN Firebase omits the browser-only in-cloud preference mode used by Chrome hybrid/on-device inference, so the enum-like object has fewer values.',
},
{
name: 'SpeechConfig',
reason:
'firebase-js-sdk SpeechConfig is now a single-/multi-speaker union. RN Firebase still uses the legacy `{ voiceConfig?: VoiceConfig }` object shape.',
},
{
name: 'URLRetrievalStatus',
reason:
Expand Down
6 changes: 6 additions & 0 deletions .github/scripts/compare-types/configs/app-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ const config: PackageConfig = {
},
],
differentShape: [
{
name: 'initializeAppCheck',
reason:
'firebase-js-sdk allows `app` to be `FirebaseApp | undefined` (default app fallback). ' +
'RN Firebase requires an explicit `FirebaseApp` argument at the modular entry point.',
},
{
name: 'AppCheckOptions',
reason:
Expand Down
12 changes: 12 additions & 0 deletions .github/scripts/compare-types/configs/remote-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ const config: PackageConfig = {
'Used by the firebase-js-sdk web fetch-response bootstrap path. RN Firebase ' +
'does not expose that initialization surface.',
},
{
name: 'FirebaseRolloutMetadata',
reason:
'firebase-js-sdk added rollout metadata typing for the web fetch-response path. ' +
'RN Firebase does not yet surface Remote Config rollouts on the modular fetch-response type.',
},
],
// ---------------------------------------------------------------------------
// Extra in RN Firebase
Expand Down Expand Up @@ -57,6 +63,12 @@ const config: PackageConfig = {
},
],
differentShape: [
{
name: 'FetchResponse',
reason:
'firebase-js-sdk FetchResponse now includes optional `rollouts` metadata. RN Firebase ' +
'has not yet added that field to its modular FetchResponse declaration.',
},
{
name: 'FetchStatus',
reason:
Expand Down
74 changes: 44 additions & 30 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,49 @@ npmMinimalAgeGate: 7d
# In case you must have a package version that would be disallowed
# by the above npmMinimalAgeGate
npmPreapprovedPackages:
- '@firebase/ai@2.13.1'
- '@firebase/analytics-compat@0.2.28'
- '@firebase/analytics@0.10.22'
- '@firebase/app-check-compat@0.4.5'
- '@firebase/app-check@0.12.0'
- '@firebase/app-compat@0.5.14'
- '@firebase/ai@2.14.0'
- '@firebase/analytics-compat@0.2.29'
- '@firebase/analytics-types@0.8.4'
- '@firebase/analytics@0.10.23'
- '@firebase/app-check-compat@0.4.6'
- '@firebase/app-check-interop-types@0.3.4'
- '@firebase/app-check-types@0.5.4'
- '@firebase/app-check@0.13.0'
- '@firebase/app-compat@0.5.16'
- '@firebase/app-types@0.9.5'
- '@firebase/app@0.15.0'
- '@firebase/auth-compat@0.6.8'
- '@firebase/auth@1.13.3'
- '@firebase/data-connect@0.7.1'
- '@firebase/database-compat@2.1.4'
- '@firebase/database@1.1.3'
- '@firebase/firestore-compat@0.4.11'
- '@firebase/firestore@4.16.0'
- '@firebase/functions-compat@0.4.5'
- '@firebase/functions@0.13.5'
- '@firebase/installations-compat@0.2.22'
- '@firebase/installations@0.6.22'
- '@firebase/messaging-compat@0.2.27'
- '@firebase/messaging@0.13.0'
- '@firebase/performance-compat@0.2.25'
- '@firebase/performance@0.7.12'
- '@firebase/remote-config-compat@0.2.26'
- '@firebase/remote-config@0.8.5'
- '@firebase/storage-compat@0.4.3'
- '@firebase/storage@0.14.3'
- '@firebase/util@1.15.1'
- '@firebase/app@0.16.0'
- '@firebase/auth-compat@0.6.9'
- '@firebase/auth-interop-types@0.2.5'
- '@firebase/auth-types@0.13.1'
- '@firebase/auth@1.13.4'
- '@firebase/component@0.7.4'
- '@firebase/data-connect@0.7.2'
- '@firebase/database-compat@2.1.5'
- '@firebase/database-types@1.0.21'
- '@firebase/database@1.1.4'
- '@firebase/firestore-compat@0.4.12'
- '@firebase/firestore-types@3.0.4'
- '@firebase/firestore@4.17.0'
- '@firebase/functions-compat@0.4.6'
- '@firebase/functions-types@0.6.4'
- '@firebase/functions@0.13.6'
- '@firebase/installations-compat@0.2.23'
- '@firebase/installations-types@0.5.4'
- '@firebase/installations@0.6.23'
- '@firebase/logger@0.5.1'
- '@firebase/messaging-compat@0.2.28'
- '@firebase/messaging-interop-types@0.2.5'
- '@firebase/messaging@0.13.1'
- '@firebase/performance-compat@0.2.26'
- '@firebase/performance-types@0.2.4'
- '@firebase/performance@0.7.13'
- '@firebase/remote-config-compat@0.2.28'
- '@firebase/remote-config-types@0.5.1'
- '@firebase/remote-config@0.9.1'
- '@firebase/storage-compat@0.4.4'
- '@firebase/storage-types@0.8.4'
- '@firebase/storage@0.14.4'
- '@firebase/util@1.15.2'
- '@firebase/webchannel-wrapper@1.0.6'
- '@react-native-firebase/*'
- 'firebase@12.15.0' # If adopting recent firebase-js-sdk, specify directly here
- 'firebase-tools@15.22.4'
- 'google-java-format@2.3.0'
- 'firebase@12.17.0' # If adopting recent firebase-js-sdk, specify directly here
6 changes: 3 additions & 3 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ project.ext {
// Overriding Library SDK Versions if desired
firebase: [
// Override Firebase SDK Version
bom : "34.15.0"
bom : "34.16.0"
],
],
])
Expand All @@ -368,12 +368,12 @@ Open your projects `/ios/Podfile` and add any of the globals shown below to the

```ruby
# Override Firebase SDK Version if desired
$FirebaseSDKVersion = '12.15.0'
$FirebaseSDKVersion = '12.17.0'
```

Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`.

Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=12.15.0` (or whatever version you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=12.15.0 yarn expo prebuild --clean`
Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=12.17.0` (or whatever version you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=12.17.0 yarn expo prebuild --clean`

### Android Performance

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"eslint-plugin-mocha": "^11.2.0",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react": "^7.37.5",
"firebase": "^12.15.0",
"firebase": "^12.17.0",
"firebase-tools": "^15.22.4",
"genversion": "^3.2.0",
"google-java-format": "^2.3.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"react-native": "*"
},
"dependencies": {
"firebase": "12.15.0"
"firebase": "12.17.0"
},
"devDependencies": {
"@react-native-async-storage/async-storage": "^2.0.2",
Expand All @@ -130,7 +130,7 @@
},
"sdkVersions": {
"ios": {
"firebase": "12.15.0",
"firebase": "12.17.0",
"firebaseSpmUrl": "https://github.com/firebase/firebase-ios-sdk.git",
"iosTarget": "15.0",
"macosTarget": "10.15",
Expand All @@ -140,7 +140,7 @@
"minSdk": 23,
"targetSdk": 34,
"compileSdk": 34,
"firebase": "34.15.0",
"firebase": "34.16.0",
"firebaseCrashlyticsGradle": "3.0.7",
"firebasePerfGradle": "2.0.2",
"gmsGoogleServicesGradle": "4.5.0",
Expand Down
39 changes: 30 additions & 9 deletions scripts/update-firebase-sdk-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# ./scripts/update-firebase-sdk-versions.sh --apply [same fetch options as above]
# Phase 1: extract versions (printed as sorted KEY=value lines).
# Phase 2: write them into packages/app/package.json, root/tests
# package.json, .yarnrc.yml (firebase + @firebase/* age-gate preapprovals),
# package.json, .yarnrc.yml (firebase + transitive @firebase/* age-gate preapprovals),
# docs (.mdx), Gradle files, and Jest plugin snapshots; run yarn; run
# yarn tests:ios:pod:install.
# If the JS or any native SDK / Android plugin / App Distribution API
Expand Down Expand Up @@ -306,16 +306,37 @@ function fetchJson(url) {
}

(async () => {
const meta = await fetchJson(`https://registry.npmjs.org/firebase/${version}`);
const deps = meta.dependencies ?? {};
const preapproved = [`firebase@${version}`];
for (const [name, depVersion] of Object.entries(deps)) {
if (!name.startsWith('@firebase/')) {
// Walk firebase + transitive @firebase/* deps (exact versions). Direct-only
// lists miss packages like @firebase/component that still hit npmMinimalAgeGate.
const seen = new Set();
const queue = [['firebase', version]];
while (queue.length) {
const [name, ver] = queue.shift();
const key = `${name}@${ver}`;
if (seen.has(key)) {
continue;
}
const cleaned = String(depVersion).replace(/^npm:/, '');
preapproved.push(`${name}@${cleaned}`);
seen.add(key);
const meta = await fetchJson(
`https://registry.npmjs.org/${encodeURIComponent(name)}/${encodeURIComponent(ver)}`,
);
for (const [depName, depVersion] of Object.entries(meta.dependencies ?? {})) {
if (!depName.startsWith('@firebase/')) {
continue;
}
const cleaned = String(depVersion).replace(/^npm:/, '');
if (!/^\d+\.\d+\.\d+(-[\w.]+)?$/.test(cleaned)) {
throw new Error(
`expected exact @firebase version for ${depName} from ${key}, got ${depVersion}`,
);
}
queue.push([depName, cleaned]);
}
}

const preapproved = [...seen].filter(
entry => entry.startsWith('@firebase/') || entry.startsWith('firebase@'),
);
preapproved.push('@react-native-firebase/*');
preapproved.sort((a, b) => a.localeCompare(b, 'en', { sensitivity: 'base' }));

Expand All @@ -331,7 +352,7 @@ function fetchJson(url) {
end += 1;
}

const rendered = preapproved.map((entry, index) => {
const rendered = preapproved.map(entry => {
const suffix =
entry.startsWith('firebase@') ? ' # If adopting recent firebase-js-sdk, specify directly here' : '';
return ` - '${entry}'${suffix}`;
Expand Down
2 changes: 1 addition & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"cpy-cli": "^7.0.0",
"detox": "patch:detox@npm%3A20.51.0#~/.yarn/patches/detox-npm-20.51.0-3e13b6e309.patch",
"firebase": "^12.15.0",
"firebase": "^12.17.0",
"firebase-tools": "^15.22.4",
"jest-circus": "^30.3.0",
"jest-environment-node": "^30.3.0",
Expand Down
Loading
Loading