Skip to content

Commit e109167

Browse files
Merge branch 'mrschmidt/standalonescript' into mrschmidt/apiextract
2 parents a85529e + 8a081c3 commit e109167

File tree

18 files changed

+65
-33
lines changed

18 files changed

+65
-33
lines changed

.changeset/blue-geese-approve.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/curvy-planets-sneeze.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/many-snails-kneel.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/proud-pigs-work.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@firebase/firestore": patch
3+
"@firebase/webchannel-wrapper": patch
4+
---
5+
6+
Fix an issue that prevented `experimentalAutoDetectLongPolling` from working correctly.

integration/firebase/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
88
},
99
"devDependencies": {
10-
"firebase": "8.0.2",
10+
"firebase": "8.1.0",
1111
"@types/chai": "4.2.14",
1212
"@types/mocha": "7.0.2",
1313
"chai": "4.2.0",

integration/firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"devDependencies": {
1717
"@firebase/app": "0.6.13",
18-
"@firebase/firestore": "2.0.2",
18+
"@firebase/firestore": "2.0.3",
1919
"@types/mocha": "7.0.2",
2020
"gulp": "4.0.2",
2121
"gulp-filter": "6.0.0",

integration/messaging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:manual": "mocha --exit"
1010
},
1111
"devDependencies": {
12-
"firebase": "8.0.2",
12+
"firebase": "8.1.0",
1313
"chai": "4.2.0",
1414
"chromedriver": "86.0.0",
1515
"express": "4.17.1",

packages-exp/firebase-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@firebase/app-compat": "0.0.900",
4242
"@firebase/auth-exp": "0.0.900",
4343
"@firebase/functions-exp": "0.0.900",
44-
"@firebase/firestore": "2.0.2",
44+
"@firebase/firestore": "2.0.3",
4545
"@firebase/performance-exp": "0.0.900",
4646
"@firebase/remote-config-exp": "0.0.900"
4747
},

packages/database/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Unreleased
22

3+
## 0.8.0
4+
5+
### Minor Changes
6+
7+
- [`34973cde2`](https://github.com/firebase/firebase-js-sdk/commit/34973cde218e570baccd235d5bb6c6146559f80b) [#3812](https://github.com/firebase/firebase-js-sdk/pull/3812) - Add a `get` method for database queries that returns server result when connected
8+
39
## 0.7.1
410

511
### Patch Changes

packages/database/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/database",
3-
"version": "0.7.1",
3+
"version": "0.8.0",
44
"description": "",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.node.cjs.js",

packages/firebase/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# firebase
22

3+
## 8.1.0
4+
5+
### Minor Changes
6+
7+
- [`34973cde2`](https://github.com/firebase/firebase-js-sdk/commit/34973cde218e570baccd235d5bb6c6146559f80b) [#3812](https://github.com/firebase/firebase-js-sdk/pull/3812) - Add a `get` method for database queries that returns server result when connected
8+
9+
### Patch Changes
10+
11+
- Updated dependencies [[`6c6c49ad6`](https://github.com/firebase/firebase-js-sdk/commit/6c6c49ad6b3c3d66e9ecb8397c4ac39bea256e80), [`e0bf3f70b`](https://github.com/firebase/firebase-js-sdk/commit/e0bf3f70bf82f3587e60ab4484fe37d01cea0051), [`34973cde2`](https://github.com/firebase/firebase-js-sdk/commit/34973cde218e570baccd235d5bb6c6146559f80b)]:
12+
- @firebase/firestore@2.0.3
13+
- @firebase/database@0.8.0
14+
315
## 8.0.2
416

517
### Patch Changes

packages/firebase/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firebase",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "Firebase JavaScript library for web and Node.js",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"license": "Apache-2.0",
@@ -48,8 +48,8 @@
4848
"@firebase/app": "0.6.13",
4949
"@firebase/app-types": "0.6.1",
5050
"@firebase/auth": "0.15.2",
51-
"@firebase/database": "0.7.1",
52-
"@firebase/firestore": "2.0.2",
51+
"@firebase/database": "0.8.0",
52+
"@firebase/firestore": "2.0.3",
5353
"@firebase/functions": "0.6.1",
5454
"@firebase/installations": "0.4.19",
5555
"@firebase/messaging": "0.7.3",

packages/firestore/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @firebase/firestore
22

3+
## 2.0.3
4+
5+
### Patch Changes
6+
7+
- [`6c6c49ad6`](https://github.com/firebase/firebase-js-sdk/commit/6c6c49ad6b3c3d66e9ecb8397c4ac39bea256e80) [#4053](https://github.com/firebase/firebase-js-sdk/pull/4053) - Internal changes for the upcoming modular API.
8+
9+
* [`e0bf3f70b`](https://github.com/firebase/firebase-js-sdk/commit/e0bf3f70bf82f3587e60ab4484fe37d01cea0051) [#4080](https://github.com/firebase/firebase-js-sdk/pull/4080) (fixes [#4071](https://github.com/firebase/firebase-js-sdk/issues/4071)) - Fixes a regression introduced in v8.0.2 that returned invalid values for `DocumentChange.newIndex`.
10+
311
## 2.0.2
412

513
### Patch Changes

packages/firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/firestore",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"engines": {
55
"node": "^8.13.0 || >=10.10.0"
66
},

packages/rules-unit-testing/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @firebase/rules-unit-testing
22

3+
## 1.1.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`34973cde2`](https://github.com/firebase/firebase-js-sdk/commit/34973cde218e570baccd235d5bb6c6146559f80b)]:
8+
9+
310
## 1.1.1
411

512
### Patch Changes

packages/rules-unit-testing/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/rules-unit-testing",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -19,7 +19,7 @@
1919
},
2020
"license": "Apache-2.0",
2121
"dependencies": {
22-
"firebase": "8.0.2",
22+
"firebase": "8.1.0",
2323
"@firebase/logger": "0.2.6",
2424
"@firebase/util": "0.3.4",
2525
"request": "2.88.2"

packages/rxfire/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"rxjs": "6.x.x"
4141
},
4242
"devDependencies": {
43-
"firebase": "8.0.2",
43+
"firebase": "8.1.0",
4444
"rollup": "2.33.2",
4545
"@rollup/plugin-commonjs": "15.1.0",
4646
"@rollup/plugin-node-resolve": "9.0.0",

scripts/size_report/report_binary_size.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { resolve } from 'path';
18+
import { resolve as pathResolve } from 'path';
1919
import * as fs from 'fs';
2020
import { execSync } from 'child_process';
2121
import * as terser from 'terser';
@@ -25,6 +25,8 @@ import {
2525
RequestBody,
2626
RequestEndpoint
2727
} from './size_report_helper';
28+
import * as rollup from 'rollup';
29+
import commonjs from '@rollup/plugin-commonjs';
2830

2931
interface Report {
3032
sdk: string;
@@ -38,7 +40,7 @@ interface BinarySizeRequestBody extends RequestBody {
3840
// CDN scripts
3941
function generateReportForCDNScripts(): Report[] {
4042
const reports = [];
41-
const firebaseRoot = resolve(__dirname, '../../packages/firebase');
43+
const firebaseRoot = pathResolve(__dirname, '../../packages/firebase');
4244
const pkgJson = require(`${firebaseRoot}/package.json`);
4345

4446
const special_files = [
@@ -103,8 +105,16 @@ async function generateReportForNPMPackages(): Promise<Report[]> {
103105

104106
for (const field of fields) {
105107
if (packageJson[field]) {
106-
const filePath = `${path}/${packageJson[field]}`;
107-
const rawCode = fs.readFileSync(filePath, 'utf-8');
108+
const filePath = pathResolve(path, packageJson[field]);
109+
// Need to create a bundle and get the size of the bundle instead of reading the size of the file directly.
110+
// It is because some packages might be split into multiple files in order to share code between entry points.
111+
const bundle = await rollup.rollup({
112+
input: filePath,
113+
plugins: [commonjs()]
114+
});
115+
116+
const { output } = await bundle.generate({ format: 'es' });
117+
const rawCode = output[0].code;
108118

109119
// remove comments and whitespaces, then get size
110120
const { code } = await terser.minify(rawCode, {
@@ -122,7 +132,6 @@ async function generateReportForNPMPackages(): Promise<Report[]> {
122132

123133
resolve();
124134
});
125-
126135
taskPromises.push(promise);
127136
}
128137
}

0 commit comments

Comments
 (0)