Skip to content

Commit 7396d48

Browse files
Don't include GRPC in browser build (#2935)
1 parent 1562bb7 commit 7396d48

File tree

6 files changed

+1519
-1487
lines changed

6 files changed

+1519
-1487
lines changed

packages/firestore/test/integration/bootstrap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import '../../index';
2626

2727
// 'context()' definition requires additional dependency on webpack-env package.
2828
// eslint-disable-next-line @typescript-eslint/no-explicit-any
29-
const testsContext = (require as any).context('.', true, /.test$/);
29+
const testsContext = (require as any).context('.', true, /^((?!node).)*\.test$/);
3030
const browserTests = testsContext
3131
.keys()
32-
.filter((file: string) => file.indexOf('/node/') < 0);
32+
.filter((file: string) => !file.match(/([\/.])node([\/.])/));
3333
browserTests.forEach(testsContext);

packages/firestore/test/unit/bootstrap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 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.
@@ -26,8 +26,8 @@ import '../../src/platform_browser/browser_init';
2626

2727
// 'context()' definition requires additional dependency on webpack-env package.
2828
// eslint-disable-next-line @typescript-eslint/no-explicit-any
29-
const testsContext = (require as any).context('.', true, /.test$/);
29+
const testsContext = (require as any).context('.', true, /^((?!node).)*\.test$/);
3030
const browserTests = testsContext
3131
.keys()
32-
.filter((file: string) => file.indexOf('/node/') < 0);
32+
.filter((file: string) => !file.match(/([\/.])node([\/.])/));
3333
browserTests.forEach(testsContext);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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+
18+
import { serializerTest } from './serializer.helper';
19+
20+
serializerTest();

0 commit comments

Comments
 (0)