@firebase/firestore 3.8.1 → 3.8.2-20230201003102

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 (35) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/firestore/src/local/remote_document_cache.d.ts +5 -5
  3. package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
  4. package/dist/index.cjs.js +20635 -0
  5. package/dist/index.cjs.js.map +1 -0
  6. package/dist/index.esm2017.js +29 -27
  7. package/dist/index.esm2017.js.map +1 -1
  8. package/dist/index.esm5.js +140 -138
  9. package/dist/index.esm5.js.map +1 -1
  10. package/dist/index.node.cjs.js +22 -12
  11. package/dist/index.node.cjs.js.map +1 -1
  12. package/dist/index.node.mjs +22 -12
  13. package/dist/index.node.mjs.map +1 -1
  14. package/dist/index.rn.js +29 -27
  15. package/dist/index.rn.js.map +1 -1
  16. package/dist/internal.d.ts +3 -3
  17. package/dist/lite/firestore/src/local/remote_document_cache.d.ts +5 -5
  18. package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
  19. package/dist/lite/index.browser.esm2017.js +2 -2
  20. package/dist/lite/index.browser.esm2017.js.map +1 -1
  21. package/dist/lite/index.browser.esm5.js +2 -2
  22. package/dist/lite/index.browser.esm5.js.map +1 -1
  23. package/dist/lite/index.cjs.js +6954 -0
  24. package/dist/lite/index.cjs.js.map +1 -0
  25. package/dist/lite/index.node.cjs.js +2 -2
  26. package/dist/lite/index.node.mjs +2 -2
  27. package/dist/lite/index.node.mjs.map +1 -1
  28. package/dist/lite/index.rn.esm2017.js +2 -2
  29. package/dist/lite/index.rn.esm2017.js.map +1 -1
  30. package/dist/lite/packages/firestore/src/local/remote_document_cache.d.ts +5 -5
  31. package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
  32. package/dist/packages/firestore/src/local/remote_document_cache.d.ts +5 -5
  33. package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
  34. package/dist/private.d.ts +3 -3
  35. package/package.json +17 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @firebase/firestore
2
2
 
3
+ ## 3.8.2-20230201003102
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0bab0b7a7`](https://github.com/firebase/firebase-js-sdk/commit/0bab0b7a786d1563bf665904c7097d1fe06efce5) [#6981](https://github.com/firebase/firebase-js-sdk/pull/6981) - Added browser CJS entry points (expected by Jest when using JSDOM mode).
8
+
9
+ - [`27b5e7d70`](https://github.com/firebase/firebase-js-sdk/commit/27b5e7d7081688599fc518b329a43db4319cdd1f) [#6989](https://github.com/firebase/firebase-js-sdk/pull/6989) - Reduce memory usage by applying query check sooner in remote document cache.
10
+
11
+ - Updated dependencies [[`0bab0b7a7`](https://github.com/firebase/firebase-js-sdk/commit/0bab0b7a786d1563bf665904c7097d1fe06efce5)]:
12
+ - @firebase/util@1.9.1-20230201003102
13
+ - @firebase/app@0.9.2-20230201003102
14
+ - @firebase/component@0.6.2-20230201003102
15
+
3
16
  ## 3.8.1
4
17
 
5
18
  ### Patch Changes
@@ -14,11 +14,11 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { DocumentKeySet, MutableDocumentMap } from '../model/collections';
17
+ import { Query } from '../core/query';
18
+ import { DocumentKeySet, MutableDocumentMap, OverlayMap } from '../model/collections';
18
19
  import { MutableDocument } from '../model/document';
19
20
  import { DocumentKey } from '../model/document_key';
20
21
  import { IndexOffset } from '../model/field_index';
21
- import { ResourcePath } from '../model/path';
22
22
  import { IndexManager } from './index_manager';
23
23
  import { PersistencePromise } from './persistence_promise';
24
24
  import { PersistenceTransaction } from './persistence_transaction';
@@ -50,13 +50,13 @@ export interface RemoteDocumentCache {
50
50
  */
51
51
  getEntries(transaction: PersistenceTransaction, documentKeys: DocumentKeySet): PersistencePromise<MutableDocumentMap>;
52
52
  /**
53
- * Returns the documents from the provided collection.
53
+ * Returns the documents matching the given query
54
54
  *
55
- * @param collection - The collection to read.
55
+ * @param query - The query to match documents against.
56
56
  * @param offset - The offset to start the scan at (exclusive).
57
57
  * @returns The set of matching documents.
58
58
  */
59
- getAllFromCollection(transaction: PersistenceTransaction, collection: ResourcePath, offset: IndexOffset): PersistencePromise<MutableDocumentMap>;
59
+ getDocumentsMatchingQuery(transaction: PersistenceTransaction, query: Query, offset: IndexOffset, mutatedDocs: OverlayMap): PersistencePromise<MutableDocumentMap>;
60
60
  /**
61
61
  * Looks up the next `limit` documents for a collection group based on the
62
62
  * provided offset. The ordering is based on the document's read time and key.
@@ -14,15 +14,15 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
+ import { Query } from '../../../src/core/query';
17
18
  import { SnapshotVersion } from '../../../src/core/snapshot_version';
18
19
  import { IndexManager } from '../../../src/local/index_manager';
19
20
  import { Persistence } from '../../../src/local/persistence';
20
21
  import { RemoteDocumentChangeBuffer } from '../../../src/local/remote_document_change_buffer';
21
- import { DocumentKeySet, MutableDocumentMap } from '../../../src/model/collections';
22
+ import { DocumentKeySet, MutableDocumentMap, OverlayMap } from '../../../src/model/collections';
22
23
  import { MutableDocument } from '../../../src/model/document';
23
24
  import { DocumentKey } from '../../../src/model/document_key';
24
25
  import { IndexOffset } from '../../../src/model/field_index';
25
- import { ResourcePath } from '../../../src/model/path';
26
26
  /**
27
27
  * A wrapper around a RemoteDocumentCache that automatically creates a
28
28
  * transaction around every operation to reduce test boilerplate.
@@ -45,7 +45,7 @@ export declare class TestRemoteDocumentCache {
45
45
  removeEntry(documentKey: DocumentKey, version?: SnapshotVersion): Promise<void>;
46
46
  getEntry(documentKey: DocumentKey): Promise<MutableDocument>;
47
47
  getEntries(documentKeys: DocumentKeySet): Promise<MutableDocumentMap>;
48
- getAllFromCollection(collection: ResourcePath, offset: IndexOffset): Promise<MutableDocumentMap>;
48
+ getDocumentsMatchingQuery(query: Query, offset: IndexOffset, mutatedDocs: OverlayMap): Promise<MutableDocumentMap>;
49
49
  getAllFromCollectionGroup(collectionGroup: string, offset: IndexOffset, limit: number): Promise<MutableDocumentMap>;
50
50
  getSize(): Promise<number>;
51
51
  newChangeBuffer(options?: {