Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: firebase/firebase-js-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: firebase@9.9.3
Choose a base ref
...
head repository: firebase/firebase-js-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: firebase@9.9.4
Choose a head ref
  • 12 commits
  • 71 files changed
  • 9 contributors

Commits on Aug 19, 2022

  1. Fix proactive refresh logic, add some tests (#6544)

    * Fix proactive refresh logic, add some tests
    
    * Changeset
    sam-gc authored Aug 19, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bea604e View commit details
  2. Update Auth Firefox cross browser action to only run on changed auth …

    …files (#6546)
    
    * Update trigger condition for cross browser tests
    
    * Update github action
    
    * touch auth file
    
    * Revert touching auth file
    
    * Add note describing crossBrowserPackages object
    
    * Update comment describing crossBrowserPackages
    dwyfrequency authored Aug 19, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f88805e View commit details

Commits on Aug 22, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0361bf3 View commit details
  2. Add browser unit tests for firefox in firestore (#6538)

    * Add browser unit tests for firefox in firestore
    
    * Update action to remove auth references
    
    * Update Auth Build
    
    * Initialize browser variable
    
    * update actions to use changed command
    
    * Update run tests ci script to accommodate firestore
    
    * Update name of step
    
    * Update regex to remove unnecessary `/`
    dwyfrequency authored Aug 22, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dac1e4c View commit details

Commits on Aug 23, 2022

  1. Revert "Tomandersen/multi db (#6518)" (#6552)

    This reverts commit 0361bf3.
    wu-hui authored Aug 23, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    474025c View commit details

Commits on Aug 25, 2022

  1. Included experimental support for Deno (#6560)

    Fixed issue where Deno would hang after attempting to terminate.
    maneesht authored Aug 25, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f355335 View commit details
  2. Revert "Revert "Tomandersen/multi db"" -- and make api internal (#6554)

    * Revert "Revert "Tomandersen/multi db (#6518)" (#6552)"
    
    This reverts commit 474025c.
    
    * Make multidb internal for now
    
    * Changeset
    
    * Delete change log
    wu-hui authored Aug 25, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dd9acd0 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    85b2320 View commit details

Commits on Aug 26, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b993aee View commit details

Commits on Aug 29, 2022

  1. Target ES6 for Console Build (#6563)

    * Target ES6 for Console Build
    
    * Fix format for console
    wu-hui authored Aug 29, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ca1b0c8 View commit details

Commits on Aug 31, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    de204ad View commit details

Commits on Sep 2, 2022

  1. Version Packages (#6574)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    google-oss-bot and github-actions[bot] authored Sep 2, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a084f84 View commit details
Showing with 1,125 additions and 220 deletions.
  1. +32 −0 .github/workflows/deploy-config.yml
  2. +1 −5 .github/workflows/test-changed-auth.yml
  3. +56 −25 .github/workflows/test-changed-firestore.yml
  4. +4 −1 common/api-review/firestore-lite.api.md
  5. +5 −2 common/api-review/firestore.api.md
  6. +4 −4 integration/compat-interop/package.json
  7. +1 −1 integration/firebase/package.json
  8. +17 −11 integration/firestore/firebase_export.ts
  9. +2 −2 integration/firestore/package.json
  10. +1 −1 integration/messaging/package.json
  11. +1 −1 packages/analytics-compat/package.json
  12. +1 −1 packages/analytics/package.json
  13. +1 −1 packages/app-check-compat/package.json
  14. +1 −1 packages/app-check/package.json
  15. +7 −0 packages/app-compat/CHANGELOG.md
  16. +2 −2 packages/app-compat/package.json
  17. +6 −0 packages/app/CHANGELOG.md
  18. +1 −1 packages/app/package.json
  19. +7 −0 packages/auth-compat/CHANGELOG.md
  20. +3 −3 packages/auth-compat/package.json
  21. +6 −0 packages/auth/CHANGELOG.md
  22. +2 −2 packages/auth/package.json
  23. +59 −0 packages/auth/src/core/auth/auth_impl.test.ts
  24. +3 −3 packages/auth/src/core/auth/auth_impl.ts
  25. +7 −0 packages/database-compat/CHANGELOG.md
  26. +3 −3 packages/database-compat/package.json
  27. +6 −0 packages/database/CHANGELOG.md
  28. +2 −2 packages/database/package.json
  29. +13 −2 packages/database/src/core/util/util.ts
  30. +52 −0 packages/database/test/deno.test.ts
  31. +14 −0 packages/firebase/CHANGELOG.md
  32. +9 −9 packages/firebase/package.json
  33. +7 −0 packages/firestore-compat/CHANGELOG.md
  34. +3 −3 packages/firestore-compat/package.json
  35. +2 −2 packages/firestore-compat/src/index.console.ts
  36. +10 −5 packages/firestore-compat/tools/console.build.js
  37. +6 −0 packages/firestore/CHANGELOG.md
  38. +9 −0 packages/firestore/karma.conf.js
  39. +6 −5 packages/firestore/lite/register.ts
  40. +5 −4 packages/firestore/package.json
  41. +74 −15 packages/firestore/src/api/database.ts
  42. +19 −1 packages/firestore/src/core/database_info.ts
  43. +6 −2 packages/firestore/src/core/transaction.ts
  44. +83 −32 packages/firestore/src/lite-api/database.ts
  45. +6 −5 packages/firestore/src/register.ts
  46. +57 −7 packages/firestore/test/integration/api/database.test.ts
  47. +161 −0 packages/firestore/test/integration/api/provider.test.ts
  48. +73 −5 packages/firestore/test/integration/api/transactions.test.ts
  49. +7 −6 packages/firestore/test/integration/api/validation.test.ts
  50. +17 −19 packages/firestore/test/integration/util/firebase_export.ts
  51. +39 −3 packages/firestore/test/integration/util/helpers.ts
  52. +77 −2 packages/firestore/test/lite/integration.test.ts
  53. +1 −1 packages/firestore/test/unit/util/bundle.test.ts
  54. +2 −2 packages/firestore/test/util/api_helpers.ts
  55. +1 −1 packages/functions-compat/package.json
  56. +1 −1 packages/functions/package.json
  57. +1 −1 packages/installations-compat/package.json
  58. +1 −1 packages/installations/package.json
  59. +1 −1 packages/messaging-compat/package.json
  60. +1 −1 packages/messaging/package.json
  61. +1 −1 packages/performance-compat/package.json
  62. +1 −1 packages/performance/package.json
  63. +1 −1 packages/remote-config-compat/package.json
  64. +1 −1 packages/remote-config/package.json
  65. +2 −2 packages/storage-compat/package.json
  66. +2 −2 packages/storage/package.json
  67. +1 −1 packages/template/package.json
  68. +1 −1 repo-scripts/size-analysis/package.json
  69. +95 −0 scripts/ci-test/deploy-if-needed.ts
  70. +1 −1 scripts/emulator-testing/emulators/database-emulator.ts
  71. +14 −1 scripts/run_tests_in_ci.js
32 changes: 32 additions & 0 deletions .github/workflows/deploy-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Project Config

on: pull_request

# Detects if any project config files (rules or functions) have changed,
# and deploys them to the test project used for CI if so.
# Run this in its own workflow instead of as a step before each test
# workflow to avoid too many deploys, possibly causing race conditions.
# Since the build step of each test workflow takes a long time, this
# this should finish before the tests begin running.

jobs:
test:
name: Deploy Firebase Project Rules and Functions
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (14)
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Yarn install
run: yarn
- name: Deploy project config if needed
run: yarn ts-node scripts/ci-test/deploy-if-needed.ts
env:
FIREBASE_CLI_TOKEN: ${{secrets.FIREBASE_CLI_TOKEN}}
6 changes: 1 addition & 5 deletions .github/workflows/test-changed-auth.yml
Original file line number Diff line number Diff line change
@@ -63,10 +63,6 @@ jobs:
- name: build
run: yarn build:changed auth
- name: Run tests on auth changed packages
run: xvfb-run yarn --cwd packages/auth test:browser:unit
env:
BROWSERS: 'Firefox'
- name: Run tests on auth-compat changed packages
run: xvfb-run yarn --cwd packages/auth-compat test:browser:unit
run: xvfb-run yarn test:changed auth
env:
BROWSERS: 'Firefox'
81 changes: 56 additions & 25 deletions .github/workflows/test-changed-firestore.yml
Original file line number Diff line number Diff line change
@@ -3,31 +3,62 @@ name: Test Firestore
on: pull_request

jobs:
test:
name: Test Firestore If Changed
test-chrome:
name: Test Firestore on Chrome and Node If Changed
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (14)
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: install Chrome stable
run: |
sudo apt-get update
sudo apt-get install google-chrome-stable
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
yarn
- name: build
run: yarn build:changed firestore
- name: Run tests if firestore or its dependencies has changed
run: yarn test:changed firestore
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (14)
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: install Chrome stable
run: |
sudo apt-get update
sudo apt-get install google-chrome-stable
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
yarn
- name: build
run: yarn build:changed firestore
- name: Run tests if firestore or its dependencies has changed
run: yarn test:changed firestore

test-firefox:
name: Test Firestore on Firefox If Changed
runs-on: ubuntu-latest

steps:
- name: install Firefox stable
run: |
sudo apt-get update
sudo apt-get install firefox
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (14)
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
yarn
- name: build
run: yarn build:changed firestore
- name: Run tests if firestore or its dependencies has changed
run: xvfb-run yarn test:changed firestore
env:
BROWSERS: 'Firefox'
5 changes: 4 additions & 1 deletion common/api-review/firestore-lite.api.md
Original file line number Diff line number Diff line change
@@ -176,7 +176,10 @@ export function getDoc<T>(reference: DocumentReference<T>): Promise<DocumentSnap
export function getDocs<T>(query: Query<T>): Promise<QuerySnapshot<T>>;

// @public
export function getFirestore(app?: FirebaseApp): Firestore;
export function getFirestore(): Firestore;

// @public
export function getFirestore(app: FirebaseApp): Firestore;

// @public
export function increment(n: number): FieldValue;
7 changes: 5 additions & 2 deletions common/api-review/firestore.api.md
Original file line number Diff line number Diff line change
@@ -228,13 +228,16 @@ export function getDocsFromCache<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
export function getDocsFromServer<T>(query: Query<T>): Promise<QuerySnapshot<T>>;

// @public
export function getFirestore(app?: FirebaseApp): Firestore;
export function getFirestore(): Firestore;

// @public
export function getFirestore(app: FirebaseApp): Firestore;

// @public
export function increment(n: number): FieldValue;

// @public
export function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore;
export function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings, databaseId?: string): Firestore;

// @public
export function limit(limit: number): QueryConstraint;
8 changes: 4 additions & 4 deletions integration/compat-interop/package.json
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@
"test:debug": "karma start --browsers Chrome --auto-watch"
},
"dependencies": {
"@firebase/app": "0.7.31",
"@firebase/app-compat": "0.1.32",
"@firebase/app": "0.7.32",
"@firebase/app-compat": "0.1.33",
"@firebase/analytics": "0.8.0",
"@firebase/analytics-compat": "0.1.13",
"@firebase/auth": "0.20.5",
"@firebase/auth-compat": "0.2.18",
"@firebase/auth": "0.20.6",
"@firebase/auth-compat": "0.2.19",
"@firebase/functions": "0.8.4",
"@firebase/functions-compat": "0.2.4",
"@firebase/messaging": "0.9.16",
2 changes: 1 addition & 1 deletion integration/firebase/package.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
},
"devDependencies": {
"firebase": "9.9.3",
"firebase": "9.9.4",
"@types/chai": "4.3.1",
"@types/mocha": "9.1.1",
"chai": "4.3.6",
28 changes: 17 additions & 11 deletions integration/firestore/firebase_export.ts
Original file line number Diff line number Diff line change
@@ -27,19 +27,25 @@ import {

let appCount = 0;

export function newTestApp(projectId: string, appName?: string): FirebaseApp {
if (appName === undefined) {
appName = 'test-app-' + appCount++;
}
return initializeApp(
{
apiKey: 'fake-api-key',
projectId
},
appName
);
}

export function newTestFirestore(
projectId: string,
nameOrApp?: string | FirebaseApp,
settings?: FirestoreSettings
app: FirebaseApp,
settings?: FirestoreSettings,
dbName?: string
): Firestore {
if (nameOrApp === undefined) {
nameOrApp = 'test-app-' + appCount++;
}
const app =
typeof nameOrApp === 'string'
? initializeApp({ apiKey: 'fake-api-key', projectId }, nameOrApp)
: nameOrApp;
return initializeFirestore(app, settings || {});
return initializeFirestore(app, settings || {}, dbName);
}

export * from '@firebase/firestore';
4 changes: 2 additions & 2 deletions integration/firestore/package.json
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@
"test:memory:debug": "yarn build:memory; karma start --auto-watch --browsers Chrome"
},
"dependencies": {
"@firebase/app": "0.7.31",
"@firebase/firestore": "3.4.14"
"@firebase/app": "0.7.32",
"@firebase/firestore": "3.4.15"
},
"devDependencies": {
"@types/mocha": "9.1.1",
2 changes: 1 addition & 1 deletion integration/messaging/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"test:manual": "mocha --exit"
},
"devDependencies": {
"firebase": "9.9.3",
"firebase": "9.9.4",
"chai": "4.3.6",
"chromedriver": "98.0.1",
"express": "4.18.1",
2 changes: 1 addition & 1 deletion packages/analytics-compat/package.json
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
"@firebase/app-compat": "0.x"
},
"devDependencies": {
"@firebase/app-compat": "0.1.32",
"@firebase/app-compat": "0.1.33",
"rollup": "2.72.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.7.31",
"@firebase/app": "0.7.32",
"rollup": "2.72.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
2 changes: 1 addition & 1 deletion packages/app-check-compat/package.json
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app-compat": "0.1.32",
"@firebase/app-compat": "0.1.33",
"rollup": "2.72.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
2 changes: 1 addition & 1 deletion packages/app-check/package.json
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.7.31",
"@firebase/app": "0.7.32",
"rollup": "2.72.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
7 changes: 7 additions & 0 deletions packages/app-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @firebase/app-compat

## 0.1.33

### Patch Changes

- Updated dependencies []:
- @firebase/app@0.7.32

## 0.1.32

### Patch Changes
4 changes: 2 additions & 2 deletions packages/app-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/app-compat",
"version": "0.1.32",
"version": "0.1.33",
"description": "The primary entrypoint to the Firebase JS SDK",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"main": "dist/index.cjs.js",
@@ -40,7 +40,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@firebase/app": "0.7.31",
"@firebase/app": "0.7.32",
"@firebase/util": "1.6.3",
"@firebase/logger": "0.3.3",
"@firebase/component": "0.5.17",
6 changes: 6 additions & 0 deletions packages/app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @firebase/app

## 0.7.32

### Patch Changes

- Update SDK_VERSION.

## 0.7.31

### Patch Changes
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/app",
"version": "0.7.31",
"version": "0.7.32",
"description": "The primary entrypoint to the Firebase JS SDK",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"main": "dist/index.cjs.js",
7 changes: 7 additions & 0 deletions packages/auth-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @firebase/auth-compat

## 0.2.19

### Patch Changes

- Updated dependencies [[`bea604ea3`](https://github.com/firebase/firebase-js-sdk/commit/bea604ea33c529e755cc3fcdc0a2ea75d04b9f19)]:
- @firebase/auth@0.20.6

## 0.2.18

### Patch Changes
6 changes: 3 additions & 3 deletions packages/auth-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/auth-compat",
"version": "0.2.18",
"version": "0.2.19",
"description": "FirebaseAuth compatibility package that uses API style compatible with Firebase@8 and prior versions",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"main": "dist/index.node.cjs.js",
@@ -46,7 +46,7 @@
"@firebase/app-compat": "0.x"
},
"dependencies": {
"@firebase/auth": "0.20.5",
"@firebase/auth": "0.20.6",
"@firebase/auth-types": "0.11.0",
"@firebase/component": "0.5.17",
"@firebase/util": "1.6.3",
@@ -56,7 +56,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app-compat": "0.1.32",
"@firebase/app-compat": "0.1.33",
"@rollup/plugin-json": "4.1.0",
"rollup": "2.72.1",
"rollup-plugin-replace": "2.2.0",
6 changes: 6 additions & 0 deletions packages/auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @firebase/auth

## 0.20.6

### Patch Changes

- [`bea604ea3`](https://github.com/firebase/firebase-js-sdk/commit/bea604ea33c529e755cc3fcdc0a2ea75d04b9f19) [#6544](https://github.com/firebase/firebase-js-sdk/pull/6544) - Fix proactive refresh logic in Auth when RTDB/Firestore/Storage are in use

## 0.20.5

### Patch Changes
Loading