Skip to content

Commit 4b49630

Browse files
ehsannashsubox76
andauthored
Use closure-net as a dependency of Firestore (#8190)
* Add closure library blobs as Firestore dependency. * Remove our compilation of Closure. * Add closure-net as a git submodule. * remove temporary .only in test. * prettier. * add yarn.lock differences. * create a types.d.ts for the webchannel-wrapper package. * Bring back the aggregated types and implementations for size report. * Undo CI changes for git submodules. * Remove the git submodule. * Use git+https in package.json devDependencies. * prettier. * Set up rollup for webchannel-wrapper (#8203) * convert webchannel-wrapper package to use rollup * clean up rollup config * formatting * Create thick-spoons-check.md * Better changeset. * Address feedback on versioning. --------- Co-authored-by: Christina Holland <[email protected]>
1 parent 7709f10 commit 4b49630

File tree

18 files changed

+147
-668
lines changed

18 files changed

+147
-668
lines changed

.changeset/thick-spoons-check.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@firebase/firestore": patch
3+
"@firebase/webchannel-wrapper": major
4+
---
5+
6+
Use closure-net as a dependency of webchannel-wrapper and Firestore.

.gitmodules

Whitespace-only changes.

packages/firestore/externs.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"packages/component/dist/src/provider.d.ts",
2525
"packages/component/dist/src/component_container.d.ts",
2626
"packages/logger/dist/src/logger.d.ts",
27-
"packages/webchannel-wrapper/src/index.d.ts",
27+
"packages/webchannel-wrapper/dist/bloom-blob/bloom_blob_types.d.ts",
28+
"packages/webchannel-wrapper/dist/webchannel-blob/webchannel_blob_types.d.ts",
2829
"packages/util/dist/src/crypt.d.ts",
2930
"packages/util/dist/src/defaults.d.ts",
3031
"packages/util/dist/src/emulator.d.ts",

packages/firestore/src/platform/browser/webchannel_connection.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ import {
2727
EventTarget,
2828
StatEvent,
2929
Event,
30-
Stat,
31-
FetchXmlHttpFactory
32-
} from '@firebase/webchannel-wrapper';
30+
FetchXmlHttpFactory,
31+
Stat
32+
} from '@firebase/webchannel-wrapper/webchannel-blob';
3333

3434
import { Token } from '../../api/credentials';
3535
import { ExperimentalLongPollingOptions } from '../../api/long_polling_options';

packages/firestore/src/remote/bloom_filter.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
import { Md5, Integer } from '@firebase/webchannel-wrapper';
17+
18+
import { Md5, Integer } from '@firebase/webchannel-wrapper/bloom-blob';
1819

1920
import { newTextEncoder } from '../platform/text_serializer';
2021

packages/firestore/test/unit/core/webchannel_wrapper.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// These tests are mostly to ensure that the exported classes correctly map to
2020
// underlying functionality from google-closure-library.
2121

22-
import { Md5, Integer } from '@firebase/webchannel-wrapper';
22+
import { Md5, Integer } from '@firebase/webchannel-wrapper/bloom-blob';
2323
import { expect } from 'chai';
2424

2525
import { newTextEncoder } from '../../../src/platform/text_serializer';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "@firebase/webchannel-wrapper/bloom-blob",
3+
"description": "Bloom filter related code from the Closure library.",
4+
"main": "../dist/bloom-blob/bloom_blob_es2018.js",
5+
"browser": "../dist/bloom-blob/esm/bloom_blob_es2018.js",
6+
"module": "../dist/bloom-blob/esm/bloom_blob_es2018.js",
7+
"esm5": "../dist/bloom-blob/bloom_blob_es5.js",
8+
"typings": "../dist/bloom-blob/bloom_blob_types.d.ts"
9+
}

packages/webchannel-wrapper/externs/module.js renamed to packages/webchannel-wrapper/empty.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2020 Google LLC
3+
* Copyright 2024 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -15,5 +15,10 @@
1515
* limitations under the License.
1616
*/
1717

18-
/** @type {!Object} */
19-
const module = {};
18+
/**
19+
* This package has no main entry point and only allows imports from its
20+
* two subpaths. This file is provided for the top-level package.json
21+
* "main" field to point to.
22+
*/
23+
24+
export default {};

packages/webchannel-wrapper/externs/overrides.js

-86
This file was deleted.

packages/webchannel-wrapper/gulpfile.js

-218
This file was deleted.

0 commit comments

Comments
 (0)