Skip to content

Commit ba565b9

Browse files
committed
Move core snippets to v9 compat
1 parent 15e1160 commit ba565b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+122
-122
lines changed

analytics/ecommerce.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import firebase from "firebase/app";
2-
import "firebase/analytics";
1+
import firebase from "firebase/compat/app";
2+
import "firebase/compat/analytics";
33

44
// [START analytics_ecommerce_items]
55
// A pair of jeggings

analytics/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import firebase from "firebase/app";
2-
import "firebase/analytics";
1+
import firebase from "firebase/compat/app";
2+
import "firebase/compat/analytics";
33

44
function initialize() {
55
// [START analytics_initialize]

analytics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
},
77
"license": "Apache-2.0",
88
"dependencies": {
9-
"firebase": "^8.6.8"
9+
"firebase": "^9.0.0-beta.3"
1010
}
1111
}

auth/anonymous.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// These samples are intended for Web so this import would normally be
22
// done in HTML however using modules here is more convenient for
33
// ensuring sample correctness offline.
4-
import firebase from "firebase/app";
5-
import "firebase/auth";
4+
import firebase from "firebase/compat/app";
5+
import "firebase/compat/auth";
66

77
function anonSignIn() {
88
// [START auth_anon_sign_in]

auth/apple.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// These samples are intended for Web so this import would normally be
22
// done in HTML however using modules here is more convenient for
33
// ensuring sample correctness offline.
4-
import firebase from "firebase/app";
5-
import "firebase/auth";
4+
import firebase from "firebase/compat/app";
5+
import "firebase/compat/auth";
66

7-
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite/firebase/en/docs/auth/web/apple.md
7+
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite/firebase/compat/en/docs/auth/web/apple.md
88

99
function appleProvider() {
1010
// [START auth_apple_provider_create]

auth/auth-state-persistence.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// These samples are intended for Web so this import would normally be
22
// done in HTML however using modules here is more convenient for
33
// ensuring sample correctness offline.
4-
import firebase from "firebase/app";
5-
import "firebase/auth";
4+
import firebase from "firebase/compat/app";
5+
import "firebase/compat/auth";
66

77
function setPersistenceSession() {
88
var email = "...";

auth/cordova.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// These samples are intended for Web so this import would normally be
22
// done in HTML however using modules here is more convenient for
33
// ensuring sample correctness offline.
4-
import firebase from "firebase/app";
5-
import "firebase/auth";
4+
import firebase from "firebase/compat/app";
5+
import "firebase/compat/auth";
66

7-
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite/firebase/en/docs/auth/web/cordova.md
7+
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite/firebase/compat/en/docs/auth/web/cordova.md
88

99
function createGoogleProvider() {
1010
// [START auth_create_google_provider]

auth/custom-email-handler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// These samples are intended for Web so this import would normally be
22
// done in HTML however using modules here is more convenient for
33
// ensuring sample correctness offline.
4-
import firebase from "firebase/app";
5-
import "firebase/auth";
4+
import firebase from "firebase/compat/app";
5+
import "firebase/compat/auth";
66

7-
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite/firebase/en/docs/auth/custom-email-handler.md
7+
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite/firebase/compat/en/docs/auth/custom-email-handler.md
88

99
function handleUserManagementQueryParams() {
1010
// TODO: This helpers should be implemented by the developer

auth/custom.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// These samples are intended for Web so this import would normally be
22
// done in HTML however using modules here is more convenient for
33
// ensuring sample correctness offline.
4-
import firebase from "firebase/app";
5-
import "firebase/auth";
4+
import firebase from "firebase/compat/app";
5+
import "firebase/compat/auth";
66

77
function signInCustom() {
88
var token = "token123";

auth/email-link-auth.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// These samples are intended for Web so this import would normally be
22
// done in HTML however using modules here is more convenient for
33
// ensuring sample correctness offline.
4-
import firebase from "firebase/app";
5-
import "firebase/auth";
4+
import firebase from "firebase/compat/app";
5+
import "firebase/compat/auth";
66

7-
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite/firebase/en/docs/auth/web/email-link-auth.md
7+
// Docs: https://source.corp.google.com/piper///depot/google3/third_party/devsite/firebase/compat/en/docs/auth/web/email-link-auth.md
88

99
function emailLinkActionCodeSettings() {
1010
// [START auth_email_link_actioncode_settings]

0 commit comments

Comments
 (0)