Skip to content

Commit 80dc41d

Browse files
committed
Address comments
1 parent 089fcdd commit 80dc41d

File tree

4 files changed

+73
-4
lines changed

4 files changed

+73
-4
lines changed

.changeset/lemon-steaks-draw.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
---
2-
2+
"@firebase/firestore": feature
33
---
4+
5+
Add support for loading Firestore Bundle Files.

packages/firestore/rollup.shared.js

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,74 @@ const manglePrivatePropertiesOptions = {
130130
mangle: {
131131
properties: {
132132
regex: /^__PRIVATE_/,
133-
reserved: ['do']
133+
// All JS Keywords are reserved. Although this should be taken cared of by
134+
// Terser, we have seen issues with `do`, hence the extra caution.
135+
reserved: [
136+
'abstract',
137+
'arguments',
138+
'await',
139+
'boolean',
140+
'break',
141+
'byte',
142+
'case',
143+
'catch',
144+
'char',
145+
'class',
146+
'const',
147+
'continue',
148+
'debugger',
149+
'default',
150+
'delete',
151+
'do',
152+
'double',
153+
'else',
154+
'enum',
155+
'eval',
156+
'export',
157+
'extends',
158+
'false',
159+
'final',
160+
'finally',
161+
'float',
162+
'for',
163+
'function',
164+
'goto',
165+
'if',
166+
'implements',
167+
'import',
168+
'in',
169+
'instanceof',
170+
'int',
171+
'interface',
172+
'let',
173+
'long',
174+
'native',
175+
'new',
176+
'null',
177+
'package',
178+
'private',
179+
'protected',
180+
'public',
181+
'return',
182+
'short',
183+
'static',
184+
'super',
185+
'switch',
186+
'synchronized',
187+
'this',
188+
'throw',
189+
'throws',
190+
'transient',
191+
'true',
192+
'try',
193+
'typeof',
194+
'var',
195+
'void',
196+
'volatile',
197+
'while',
198+
'with',
199+
'yield'
200+
]
134201
}
135202
}
136203
};

packages/firestore/src/local/local_store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ export async function ignoreIfPrimaryLeaseLoss(
12781278
* This ensures that the loaded documents do not get garbage collected
12791279
* right away.
12801280
*/
1281-
export function umbrellaTarget(bundleName: string): Target {
1281+
function umbrellaTarget(bundleName: string): Target {
12821282
// It is OK that the path used for the query is not valid, because this will
12831283
// not be read and queried.
12841284
return queryToTarget(

packages/firestore/src/local/shared_client_state_schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function createWebStorageOnlineStateKey(persistenceKey: string): string {
118118
// The WebStorage prefix that plays as a event to indicate the remote documents
119119
// might have changed due to some secondary tabs loading a bundle.
120120
// format of the key is:
121-
// firestore_remote_documents_changed_<persistenceKey>
121+
// firestore_bundle_loaded_<persistenceKey>
122122
export const BUNDLE_LOADED_KEY_PREFIX = 'firestore_bundle_loaded';
123123
export function createBundleLoadedKey(persistenceKey: string): string {
124124
return `${BUNDLE_LOADED_KEY_PREFIX}_${persistenceKey}`;

0 commit comments

Comments
 (0)