Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use closure-net as a dependency of Firestore #8190

Merged
merged 17 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/canary-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
with:
# Canary release script requires git history and tags.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -101,4 +102,4 @@ jobs:
-H "Accept:application/vnd.github.v3+json" \
-H "Authorization:Bearer $OSS_BOT_GITHUB_TOKEN" \
-d "{\"event_type\":\"canary-tests\", \"client_payload\":{\"versionOrTag\":\"$VERSION_OR_TAG\"}}" \
https://api.github.com/repos/firebase/firebase-js-sdk/dispatches
https://api.github.com/repos/firebase/firebase-js-sdk/dispatches
3 changes: 2 additions & 1 deletion .github/workflows/check-changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
# This makes Actions fetch all Git history so check_changeset script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -89,4 +90,4 @@ jobs:
# Don't want it to throw before editing the comment.
- name: Fail if checker script logged a blocking failure
if: ${{steps.check-changeset.outputs.BLOCKING_FAILURE == 'true'}}
run: exit 1
run: exit 1
3 changes: 2 additions & 1 deletion .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
with:
# get all history for the diff
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand All @@ -39,4 +40,4 @@ jobs:
run: git diff --exit-code docs-devsite
- name: Reference documentation needs to be updated. See message below.
if: ${{ failure() }}
run: echo "Changes in this PR affect the reference docs. Run \`yarn docgen devsite\` locally to regenerate docs and add them to this PR."
run: echo "Changes in this PR affect the reference docs. Run \`yarn docgen devsite\` locally to regenerate docs and add them to this PR."
3 changes: 2 additions & 1 deletion .github/workflows/check-pkg-paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand All @@ -38,4 +39,4 @@ jobs:
- name: Swap in public typings
run: yarn release:prepare
- name: Check paths
run: yarn ts-node scripts/ci-test/check-paths.ts
run: yarn ts-node scripts/ci-test/check-paths.ts
1 change: 1 addition & 0 deletions .github/workflows/deploy-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up node (20)
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@master
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
with:
# get all history for the diff
fetch-depth: 0
submodules: true
- name: Set up node (20)
uses: actions/setup-node@v3
with:
Expand All @@ -43,4 +44,4 @@ jobs:
run: git diff --exit-code
- name: Formatting needs to be updated. See message below.
if: ${{ failure() }}
run: echo "Something was changed by formatting. Run \`yarn format\` locally to do a prettier/license pass. Use \`yarn format --help\` to see options."
run: echo "Something was changed by formatting. Run \`yarn format\` locally to do a prettier/license pass. Use \`yarn format --help\` to see options."
4 changes: 4 additions & 0 deletions .github/workflows/health-metrics-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 20.x
Expand All @@ -56,6 +58,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 20.x
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up node (20)
uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/merge-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
uses: actions/checkout@master
with:
ref: release
submodules: true
- name: Get release version
id: get-version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prerelease-manual-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
# Canary release script requires git history and tags.
fetch-depth: 0
submodules: true
- name: Set up node (20)
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -93,4 +94,3 @@ jobs:
NPM_TOKEN_APP_CHECK_COMPAT: ${{ secrets.NPM_TOKEN_APP_CHECK_COMPAT }}
NPM_TOKEN_API_DOCUMENTER: ${{ secrets.NPM_TOKEN_API_DOCUMENTER }}
CI: true

2 changes: 2 additions & 0 deletions .github/workflows/release-log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
submodules: true

- name: Setup Node.js 20.x
uses: actions/setup-node@master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
submodules: true

- name: Setup Node.js 20.x
uses: actions/setup-node@master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.inputs.release-branch }}
token: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}
submodules: true
- name: Yarn install
run: yarn
- name: Publish to NPM
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
# Release script requires git history and tags.
fetch-depth: 0
ref: ${{ github.event.inputs.release-branch }}
submodules: true
- name: Yarn install
run: yarn
- name: Publish to NPM
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-tweet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
submodules: true
- name: Setup Node.js 20.x
uses: actions/setup-node@master
with:
Expand All @@ -52,4 +54,4 @@ jobs:
consumer-key: ${{ secrets.TWITTER_CONSUMER_KEY }}
consumer-secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
2 changes: 2 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
run: |
npx @puppeteer/browsers install chrome@stable
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-changed-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -88,6 +89,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-changed-fcm-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-changed-firestore-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- uses: 'google-github-actions/auth@v0'
if: ${{ fromJSON(env.run_terraform_steps) }}
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-changed-firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-changed-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand All @@ -48,4 +49,4 @@ jobs:
- name: Run tests
run: yarn test:changed misc
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/test-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -60,6 +61,7 @@ jobs:
uses: actions/checkout@master
with:
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-firebase-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
submodules: true
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
Expand All @@ -46,4 +47,4 @@ jobs:
- name: build
run: yarn build:changed firebase-integration
- name: Run tests on changed packages
run: yarn test:changed firebase-integration
run: yarn test:changed firebase-integration
3 changes: 2 additions & 1 deletion .github/workflows/update-api-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
# checkout HEAD commit instead of merge commit
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ github.token }}
submodules: true
- name: Set up node (20)
uses: actions/setup-node@v3
with:
Expand All @@ -45,4 +46,4 @@ jobs:
with:
add: 'common/api-review/*'
message: 'Update API reports'
default_author: github_actor
default_author: github_actor
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "packages/webchannel-wrapper/closure-net"]
path = packages/webchannel-wrapper/closure-net
url = https://github.com/google/closure-net.git
3 changes: 2 additions & 1 deletion packages/firestore/externs.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"packages/component/dist/src/provider.d.ts",
"packages/component/dist/src/component_container.d.ts",
"packages/logger/dist/src/logger.d.ts",
"packages/webchannel-wrapper/src/index.d.ts",
"packages/webchannel-wrapper/dist/bloom-blob/bloom_blob_types.d.ts",
"packages/webchannel-wrapper/dist/webchannel-blob/webchannel_blob_types.d.ts",
"packages/util/dist/src/crypt.d.ts",
"packages/util/dist/src/defaults.d.ts",
"packages/util/dist/src/emulator.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"@firebase/component": "0.6.6",
"@firebase/logger": "0.4.1",
"@firebase/util": "1.9.5",
"@firebase/webchannel-wrapper": "0.10.6",
"@firebase/webchannel-wrapper": "0.10.7",
ehsannas marked this conversation as resolved.
Show resolved Hide resolved
"@grpc/grpc-js": "~1.9.0",
"@grpc/proto-loader": "^0.7.8",
"undici": "5.28.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
StatEvent,
Event,
Stat
} from '@firebase/webchannel-wrapper';
} from '@firebase/webchannel-wrapper/webchannel-blob';
MarkDuckworth marked this conversation as resolved.
Show resolved Hide resolved

import { Token } from '../../api/credentials';
import { ExperimentalLongPollingOptions } from '../../api/long_polling_options';
Expand Down
3 changes: 2 additions & 1 deletion packages/firestore/src/remote/bloom_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Md5, Integer } from '@firebase/webchannel-wrapper';

import { Md5, Integer } from '@firebase/webchannel-wrapper/bloom-blob';

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// These tests are mostly to ensure that the exported classes correctly map to
// underlying functionality from google-closure-library.

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

import { newTextEncoder } from '../../../src/platform/text_serializer';
Expand Down
4 changes: 4 additions & 0 deletions packages/webchannel-wrapper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @firebase/webchannel-wrapper

## 0.10.7
ehsannas marked this conversation as resolved.
Show resolved Hide resolved

- Change the Closure library dependency to closure-net.

## 0.10.6

### Patch Changes
Expand Down
8 changes: 8 additions & 0 deletions packages/webchannel-wrapper/bloom-blob/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@firebase/webchannel-wrapper/bloom-blob",
"description": "Bloom filter related code from the Closure library.",
"browser": "../dist/bloom-blob/bloom_blob_es2018.js",
"module": "../dist/bloom-blob/bloom_blob_es2018.js",
"esm5": "../dist/bloom-blob/bloom_blob_es5.js",
"typings": "../dist/bloom-blob/bloom_blob_types.d.ts"
}
1 change: 1 addition & 0 deletions packages/webchannel-wrapper/closure-net
ehsannas marked this conversation as resolved.
Show resolved Hide resolved
Submodule closure-net added at 9844d6
19 changes: 0 additions & 19 deletions packages/webchannel-wrapper/externs/module.js

This file was deleted.

Loading
Loading