Skip to content
Open
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
18 changes: 18 additions & 0 deletions .github/pure_dart_web/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# A Dart web app without Flutter. CI resolves and compiles it with the Dart SDK
# alone, to check that `firebase_common`, `firebase_core_interface` and
# `firebase_core_js` never pull in Flutter again.
name: pure_dart_web
publish_to: none

environment:
sdk: '^3.10.0'

dependencies:
firebase_core_js:
path: ../../packages/firebase_core/firebase_core_js

dependency_overrides:
firebase_common:
path: ../../packages/firebase_common
firebase_core_interface:
path: ../../packages/firebase_core/firebase_core_interface
23 changes: 23 additions & 0 deletions .github/pure_dart_web/web/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2026, the Chromium project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// ignore_for_file: avoid_print

import 'package:firebase_core_js/firebase_core_js.dart';

Future<void> main() async {
try {
final app = await Firebase.initializeApp(
options: const FirebaseOptions(
apiKey: 'apiKey',
appId: 'appId',
messagingSenderId: 'messagingSenderId',
projectId: 'projectId',
),
);
print(app.name);
} on FirebaseException catch (e) {
print('${e.plugin}/${e.code}: ${e.message}');
}
}
46 changes: 46 additions & 0 deletions .github/workflows/all_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,56 @@ jobs:
- name: 'Flutter Test - Web (Wasm)'
if: ${{ !cancelled() }}
run: melos run test:web:wasm --no-select
- name: 'Dart Test - JS packages'
if: ${{ !cancelled() }}
run: melos run test:js --no-select
- name: 'Flutter Test - Browser'
if: ${{ !cancelled() }}
run: melos run test:browser --no-select

# `firebase_common`, `firebase_core_interface` and `firebase_core_js` must
# resolve and build for Dart apps that do not use Flutter (Jaspr,
# `dart compile js`/`wasm`), on their minimum Dart SDK rather than the one
# Flutter bundles. `firebase_common` also runs on the VM for the server SDKs.
pure_dart_common:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
# The lowest Dart SDK firebase_common supports, which is also the floor of
# the server SDKs (firebase_admin_sdk, google_cloud_firestore) it serves.
- uses: dart-lang/setup-dart@6afc89df92d6eb3834022f73cd65adc8cdfcb92d
with:
sdk: '3.9.0'
- name: 'Test firebase_common without Flutter'
run: |
# Inside the workspace, `pub get` resolves every member, Flutter ones included.
cp -r packages/firebase_common "$RUNNER_TEMP/firebase_common"
cd "$RUNNER_TEMP/firebase_common"
sed -i '/^resolution: workspace$/d' pubspec.yaml
dart pub get
dart test
dart test -p chrome

# A separate job: a second setup-dart in the same job fails because the first
# one's SDK download is still in RUNNER_TEMP.
pure_dart_web:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
# The lowest Dart SDK firebase_core_interface and firebase_core_js support.
- uses: dart-lang/setup-dart@6afc89df92d6eb3834022f73cd65adc8cdfcb92d
with:
sdk: '3.10.0'
- name: 'Build a Dart web app without Flutter'
# Outside `.github/workflows/scripts/`, so editing it does not start every e2e suite.
working-directory: .github/pure_dart_web
run: |
dart pub get
dart compile js -o build/main.js web/main.dart
dart compile wasm -o build/main.wasm web/main.dart

# Resolves a local Swift package fixture. The rewrite unit test runs in
# analyze; this job needs Xcode, and it does not bootstrap Flutter.
# `melos run test:spm-sdk-pin` is the same script.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/config/custom_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- firebase_auth
- firebase_auth/firebase_auth_platform_interface
- firebase_auth/firebase_auth_web
- firebase_common
- firebase_core
- firebase_core/firebase_core_platform_interface
- firebase_core/firebase_core_web
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
paths:
- 'packages/firebase_ai/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_ai.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -29,6 +30,7 @@ on:
paths:
- 'packages/firebase_ai/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_ai.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_analytics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
paths:
- 'packages/firebase_analytics/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_analytics.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -29,6 +30,7 @@ on:
paths:
- 'packages/firebase_analytics/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_analytics.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_app_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
paths:
- 'packages/firebase_app_check/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_app_check.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -29,6 +30,7 @@ on:
paths:
- 'packages/firebase_app_check/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_app_check.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_app_installations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
paths:
- 'packages/firebase_app_installations/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_app_installations.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -29,6 +30,7 @@ on:
paths:
- 'packages/firebase_app_installations/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_app_installations.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
paths:
- 'packages/firebase_auth/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_auth.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -33,6 +34,7 @@ on:
paths:
- 'packages/firebase_auth/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_auth.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_crashlytics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
paths:
- 'packages/firebase_crashlytics/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_crashlytics.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -24,6 +25,7 @@ on:
paths:
- 'packages/firebase_crashlytics/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_crashlytics.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
paths:
- 'packages/firebase_database/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_database.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -27,6 +28,7 @@ on:
paths:
- 'packages/firebase_database/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_database.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_fdc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
paths:
- 'packages/firebase_data_connect/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_fdc.yaml'
- '.github/actions/setup-flutterfire/**'
push:
Expand All @@ -20,6 +21,7 @@ on:
paths:
- 'packages/firebase_data_connect/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_fdc.yaml'
- '.github/actions/setup-flutterfire/**'
workflow_call:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_firestore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
paths:
- 'packages/cloud_firestore/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_firestore.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -30,6 +31,7 @@ on:
paths:
- 'packages/cloud_firestore/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_firestore.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
paths:
- 'packages/cloud_functions/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_functions.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -27,6 +28,7 @@ on:
paths:
- 'packages/cloud_functions/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_functions.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
paths:
- 'packages/firebase_messaging/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_messaging.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -29,6 +30,7 @@ on:
paths:
- 'packages/firebase_messaging/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_messaging.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
paths:
- 'packages/firebase_performance/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_performance.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -29,6 +30,7 @@ on:
paths:
- 'packages/firebase_performance/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_performance.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
paths:
- 'packages/cloud_firestore/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_pipeline.yaml'
- '.github/actions/setup-flutterfire/**'
push:
Expand All @@ -20,6 +21,7 @@ on:
paths:
- 'packages/cloud_firestore/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_pipeline.yaml'
- '.github/actions/setup-flutterfire/**'
workflow_call:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_remote_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
paths:
- 'packages/firebase_remote_config/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_remote_config.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -29,6 +30,7 @@ on:
paths:
- 'packages/firebase_remote_config/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_remote_config.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_tests_storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
paths:
- 'packages/firebase_storage/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_storage.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand All @@ -27,6 +28,7 @@ on:
paths:
- 'packages/firebase_storage/**'
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '.github/workflows/e2e_tests_storage.yaml'
- '.github/workflows/reusable_e2e_*.yaml'
- '.github/actions/setup-flutterfire/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable_e2e_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
filters: |
shared: &shared
- 'packages/firebase_core/**'
- 'packages/firebase_common/**'
- '${{ inputs.package-path }}/lib/**'
- '${{ inputs.package-path }}/pubspec.yaml'
- '${{ inputs.platform-interface-package && format('packages/*/{0}/**', inputs.platform-interface-package) || 'packages/__none__/**' }}'
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/reusable_repo_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ jobs:
id: filter
with:
# `packages/*/*` is every plugin package - main, platform interface
# and web implementation alike. `packages/_flutterfire_internals` is
# the one package that sits a level higher, so it needs its own entry.
# and web implementation alike. `packages/_flutterfire_internals` and
# `packages/firebase_common` sit a level higher, so they need their
# own entries.
#
# Any change under `.github/workflows` runs everything. The filters
# here decide what CI skips, so a change to how CI works must not be
Expand All @@ -83,6 +84,7 @@ jobs:
- 'packages/*/*/lib/**'
- 'packages/*/*/pubspec.yaml'
- 'packages/_flutterfire_internals/**'
- 'packages/firebase_common/**'
- '${{ inputs.app-path }}/lib/**'
- '${{ inputs.app-path }}/pubspec.yaml'
- '${{ inputs.app-path }}/integration_test/**'
Expand Down
2 changes: 1 addition & 1 deletion docs/cloud-messaging/receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ To get started, create a new file in the your `web` directory, and call it `fire

```js title=web/firebase-messaging-sw.js
// See this file for the latest firebase-js-sdk version:
// https://github.com/firebase/flutterfire/blob/main/packages/firebase_core/firebase_core_web/lib/src/firebase_sdk_version.dart
// https://github.com/firebase/flutterfire/blob/main/packages/firebase_core/firebase_core_js/lib/src/firebase_sdk_version.dart
importScripts("https://www.gstatic.com/firebasejs/10.7.0/firebase-app-compat.js");
importScripts("https://www.gstatic.com/firebasejs/10.7.0/firebase-messaging-compat.js");

Expand Down
Loading
Loading