Skip to content

Commit 473acd5

Browse files
Merge
2 parents 317ba74 + 982acf9 commit 473acd5

30 files changed

+440
-456
lines changed

.changeset/chilled-beers-chew.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
3+
---

.changeset/few-snails-walk.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/nice-seas-type.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/seven-crabs-join.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/tall-glasses-move.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
3+
---

.changeset/thin-ligers-fold.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/two-weeks-thank.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
---
4+
5+
Update dependency eslint to v7

.changeset/warm-suns-dream.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
Make exp release script work again

.changeset/yellow-lamps-greet.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
---
4+
5+
Update dependency firebase-tools to v8

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"build": "lerna run --scope @firebase/* --scope firebase --scope rxfire build",
2626
"build:exp": "lerna run --scope @firebase/*-exp --scope firebase-exp build",
2727
"build:release": "lerna run --scope @firebase/* --scope firebase --ignore @firebase/*-exp --ignore firebase-exp prepare",
28-
"build:exp:release": "lerna run --scope @firebase/*-exp --scope firebase-exp prepare && yarn --cwd packages-exp/app-exp typings:public",
28+
"build:exp:release": "yarn --cwd packages/app build:deps && lerna run --scope @firebase/*-exp --scope firebase-exp prepare && yarn --cwd packages-exp/app-exp typings:public",
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",
@@ -89,12 +89,12 @@
8989
"coveralls": "3.1.0",
9090
"del": "5.1.0",
9191
"dependency-graph": "0.9.0",
92-
"eslint": "6.8.0",
92+
"eslint": "7.3.1",
9393
"eslint-plugin-import": "2.20.2",
9494
"express": "4.17.1",
9595
"find-free-port": "2.0.0",
9696
"firebase-functions": "3.6.1",
97-
"firebase-tools": "7.16.2",
97+
"firebase-tools": "8.4.3",
9898
"git-rev-sync": "2.0.0",
9999
"glob": "7.1.6",
100100
"http-server": "0.12.3",

packages-exp/app-exp/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
"test:browser": "karma start --single-run",
2424
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.ts --config ../../config/mocharc.node.js",
2525
"type-check": "tsc -p . --noEmit",
26-
"prepare": "rollup -c rollup.config.release.js",
26+
"prepare": "rollup -c rollup.config.release.js && yarn api-report",
2727
"api-report": "api-extractor run --local --verbose",
2828
"predoc": "node ../../scripts/exp/remove-exp.js temp",
2929
"doc": "api-documenter markdown --input temp --output docs",
3030
"build:doc": "yarn build && yarn doc",
31-
"typings:public": "node ./use_public_typings.js --public",
32-
"typings:internal": "node ./use_public_typings.js"
31+
"typings:public": "node ./use_typings.js --public",
32+
"typings:internal": "node ./use_typings.js"
3333
},
3434
"dependencies": {
3535
"@firebase/app-types-exp": "0.0.800",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @license
3+
* Copyright 2020 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
export * from '@firebase/functions-exp';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @license
3+
* Copyright 2020 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
export * from '@firebase/functions-exp';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "firebase-exp/functions",
3+
"main": "dist/index.cjs.js",
4+
"browser": "dist/index.esm.js",
5+
"module": "dist/index.esm.js",
6+
"typings": "dist/functions/index.d.ts"
7+
}

packages-exp/firebase-exp/package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firebase-exp",
3-
"version": "0.800.1",
3+
"version": "0.800.3",
44
"private": true,
55
"description": "Firebase JavaScript library for web and Node.js",
66
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
@@ -35,7 +35,8 @@
3535
"test:ci": "echo 'No test suite for firebase wrapper'"
3636
},
3737
"dependencies": {
38-
"@firebase/app-exp": "0.0.800"
38+
"@firebase/app-exp": "0.0.800",
39+
"@firebase/functions-exp": "0.0.800"
3940
},
4041
"devDependencies": {
4142
"rollup": "1.32.1",
@@ -52,6 +53,7 @@
5253
"typescript": "3.7.5"
5354
},
5455
"components": [
55-
"app"
56+
"app",
57+
"functions"
5658
]
5759
}

packages-exp/functions-exp/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
2525
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'src/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
2626
"test:emulator": "env FIREBASE_FUNCTIONS_EMULATOR_ORIGIN=http://localhost:5005 run-p test:node",
27-
"prepare": "yarn build",
27+
"prepare": "rollup -c rollup.config.release.js && yarn api-report",
2828
"api-report": "api-extractor run --local --verbose",
2929
"predoc": "node ../../scripts/exp/remove-exp.js temp",
3030
"doc": "api-documenter markdown --input temp --output docs",
@@ -49,11 +49,10 @@
4949
"bugs": {
5050
"url": "https://github.com/firebase/firebase-js-sdk/issues"
5151
},
52-
"typings": "dist/index.d.ts",
52+
"typings": "dist/functions-exp-public.d.ts",
5353
"dependencies": {
5454
"@firebase/component": "0.1.15",
5555
"@firebase/functions-types-exp": "0.0.800",
56-
"@firebase/messaging": "0.6.19",
5756
"@firebase/messaging-types": "0.4.5",
5857
"@firebase/util": "0.2.50",
5958
"isomorphic-fetch": "2.2.1",

packages-exp/functions-exp/rollup.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ const es5Builds = [
4040
*/
4141
{
4242
input: 'src/index.ts',
43-
output: [
44-
{ file: pkg.browser, format: 'cjs', sourcemap: true },
45-
{ file: pkg.module, format: 'es', sourcemap: true }
46-
],
43+
output: [{ file: pkg.module, format: 'es', sourcemap: true }],
4744
plugins: es5BuildPlugins,
4845
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
4946
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/**
2+
* @license
3+
* Copyright 2019 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import typescriptPlugin from 'rollup-plugin-typescript2';
19+
import typescript from 'typescript';
20+
import json from 'rollup-plugin-json';
21+
import pkg from './package.json';
22+
import { importPathTransformer } from '../../scripts/exp/ts-transform-import-path';
23+
24+
const deps = Object.keys(
25+
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
26+
);
27+
28+
/**
29+
* ES5 Builds
30+
*/
31+
const es5BuildPlugins = [
32+
typescriptPlugin({
33+
typescript,
34+
clean: true,
35+
abortOnError: false,
36+
transformers: [importPathTransformer]
37+
}),
38+
json()
39+
];
40+
41+
const es5Builds = [
42+
/**
43+
* Browser Builds
44+
*/
45+
{
46+
input: 'src/index.ts',
47+
output: [{ file: pkg.browser, format: 'es', sourcemap: true }],
48+
plugins: es5BuildPlugins,
49+
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
50+
treeshake: {
51+
moduleSideEffects: false
52+
}
53+
},
54+
/**
55+
* Node.js Build
56+
*/
57+
{
58+
input: 'src/index.ts',
59+
output: [{ file: pkg.main, format: 'cjs', sourcemap: true }],
60+
plugins: es5BuildPlugins,
61+
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
62+
treeshake: {
63+
moduleSideEffects: false
64+
}
65+
}
66+
];
67+
68+
/**
69+
* ES2017 Builds
70+
*/
71+
const es2017BuildPlugins = [
72+
typescriptPlugin({
73+
typescript,
74+
tsconfigOverride: {
75+
compilerOptions: {
76+
target: 'es2017'
77+
}
78+
},
79+
abortOnError: false,
80+
clean: true,
81+
transformers: [importPathTransformer]
82+
}),
83+
json({
84+
preferConst: true
85+
})
86+
];
87+
88+
const es2017Builds = [
89+
/**
90+
* Browser Builds
91+
*/
92+
{
93+
input: 'src/index.ts',
94+
output: {
95+
file: pkg.esm2017,
96+
format: 'es',
97+
sourcemap: true
98+
},
99+
plugins: es2017BuildPlugins,
100+
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
101+
treeshake: {
102+
moduleSideEffects: false
103+
}
104+
}
105+
];
106+
107+
export default [...es5Builds, ...es2017Builds];

packages-exp/functions-exp/src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const factory: InstanceFactory<'functions'> = (
3232
region?: string
3333
) => {
3434
// Dependencies
35-
const app = container.getProvider('app').getImmediate();
35+
const app = container.getProvider('app-exp').getImmediate();
3636
const authProvider = container.getProvider('auth-internal');
3737
const messagingProvider = container.getProvider('messaging');
3838

packages-exp/functions-types-exp/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"license": "Apache-2.0",
88
"scripts": {
99
"test": "tsc",
10-
"test:ci": "node ../../scripts/run_tests_in_ci.js"
10+
"test:ci": "node ../../scripts/run_tests_in_ci.js",
11+
"prepare": "node ../../scripts/exp/remove-exp.js ./index.d.ts"
1112
},
1213
"files": [
1314
"index.d.ts"

packages/firestore/exp/src/api/reference.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ export function onSnapshot<T>(
362362
const userObserver = args[currArg] as PartialObserver<
363363
firestore.QuerySnapshot<T>
364364
>;
365-
args[currArg] = userObserver.next;
366-
args[currArg + 1] = userObserver.error;
367-
args[currArg + 2] = userObserver.complete;
365+
args[currArg] = userObserver.next?.bind(userObserver);
366+
args[currArg + 1] = userObserver.error?.bind(userObserver);
367+
args[currArg + 2] = userObserver.complete?.bind(userObserver);
368368
}
369369

370370
let asyncObserver: Promise<Unsubscribe>;

0 commit comments

Comments
 (0)