@firebase/firestore 3.0.1 → 3.0.2-canary.07b88e6e8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/firestore/compat/api/blob.d.ts +29 -0
  3. package/dist/firestore/compat/api/database.d.ts +228 -0
  4. package/dist/firestore/compat/api/field_path.d.ts +36 -0
  5. package/dist/firestore/compat/api/field_value.d.ts +29 -0
  6. package/dist/firestore/compat/api/geo_point.d.ts +17 -0
  7. package/dist/firestore/compat/api/observer.d.ts +29 -0
  8. package/dist/firestore/compat/api/timestamp.d.ts +17 -0
  9. package/dist/firestore/compat/config.d.ts +28 -0
  10. package/dist/firestore/compat/index.console.d.ts +42 -0
  11. package/dist/firestore/compat/index.d.ts +49 -0
  12. package/dist/firestore/compat/index.node.d.ts +22 -0
  13. package/dist/firestore/compat/index.rn.d.ts +22 -0
  14. package/dist/firestore/compat/register-module.d.ts +42 -0
  15. package/dist/firestore/compat/util/input_validation.d.ts +18 -0
  16. package/dist/firestore/src/api/credentials.d.ts +4 -1
  17. package/dist/firestore/src/api.d.ts +1 -0
  18. package/dist/firestore/src/model/mutation.d.ts +4 -4
  19. package/dist/firestore/test/integration/api_internal/auth.test.d.ts +17 -0
  20. package/dist/firestore/test/util/api_helpers.d.ts +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.esm2017.js +2617 -2615
  23. package/dist/index.esm2017.js.map +1 -1
  24. package/dist/index.esm5.js +2721 -2738
  25. package/dist/index.esm5.js.map +1 -1
  26. package/dist/index.node.cjs.esm2017.js +47 -41
  27. package/dist/index.node.cjs.esm2017.js.map +1 -1
  28. package/dist/index.node.cjs.js +75 -79
  29. package/dist/index.node.cjs.js.map +1 -1
  30. package/dist/index.rn.js +2627 -2625
  31. package/dist/index.rn.js.map +1 -1
  32. package/dist/internal.d.ts +12 -1
  33. package/dist/lite/firestore/compat/api/blob.d.ts +29 -0
  34. package/dist/lite/firestore/compat/api/database.d.ts +228 -0
  35. package/dist/lite/firestore/compat/api/field_path.d.ts +36 -0
  36. package/dist/lite/firestore/compat/api/field_value.d.ts +29 -0
  37. package/dist/lite/firestore/compat/api/geo_point.d.ts +17 -0
  38. package/dist/lite/firestore/compat/api/observer.d.ts +29 -0
  39. package/dist/lite/firestore/compat/api/timestamp.d.ts +17 -0
  40. package/dist/lite/firestore/compat/config.d.ts +28 -0
  41. package/dist/lite/firestore/compat/index.console.d.ts +42 -0
  42. package/dist/lite/firestore/compat/index.d.ts +49 -0
  43. package/dist/lite/firestore/compat/index.node.d.ts +22 -0
  44. package/dist/lite/firestore/compat/index.rn.d.ts +22 -0
  45. package/dist/lite/firestore/compat/register-module.d.ts +42 -0
  46. package/dist/lite/firestore/compat/util/input_validation.d.ts +18 -0
  47. package/dist/lite/firestore/src/api/credentials.d.ts +4 -1
  48. package/dist/lite/firestore/src/api.d.ts +1 -0
  49. package/dist/lite/firestore/src/model/mutation.d.ts +4 -4
  50. package/dist/lite/firestore/test/integration/api_internal/auth.test.d.ts +17 -0
  51. package/dist/lite/firestore/test/util/api_helpers.d.ts +1 -1
  52. package/dist/lite/index.browser.esm2017.js +848 -845
  53. package/dist/lite/index.browser.esm2017.js.map +1 -1
  54. package/dist/lite/index.browser.esm5.js +815 -815
  55. package/dist/lite/index.browser.esm5.js.map +1 -1
  56. package/dist/lite/index.node.cjs.js +8 -5
  57. package/dist/lite/index.node.cjs.js.map +1 -1
  58. package/dist/lite/index.node.esm2017.js +9 -6
  59. package/dist/lite/index.node.esm2017.js.map +1 -1
  60. package/dist/lite/index.rn.esm2017.js +832 -829
  61. package/dist/lite/index.rn.esm2017.js.map +1 -1
  62. package/dist/lite/internal.d.ts +1 -1
  63. package/dist/lite/packages/firestore/compat/api/blob.d.ts +29 -0
  64. package/dist/lite/packages/firestore/compat/api/database.d.ts +228 -0
  65. package/dist/lite/packages/firestore/compat/api/field_path.d.ts +36 -0
  66. package/dist/lite/packages/firestore/compat/api/field_value.d.ts +29 -0
  67. package/dist/lite/packages/firestore/compat/api/geo_point.d.ts +17 -0
  68. package/dist/lite/packages/firestore/compat/api/observer.d.ts +29 -0
  69. package/dist/lite/packages/firestore/compat/api/timestamp.d.ts +17 -0
  70. package/dist/lite/packages/firestore/compat/config.d.ts +28 -0
  71. package/dist/lite/packages/firestore/compat/index.console.d.ts +42 -0
  72. package/dist/lite/packages/firestore/compat/index.d.ts +49 -0
  73. package/dist/lite/packages/firestore/compat/index.node.d.ts +22 -0
  74. package/dist/lite/packages/firestore/compat/index.rn.d.ts +22 -0
  75. package/dist/lite/packages/firestore/compat/register-module.d.ts +42 -0
  76. package/dist/lite/packages/firestore/compat/util/input_validation.d.ts +18 -0
  77. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +112 -112
  78. package/dist/lite/packages/firestore/rollup.config.debug.d.ts +14 -0
  79. package/dist/lite/packages/firestore/rollup.shared.d.ts +4 -10
  80. package/dist/lite/packages/firestore/src/api/credentials.d.ts +4 -1
  81. package/dist/lite/packages/firestore/src/api.d.ts +1 -0
  82. package/dist/lite/packages/firestore/src/model/mutation.d.ts +4 -4
  83. package/dist/lite/packages/firestore/test/integration/api_internal/auth.test.d.ts +17 -0
  84. package/dist/lite/packages/firestore/test/util/api_helpers.d.ts +1 -1
  85. package/dist/lite/private.d.ts +1 -1
  86. package/dist/packages/firestore/compat/api/blob.d.ts +29 -0
  87. package/dist/packages/firestore/compat/api/database.d.ts +228 -0
  88. package/dist/packages/firestore/compat/api/field_path.d.ts +36 -0
  89. package/dist/packages/firestore/compat/api/field_value.d.ts +29 -0
  90. package/dist/packages/firestore/compat/api/geo_point.d.ts +17 -0
  91. package/dist/packages/firestore/compat/api/observer.d.ts +29 -0
  92. package/dist/packages/firestore/compat/api/timestamp.d.ts +17 -0
  93. package/dist/packages/firestore/compat/config.d.ts +28 -0
  94. package/dist/packages/firestore/compat/index.console.d.ts +42 -0
  95. package/dist/packages/firestore/compat/index.d.ts +49 -0
  96. package/dist/packages/firestore/compat/index.node.d.ts +22 -0
  97. package/dist/packages/firestore/compat/index.rn.d.ts +22 -0
  98. package/dist/packages/firestore/compat/register-module.d.ts +42 -0
  99. package/dist/packages/firestore/compat/util/input_validation.d.ts +18 -0
  100. package/dist/packages/firestore/dist/index.esm2017.d.ts +165 -156
  101. package/dist/packages/firestore/dist/index.node.cjs.esm2017.d.ts +11 -1
  102. package/dist/packages/firestore/rollup.config.debug.d.ts +14 -0
  103. package/dist/packages/firestore/rollup.shared.d.ts +4 -10
  104. package/dist/packages/firestore/src/api/credentials.d.ts +4 -1
  105. package/dist/packages/firestore/src/api.d.ts +1 -0
  106. package/dist/packages/firestore/src/model/mutation.d.ts +4 -4
  107. package/dist/packages/firestore/test/integration/api_internal/auth.test.d.ts +17 -0
  108. package/dist/packages/firestore/test/util/api_helpers.d.ts +1 -1
  109. package/dist/private.d.ts +3 -1
  110. package/package.json +20 -17
@@ -726,6 +726,16 @@ declare class DocumentKey {
726
726
  isEqual(other: any): boolean;
727
727
  toString(): any;
728
728
  }
729
+ /**
730
+ * A CredentialsProvider that always yields an empty token.
731
+ * @internal
732
+ */
733
+ declare class EmptyCredentialsProvider {
734
+ getToken(): Promise<null>;
735
+ invalidateToken(): void;
736
+ start(asyncQueue: any, changeListener: any): void;
737
+ shutdown(): void;
738
+ }
729
739
  /**
730
740
  * A dot-separated path for navigating sub-objects within a document.
731
741
  * @internal
@@ -1831,4 +1841,4 @@ declare class FieldTransform {
1831
1841
  field: any;
1832
1842
  transform: any;
1833
1843
  }
1834
- export { DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, FieldPath$1 as _FieldPath, cast as _cast, debugAssert as _debugAssert, isBase64Available as _isBase64Available, logWarn as _logWarn, validateIsNotUsedTogether as _validateIsNotUsedTogether };
1844
+ export { DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, EmptyCredentialsProvider as _EmptyCredentialsProvider, FieldPath$1 as _FieldPath, cast as _cast, debugAssert as _debugAssert, isBase64Available as _isBase64Available, logWarn as _logWarn, validateIsNotUsedTogether as _validateIsNotUsedTogether };
@@ -0,0 +1,14 @@
1
+ declare var _default: {
2
+ input: string;
3
+ output: {
4
+ file: any;
5
+ format: string;
6
+ sourcemap: boolean;
7
+ };
8
+ plugins: import("rollup").Plugin[];
9
+ external: (id: any) => boolean;
10
+ treeshake: {
11
+ moduleSideEffects: boolean;
12
+ };
13
+ }[];
14
+ export default _default;
@@ -24,14 +24,6 @@ export function removeAssertTransformer(service: any): {
24
24
  before: typescript.TransformerFactory<typescript.SourceFile>[];
25
25
  after: never[];
26
26
  };
27
- /**
28
- * Transformer that coverts import paths that match `exp/index` to `@firebase/firestore`
29
- * and `lite/index` to `@firebase/firestore/lite`
30
- */
31
- export function importTransformer(service: any): {
32
- before: typescript.TransformerFactory<typescript.SourceFile>[];
33
- after: never[];
34
- };
35
27
  /**
36
28
  * Transformers that remove calls to `debugAssert`, messages for 'fail` and
37
29
  * `hardAssert` and appends a __PRIVATE_ prefix to all internal symbols.
@@ -46,9 +38,11 @@ export namespace manglePrivatePropertiesOptions {
46
38
  const beautify: boolean;
47
39
  }
48
40
  namespace mangle {
41
+ const reserved: string[];
49
42
  namespace properties {
50
- const regex: RegExp;
51
- const reserved: string[];
43
+ export const regex: RegExp;
44
+ const reserved_1: string[];
45
+ export { reserved_1 as reserved };
52
46
  }
53
47
  }
54
48
  }
@@ -80,7 +80,10 @@ export interface CredentialsProvider {
80
80
  invalidateToken(): void;
81
81
  shutdown(): void;
82
82
  }
83
- /** A CredentialsProvider that always yields an empty token. */
83
+ /**
84
+ * A CredentialsProvider that always yields an empty token.
85
+ * @internal
86
+ */
84
87
  export declare class EmptyCredentialsProvider implements CredentialsProvider {
85
88
  getToken(): Promise<Token | null>;
86
89
  invalidateToken(): void;
@@ -47,3 +47,4 @@ export { FieldPath as _FieldPath } from './model/path';
47
47
  export type { ResourcePath as _ResourcePath } from './model/path';
48
48
  export type { ByteString as _ByteString } from './util/byte_string';
49
49
  export { logWarn as _logWarn } from './util/log';
50
+ export { EmptyCredentialsProvider as _EmptyCredentialsProvider } from './api/credentials';
@@ -141,7 +141,7 @@ export declare function preconditionIsValidForDocument(precondition: Preconditio
141
141
  *
142
142
  * Every type of mutation needs to implement its own applyToRemoteDocument() and
143
143
  * applyToLocalView() to implement the actual behavior of applying the mutation
144
- * to some source document (see `applySetMutationToRemoteDocument()` for an
144
+ * to some source document (see `setMutationApplyToRemoteDocument()` for an
145
145
  * example).
146
146
  */
147
147
  export declare abstract class Mutation {
@@ -162,7 +162,7 @@ export declare abstract class Mutation {
162
162
  * of the document.
163
163
  * @param mutationResult - The result of applying the mutation from the backend.
164
164
  */
165
- export declare function applyMutationToRemoteDocument(mutation: Mutation, document: MutableDocument, mutationResult: MutationResult): void;
165
+ export declare function mutationApplyToRemoteDocument(mutation: Mutation, document: MutableDocument, mutationResult: MutationResult): void;
166
166
  /**
167
167
  * Applies this mutation to the given document for the purposes of computing
168
168
  * the new local view of a document. If the input document doesn't match the
@@ -175,7 +175,7 @@ export declare function applyMutationToRemoteDocument(mutation: Mutation, docume
175
175
  * @param localWriteTime - A timestamp indicating the local write time of the
176
176
  * batch this mutation is a part of.
177
177
  */
178
- export declare function applyMutationToLocalView(mutation: Mutation, document: MutableDocument, localWriteTime: Timestamp): void;
178
+ export declare function mutationApplyToLocalView(mutation: Mutation, document: MutableDocument, localWriteTime: Timestamp): void;
179
179
  /**
180
180
  * If this mutation is not idempotent, returns the base value to persist with
181
181
  * this mutation. If a base value is returned, the mutation is always applied
@@ -192,7 +192,7 @@ export declare function applyMutationToLocalView(mutation: Mutation, document: M
192
192
  * @returns a base value to store along with the mutation, or null for
193
193
  * idempotent mutations.
194
194
  */
195
- export declare function extractMutationBaseValue(mutation: Mutation, document: Document): ObjectValue | null;
195
+ export declare function mutationExtractBaseValue(mutation: Mutation, document: Document): ObjectValue | null;
196
196
  export declare function mutationEquals(left: Mutation, right: Mutation): boolean;
197
197
  /**
198
198
  * A mutation that creates or replaces the document at the given key with the
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 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
+ export {};
@@ -20,7 +20,7 @@ import { JsonObject } from '../../src/model/object_value';
20
20
  /**
21
21
  * A mock Firestore. Will not work for integration test.
22
22
  */
23
- export declare const FIRESTORE: any;
23
+ export declare const FIRESTORE: Firestore;
24
24
  export declare function firestore(): Firestore;
25
25
  export declare function newTestFirestore(projectId?: string): Firestore;
26
26
  export declare function collectionReference(path: string): CollectionReference;
package/dist/private.d.ts CHANGED
@@ -1039,6 +1039,8 @@ declare interface DocumentViewChange {
1039
1039
  type: ChangeType;
1040
1040
  doc: Document_2;
1041
1041
  }
1042
+
1043
+ /* Excluded from this release type: _EmptyCredentialsProvider */
1042
1044
  export { EmulatorMockTokenOptions }
1043
1045
 
1044
1046
  /**
@@ -2506,7 +2508,7 @@ declare type MutableDocumentMap = SortedMap<_DocumentKey, MutableDocument>;
2506
2508
  *
2507
2509
  * Every type of mutation needs to implement its own applyToRemoteDocument() and
2508
2510
  * applyToLocalView() to implement the actual behavior of applying the mutation
2509
- * to some source document (see `applySetMutationToRemoteDocument()` for an
2511
+ * to some source document (see `setMutationApplyToRemoteDocument()` for an
2510
2512
  * example).
2511
2513
  */
2512
2514
  declare abstract class Mutation {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/firestore",
3
- "version": "3.0.1",
3
+ "version": "3.0.2-canary.07b88e6e8",
4
4
  "engines": {
5
5
  "node": "^8.13.0 || >=10.10.0"
6
6
  },
@@ -8,13 +8,14 @@
8
8
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
9
9
  "scripts": {
10
10
  "bundle": "rollup -c",
11
- "prebuild": "tsc --emitDeclarationOnly --declaration -p tsconfig.json; yarn api-report",
11
+ "prebuild": "yarn test:prepare && tsc --emitDeclarationOnly --declaration -p tsconfig.json; yarn api-report",
12
12
  "build": "run-p build:lite build:main",
13
13
  "build:release": "yarn build && yarn typings:public",
14
14
  "build:scripts": "tsc -moduleResolution node --module commonjs scripts/*.ts && ls scripts/*.js | xargs -I % sh -c 'terser % -o %'",
15
15
  "build:deps": "lerna run --scope @firebase/firestore --include-dependencies build",
16
16
  "build:main": "rollup -c rollup.config.js",
17
17
  "build:lite": "rollup -c rollup.config.lite.js",
18
+ "build:debug": "rollup -c rollup.config.debug.js",
18
19
  "predev": "yarn prebuild",
19
20
  "dev": "rollup -c -w",
20
21
  "lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
@@ -27,7 +28,8 @@
27
28
  "pretest": "yarn test:prepare",
28
29
  "pretest:ci": "yarn pretest",
29
30
  "test": "run-s lint test:all",
30
- "test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
31
+ "test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all:ci",
32
+ "test:all:ci": "run-p test:browser test:lite:browser test:travis",
31
33
  "test:all": "run-p test:browser test:lite:browser test:travis test:minified",
32
34
  "test:browser": "karma start --single-run",
33
35
  "test:browser:debug": "karma start --browsers=Chrome --auto-watch",
@@ -43,7 +45,7 @@
43
45
  "api-report": "run-s api-report:main api-report:lite && yarn api-report:api-json",
44
46
  "doc": "api-documenter markdown --input temp --output docs",
45
47
  "test:prepare": "node ./scripts/prepare-test.js",
46
- "typings:public": "node ../../scripts/exp/use_typings.js ./dist/index.d.ts"
48
+ "typings:public": "node ../../scripts/build/use_typings.js ./dist/index.d.ts"
47
49
  },
48
50
  "exports": {
49
51
  ".": {
@@ -67,35 +69,36 @@
67
69
  "lite/package.json"
68
70
  ],
69
71
  "dependencies": {
70
- "@firebase/component": "0.5.6",
71
- "@firebase/logger": "0.2.6",
72
- "@firebase/util": "1.3.0",
73
- "@firebase/webchannel-wrapper": "0.5.1",
72
+ "@firebase/component": "0.5.6-canary.07b88e6e8",
73
+ "@firebase/logger": "0.2.6-canary.07b88e6e8",
74
+ "@firebase/util": "1.3.0-canary.07b88e6e8",
75
+ "@firebase/webchannel-wrapper": "0.5.1-canary.07b88e6e8",
74
76
  "@grpc/grpc-js": "^1.3.2",
75
77
  "@grpc/proto-loader": "^0.6.0",
76
- "node-fetch": "2.6.1",
78
+ "node-fetch": "2.6.2",
77
79
  "tslib": "^2.1.0"
78
80
  },
79
81
  "peerDependencies": {
80
- "@firebase/app": "0.x"
82
+ "@firebase/app": "0.7.0-canary.07b88e6e8"
81
83
  },
82
84
  "devDependencies": {
83
- "@firebase/app": "0.7.0",
84
- "@firebase/app-compat": "0.1.1",
85
- "@rollup/plugin-alias": "3.1.2",
85
+ "@firebase/app": "0.7.0-canary.07b88e6e8",
86
+ "@firebase/app-compat": "0.1.1-canary.07b88e6e8",
87
+ "@firebase/auth": "0.17.2-canary.07b88e6e8",
88
+ "@rollup/plugin-alias": "3.1.5",
86
89
  "@rollup/plugin-json": "4.1.0",
87
- "@types/eslint": "7.2.10",
88
- "@types/json-stable-stringify": "1.0.32",
90
+ "@types/eslint": "7.28.0",
91
+ "@types/json-stable-stringify": "1.0.33",
89
92
  "json-stable-stringify": "1.0.1",
90
93
  "protobufjs": "6.11.2",
91
- "rollup": "2.52.2",
94
+ "rollup": "2.56.3",
92
95
  "rollup-plugin-copy": "3.4.0",
93
96
  "rollup-plugin-copy-assets": "2.0.3",
94
97
  "rollup-plugin-replace": "2.2.0",
95
98
  "rollup-plugin-sourcemaps": "0.6.3",
96
99
  "rollup-plugin-terser": "7.0.2",
97
100
  "rollup-plugin-typescript2": "0.30.0",
98
- "ts-node": "9.1.1",
101
+ "ts-node": "10.2.1",
99
102
  "typescript": "4.2.2"
100
103
  },
101
104
  "repository": {