Skip to content

Commit f34d4ca

Browse files
Fix terser script
2 parents e11615f + 29bac5e commit f34d4ca

File tree

158 files changed

+5074
-1670
lines changed

Some content is hidden

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

158 files changed

+5074
-1670
lines changed

.changeset/config.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@
77
"baseBranch": "master",
88
"updateInternalDependencies": "patch",
99
"ignore": [
10-
"firebase-browserify-test",
11-
"firebase-package-typings-test",
10+
"firebase-namespace-integration-test",
1211
"firebase-firestore-integration-test",
13-
"firebase-messaging-selenium-test",
14-
"firebase-typescript-test",
15-
"firebase-webpack-test",
12+
"firebase-messaging-integration-test",
1613
"@firebase/app-exp",
1714
"@firebase/app-types-exp",
1815
"@firebase/functions-exp",
1916
"@firebase/functions-types-exp",
2017
"@firebase/testing",
2118
"firebase-exp",
19+
"@firebase/app-compat",
2220
"@firebase/changelog-generator",
2321
"firebase-size-analysis"
2422
],

.changeset/fuzzy-seas-compare.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/rules-unit-testing": patch
3+
---
4+
5+
Fix assertFails() logic of @firebase/rules-unit-testing

.changeset/small-grapes-teach.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/component": patch
3+
---
4+
5+
Correctly delete services created by modular SDKs when calling provider.delete()

.github/workflows/test-changed-fcm-integration.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ jobs:
2727
yarn
2828
- name: build
2929
run: yarn build:changed fcm-integration --buildAppExp
30-
- name: Run tests if FCM or its dependenceies has changed
31-
run: xvfb-run yarn test:changed fcm-integration
30+
- name: Run tests if FCM or its dependencies has changed
31+
run: xvfb-run yarn test:changed fcm-integration

.github/workflows/test-changed-firestore-integration.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ jobs:
2727
yarn
2828
- name: build
2929
run: yarn build:changed firestore-integration --buildAppExp
30-
- name: Run tests if firestore or its dependenceies has changed
31-
run: yarn test:changed firestore-integration
30+
- name: Run tests if firestore or its dependencies has changed
31+
run: yarn test:changed firestore-integration

.github/workflows/test-changed-firestore.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ jobs:
2727
yarn
2828
- name: build
2929
run: yarn build:changed firestore --buildAppExp
30-
- name: Run tests if firestore or its dependenceies has changed
31-
run: yarn test:changed firestore
30+
- name: Run tests if firestore or its dependencies has changed
31+
run: yarn test:changed firestore

common/api-review/app-exp.api.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { FirebaseApp } from '@firebase/app-types-exp';
99
import { FirebaseAppConfig } from '@firebase/app-types-exp';
1010
import { FirebaseOptions } from '@firebase/app-types-exp';
1111
import { LogCallback } from '@firebase/logger';
12-
import { LogLevel } from '@firebase/logger';
12+
import { LogLevelString } from '@firebase/logger';
1313
import { LogOptions } from '@firebase/logger';
1414
import { Name } from '@firebase/component';
1515
import { Provider } from '@firebase/component';
@@ -29,6 +29,9 @@ export function _clearComponents(): void;
2929
// @internal
3030
export const _components: Map<string, Component<any>>;
3131

32+
// @internal
33+
export const _DEFAULT_ENTRY_NAME = "[DEFAULT]";
34+
3235
// @public
3336
export function deleteApp(app: FirebaseApp): Promise<void>;
3437

@@ -47,8 +50,6 @@ export function initializeApp(options: FirebaseOptions, name?: string): Firebase
4750
// @public
4851
export function initializeApp(options: FirebaseOptions, config?: FirebaseAppConfig): FirebaseApp;
4952

50-
export { LogLevel }
51-
5253
// @public
5354
export function onLog(logCallback: LogCallback | null, options?: LogOptions): void;
5455

@@ -65,7 +66,7 @@ export function _removeServiceInstance<T extends Name>(app: FirebaseApp, name: T
6566
export const SDK_VERSION: string;
6667

6768
// @public
68-
export function setLogLevel(logLevel: LogLevel): void;
69+
export function setLogLevel(logLevel: LogLevelString): void;
6970

7071

7172
```

config/.eslintrc.js

+37-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
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+
118
const path = require('path');
219

320
module.exports = {
@@ -128,12 +145,29 @@ module.exports = {
128145
'Object': "Use {} or 'object' instead.",
129146
'String': "Use 'string' instead.",
130147
'Number': "Use 'number' instead.",
131-
'Boolean': "Use 'boolean' instead."
148+
'Boolean': "Use 'boolean' instead.",
149+
'Function': `Avoid the Function type, as it provides little safety for the following reasons:
150+
It provides no type safety when calling the value, which means it's easy to provide the wrong arguments.
151+
It accepts class declarations, which will fail when called, as they are called without the new keyword.`
152+
},
153+
'extendDefaults': false
154+
}
155+
],
156+
'@typescript-eslint/naming-convention': [
157+
'error',
158+
{
159+
'selector': 'class',
160+
'format': ['PascalCase']
161+
},
162+
{
163+
'selector': 'interface',
164+
'format': ['PascalCase'],
165+
'custom': {
166+
'regex': '^I[A-Z]',
167+
'match': false
132168
}
133169
}
134170
],
135-
'@typescript-eslint/class-name-casing': 'error',
136-
'@typescript-eslint/interface-name-prefix': ['error', 'never'],
137171
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
138172
'@typescript-eslint/explicit-member-accessibility': [
139173
'error',

config/functions/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"description": "Cloud Functions for Firebase",
44
"dependencies": {
55
"cors": "2.8.5",
6-
"firebase-admin": "9.0.0",
7-
"firebase-functions": "3.9.0"
6+
"firebase-admin": "9.1.1",
7+
"firebase-functions": "3.11.0"
88
},
99
"private": true,
1010
"engines": {

integration/firebase/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"devDependencies": {
1010
"firebase": "7.19.0",
11-
"@babel/core": "7.11.0",
11+
"@babel/core": "7.11.4",
1212
"@babel/preset-env": "7.11.0",
1313
"@types/chai": "4.2.12",
1414
"@types/mocha": "7.0.2",
@@ -20,9 +20,9 @@
2020
"karma-mocha": "2.0.1",
2121
"karma-sauce-launcher": "1.2.0",
2222
"karma-spec-reporter": "0.0.32",
23-
"karma-typescript": "5.0.3",
23+
"karma-typescript": "5.1.0",
2424
"mocha": "7.2.0",
2525
"npm-run-all": "4.1.5",
26-
"typescript": "3.9.7"
26+
"typescript": "4.0.2"
2727
}
2828
}

integration/firestore/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"karma-mocha": "2.0.1",
2727
"karma-spec-reporter": "0.0.32",
2828
"mocha": "7.2.0",
29-
"ts-loader": "6.2.2",
30-
"typescript": "3.9.7",
29+
"ts-loader": "8.0.3",
30+
"typescript": "4.0.2",
3131
"webpack": "4.44.1",
3232
"webpack-stream": "5.2.1"
3333
}

package.json

+26-26
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
"scripts": {
2424
"dev": "lerna run --parallel --scope @firebase/* --scope firebase --scope rxfire dev",
2525
"build": "lerna run --scope @firebase/app-exp build:deps && lerna run --scope @firebase/* --scope firebase --scope rxfire --ignore @firebase/app-exp build",
26-
"build:exp": "lerna run --scope @firebase/*-exp --scope firebase-exp build",
26+
"build:exp": "lerna run --scope @firebase/*-exp --scope @firebase/*-compat --scope firebase-exp build",
2727
"build:release": "lerna run --scope @firebase/app-exp build:deps && lerna run --scope @firebase/* --scope firebase --scope rxfire --ignore @firebase/*-exp prepare",
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",
28+
"build:exp:release": "yarn --cwd packages/app build:deps && lerna run --scope @firebase/*-exp --scope @firebase/*-compat --scope firebase-exp prepare && yarn --cwd packages-exp/app-exp typings:public",
2929
"build:changed": "ts-node-script scripts/ci-test/build_changed.ts",
3030
"link:packages": "lerna exec --scope @firebase/* --scope firebase --scope rxfire -- yarn link",
3131
"stage:packages": "./scripts/prepublish.sh",
@@ -65,27 +65,27 @@
6565
"repo-scripts/*"
6666
],
6767
"devDependencies": {
68-
"@changesets/changelog-github": "0.2.6",
69-
"@changesets/cli": "2.9.2",
70-
"@microsoft/api-documenter": "7.8.21",
71-
"@microsoft/api-extractor": "7.9.2",
68+
"@changesets/changelog-github": "0.2.7",
69+
"@changesets/cli": "2.10.1",
70+
"@microsoft/api-documenter": "7.8.35",
71+
"@microsoft/api-extractor": "7.9.10",
7272
"@types/chai": "4.2.12",
7373
"@types/chai-as-promised": "7.1.3",
7474
"@types/child-process-promise": "2.2.1",
75-
"@types/clone": "0.1.30",
76-
"@types/inquirer": "7.3.0",
75+
"@types/clone": "2.1.0",
76+
"@types/inquirer": "7.3.1",
7777
"@types/listr": "0.14.2",
7878
"@types/long": "4.0.1",
7979
"@types/mocha": "7.0.2",
8080
"@types/mz": "2.7.1",
81-
"@types/node": "12.12.53",
82-
"@types/sinon": "9.0.4",
81+
"@types/node": "12.12.54",
82+
"@types/sinon": "9.0.5",
8383
"@types/sinon-chai": "3.2.4",
8484
"@types/tmp": "0.2.0",
8585
"@types/yargs": "15.0.5",
86-
"@typescript-eslint/eslint-plugin": "2.34.0",
87-
"@typescript-eslint/eslint-plugin-tslint": "2.34.0",
88-
"@typescript-eslint/parser": "2.34.0",
86+
"@typescript-eslint/eslint-plugin": "3.10.1",
87+
"@typescript-eslint/eslint-plugin-tslint": "3.10.1",
88+
"@typescript-eslint/parser": "3.10.1",
8989
"babel-loader": "8.1.0",
9090
"chai": "4.2.0",
9191
"chai-as-promised": "7.1.1",
@@ -95,12 +95,12 @@
9595
"coveralls": "3.1.0",
9696
"del": "5.1.0",
9797
"dependency-graph": "0.9.0",
98-
"eslint": "7.6.0",
98+
"eslint": "7.7.0",
9999
"eslint-plugin-import": "2.22.0",
100100
"express": "4.17.1",
101101
"find-free-port": "2.0.0",
102-
"firebase-functions": "3.9.0",
103-
"firebase-tools": "8.6.0",
102+
"firebase-functions": "3.11.0",
103+
"firebase-tools": "8.9.0",
104104
"git-rev-sync": "2.0.0",
105105
"glob": "7.1.6",
106106
"http-server": "0.12.3",
@@ -118,14 +118,14 @@
118118
"karma-mocha-reporter": "2.2.5",
119119
"karma-safari-launcher": "1.0.0",
120120
"karma-sauce-launcher": "1.2.0",
121-
"karma-sourcemap-loader": "0.3.7",
121+
"karma-sourcemap-loader": "0.3.8",
122122
"karma-spec-reporter": "0.0.32",
123123
"karma-summary-reporter": "1.8.0",
124124
"karma-webpack": "4.0.2",
125125
"lcov-result-merger": "3.1.0",
126126
"lerna": "3.22.1",
127127
"listr": "0.14.3",
128-
"lodash": "4.17.19",
128+
"lodash": "4.17.20",
129129
"long": "3.2.0",
130130
"merge2": "1.4.1",
131131
"mkdirp": "1.0.4",
@@ -134,21 +134,21 @@
134134
"npm-run-all": "4.1.5",
135135
"npm-run-path": "4.0.1",
136136
"nyc": "15.1.0",
137-
"ora": "4.0.5",
138-
"prettier": "2.0.5",
137+
"ora": "5.0.0",
138+
"prettier": "2.1.0",
139139
"protractor": "5.4.2",
140140
"rxjs": "6.6.2",
141141
"semver": "7.3.2",
142-
"simple-git": "1.132.0",
143-
"sinon": "9.0.2",
142+
"simple-git": "2.20.1",
143+
"sinon": "9.0.3",
144144
"sinon-chai": "3.5.0",
145-
"source-map-loader": "1.0.1",
146-
"terser": "4.8.0",
147-
"ts-loader": "6.2.2",
145+
"source-map-loader": "1.0.2",
146+
"terser": "5.2.1",
147+
"ts-loader": "8.0.3",
148148
"ts-node": "8.10.2",
149149
"tslint": "6.1.3",
150150
"typedoc": "0.16.11",
151-
"typescript": "3.9.7",
151+
"typescript": "4.0.2",
152152
"watch": "1.0.2",
153153
"webpack": "4.44.1",
154154
"yargs": "15.4.1"

packages-exp/app-compat/.eslintrc.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
18+
module.exports = {
19+
extends: '../../config/.eslintrc.js',
20+
parserOptions: {
21+
project: 'tsconfig.json',
22+
// to make vscode-eslint work with monorepo
23+
// https://github.com/typescript-eslint/typescript-eslint/issues/251#issuecomment-463943250
24+
tsconfigRootDir: __dirname
25+
}
26+
};

packages-exp/app-compat/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @firebase/app-compat
2+
3+
This is the compat package that recreates the v7 APIs.
4+
5+
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**

packages-exp/app-compat/karma.conf.js

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
18+
const karmaBase = require('../../config/karma.base');
19+
20+
const files = ['test/**/*', 'src/**/*.test.ts'];
21+
22+
module.exports = function (config) {
23+
const karmaConfig = Object.assign({}, karmaBase, {
24+
// files to load into karma
25+
files: files,
26+
// frameworks to use
27+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
28+
preprocessors: { '**/*.ts': ['webpack', 'sourcemap'] },
29+
frameworks: ['mocha']
30+
});
31+
32+
config.set(karmaConfig);
33+
};
34+
35+
module.exports.files = files;

0 commit comments

Comments
 (0)