Skip to content

Commit 940c86d

Browse files
author
Brian Chen
committed
Merge branch 'master' into bc/set-override
2 parents 767c936 + 590c9a4 commit 940c86d

37 files changed

+1327
-1066
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)

.changeset/config.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "firebase/firebase-js-sdk"}],
4+
"commit": false,
5+
"linked": [],
6+
"access": "restricted",
7+
"baseBranch": "master",
8+
"updateInternalDependencies": "patch",
9+
"ignore": [
10+
"firebase-browserify-test",
11+
"firebase-package-typings-test",
12+
"firebase-firestore-integration-test",
13+
"firebase-messaging-selenium-test",
14+
"firebase-typescript-test",
15+
"firebase-webpack-test",
16+
"@firebase/app-exp",
17+
"@firebase/app-types-exp",
18+
"@firebase/functions-exp",
19+
"@firebase/functions-types-exp",
20+
"firebase-exp"
21+
],
22+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
23+
"onlyUpdatePeerDependentsWhenOutOfRange": true,
24+
"useCalculatedVersionForSnapshots": true
25+
}
26+
}

.github/workflows/changesets.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Changeset Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Changeset Check
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
15+
16+
- name: Setup Node.js 12.x
17+
uses: actions/setup-node@master
18+
with:
19+
node-version: 12.x
20+
21+
- name: Install Dependencies
22+
run: yarn
23+
24+
- name: Check if any Changeset file exists
25+
run: yarn changeset status --since=master

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js 12.x
20+
uses: actions/setup-node@master
21+
with:
22+
node-version: 12.x
23+
24+
- name: Install Dependencies
25+
run: yarn
26+
27+
- name: Create Release Pull Request
28+
uses: changesets/action@master
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

integration/browserify/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
"test": "karma start --single-run",
88
"test:ci": "node ../../scripts/run_tests_in_ci.js"
99
},
10-
"dependencies": {
11-
"firebase": "7.15.4"
12-
},
1310
"devDependencies": {
11+
"firebase": "7.15.4",
1412
"@babel/core": "7.9.6",
1513
"@babel/preset-env": "7.9.6",
1614
"browserify": "16.5.1",

integration/firebase-typings/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"test": "tsc",
77
"test:ci": "node ../../scripts/run_tests_in_ci.js"
88
},
9-
"dependencies": {
10-
"firebase": "7.15.4"
11-
},
129
"devDependencies": {
10+
"firebase": "7.15.4",
1311
"typescript": "3.8.3"
1412
}
1513
}

integration/messaging/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
"test": "mocha --exit",
88
"test:manual": "mocha --exit"
99
},
10-
"dependencies": {
11-
"firebase": "7.15.4"
12-
},
1310
"devDependencies": {
11+
"firebase": "7.15.4",
1412
"chai": "4.2.0",
1513
"chromedriver": "^83.0.0",
1614
"express": "4.17.1",

integration/typescript/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"test": "karma start --single-run",
77
"test:ci": "node ../../scripts/run_tests_in_ci.js"
88
},
9-
"dependencies": {
10-
"firebase": "7.15.4"
11-
},
129
"devDependencies": {
10+
"firebase": "7.15.4",
1311
"@babel/core": "7.9.6",
1412
"@babel/preset-env": "7.9.6",
1513
"@types/chai": "4.2.11",

integration/webpack/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
"test": "karma start --single-run",
88
"test:ci": "node ../../scripts/run_tests_in_ci.js"
99
},
10-
"dependencies": {
11-
"firebase": "7.15.4"
12-
},
1310
"devDependencies": {
11+
"firebase": "7.15.4",
1412
"@babel/core": "7.9.6",
1513
"@babel/preset-env": "7.9.6",
1614
"chai": "4.2.0",

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"link:packages": "lerna exec --scope @firebase/* --scope firebase --scope rxfire -- yarn link",
3030
"stage:packages": "./scripts/prepublish.sh",
3131
"repl": "node tools/repl.js",
32-
"release": "node scripts/release/cli.js",
32+
"release": "ts-node-script scripts/release/cli.ts",
3333
"pretest": "node tools/pretest.js",
3434
"test": "lerna run --concurrency 4 --stream test",
3535
"test:ci": "lerna run --concurrency 4 --stream test:ci",
@@ -60,17 +60,23 @@
6060
"integration/*"
6161
],
6262
"devDependencies": {
63+
"@changesets/changelog-github": "0.2.5",
64+
"@changesets/cli": "2.9.1",
6365
"@microsoft/api-documenter": "7.7.20",
6466
"@microsoft/api-extractor": "7.7.13",
6567
"@types/chai": "4.2.11",
6668
"@types/chai-as-promised": "7.1.2",
69+
"@types/child-process-promise": "2.2.1",
70+
"@types/clone": "0.1.30",
71+
"@types/inquirer": "6.5.0",
6772
"@types/long": "4.0.1",
6873
"@types/mocha": "7.0.2",
6974
"@types/node": "12.12.37",
7075
"@types/sinon": "9.0.0",
7176
"@types/sinon-chai": "3.2.4",
7277
"@types/tmp": "0.2.0",
7378
"@types/yargs": "15.0.4",
79+
"@types/listr": "0.14.2",
7480
"@typescript-eslint/eslint-plugin": "2.30.0",
7581
"@typescript-eslint/eslint-plugin-tslint": "2.30.0",
7682
"@typescript-eslint/parser": "2.30.0",

packages/firestore/exp/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface FirestoreDataConverter<T> {
6969

7070
export class FirebaseFirestore {
7171
private constructor();
72+
readonly app: FirebaseApp;
7273
}
7374

7475
export function initializeFirestore(

packages/firestore/lite/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export interface FirestoreDataConverter<T> {
5050

5151
export class FirebaseFirestore {
5252
private constructor();
53+
readonly app: FirebaseApp;
5354
}
5455

5556
export function initializeFirestore(

packages/firestore/lite/src/api/database.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
import * as firestore from '../../';
1919

20-
import { _getProvider } from '@firebase/app-exp';
21-
import { FirebaseApp } from '@firebase/app-types-exp';
20+
import { _getProvider, _removeServiceInstance } from '@firebase/app-exp';
21+
import { FirebaseApp, _FirebaseService } from '@firebase/app-types-exp';
2222
import { Provider } from '@firebase/component';
2323

2424
import { Code, FirestoreError } from '../../../src/util/error';
@@ -42,12 +42,11 @@ import { Settings } from '../../';
4242
const DEFAULT_HOST = 'firestore.googleapis.com';
4343
const DEFAULT_SSL = true;
4444

45-
// TODO(firestorelite): Depend on FirebaseService once #3112 is merged
46-
4745
/**
4846
* The root reference to the Firestore Lite database.
4947
*/
50-
export class Firestore implements firestore.FirebaseFirestore {
48+
export class Firestore
49+
implements firestore.FirebaseFirestore, _FirebaseService {
5150
readonly _databaseId: DatabaseId;
5251
private readonly _firebaseApp: FirebaseApp;
5352
private readonly _credentials: CredentialsProvider;
@@ -120,6 +119,10 @@ export class Firestore implements firestore.FirebaseFirestore {
120119

121120
return new DatabaseId(app.options.projectId!);
122121
}
122+
123+
delete(): Promise<void> {
124+
return terminate(this);
125+
}
123126
}
124127

125128
export function initializeFirestore(
@@ -141,7 +144,7 @@ export function getFirestore(app: FirebaseApp): Firestore {
141144
export function terminate(
142145
firestore: firestore.FirebaseFirestore
143146
): Promise<void> {
144-
// TODO(firestorelite): Call _removeServiceInstance when available
147+
_removeServiceInstance(firestore.app, 'firestore/lite');
145148
const firestoreClient = cast(firestore, Firestore);
146149
return firestoreClient
147150
._getDatastore()

0 commit comments

Comments
 (0)