@firebase/firestore 3.4.7-canary.e9e5f6b3c → 3.4.8

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 (36) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
  3. package/dist/firestore/src/local/simple_db.d.ts +2 -0
  4. package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
  5. package/dist/index.esm2017.js +153 -146
  6. package/dist/index.esm2017.js.map +1 -1
  7. package/dist/index.esm5.js +69 -65
  8. package/dist/index.esm5.js.map +1 -1
  9. package/dist/index.node.cjs.js +26 -9
  10. package/dist/index.node.cjs.js.map +1 -1
  11. package/dist/index.node.mjs +26 -9
  12. package/dist/index.node.mjs.map +1 -1
  13. package/dist/index.rn.js +14 -7
  14. package/dist/index.rn.js.map +1 -1
  15. package/dist/lite/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
  16. package/dist/lite/firestore/src/local/simple_db.d.ts +2 -0
  17. package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
  18. package/dist/lite/index.browser.esm2017.js +73 -73
  19. package/dist/lite/index.browser.esm2017.js.map +1 -1
  20. package/dist/lite/index.browser.esm5.js +8 -8
  21. package/dist/lite/index.browser.esm5.js.map +1 -1
  22. package/dist/lite/index.node.cjs.js +2 -2
  23. package/dist/lite/index.node.cjs.js.map +1 -1
  24. package/dist/lite/index.node.mjs +2 -2
  25. package/dist/lite/index.node.mjs.map +1 -1
  26. package/dist/lite/index.rn.esm2017.js +1112 -1112
  27. package/dist/lite/index.rn.esm2017.js.map +1 -1
  28. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +18 -18
  29. package/dist/lite/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
  30. package/dist/lite/packages/firestore/src/local/simple_db.d.ts +2 -0
  31. package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
  32. package/dist/packages/firestore/dist/index.esm2017.d.ts +8 -8
  33. package/dist/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
  34. package/dist/packages/firestore/src/local/simple_db.d.ts +2 -0
  35. package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
  36. package/package.json +9 -9
@@ -33,7 +33,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
33
33
  var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
34
34
 
35
35
  const name = "@firebase/firestore";
36
- const version$1 = "3.4.7-canary.e9e5f6b3c";
36
+ const version$1 = "3.4.8";
37
37
 
38
38
  /**
39
39
  * @license
@@ -86,7 +86,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
86
86
  User.FIRST_PARTY = new User('first-party-uid');
87
87
  User.MOCK_USER = new User('mock-user');
88
88
 
89
- const version = "9.6.10-canary.e9e5f6b3c";
89
+ const version = "9.6.11";
90
90
 
91
91
  /**
92
92
  * @license
@@ -2311,9 +2311,7 @@ class SimpleDbStore {
2311
2311
  cursor.continue(controller.skipToKey);
2312
2312
  }
2313
2313
  };
2314
- }).next(() => {
2315
- return PersistencePromise.waitFor(results);
2316
- });
2314
+ }).next(() => PersistencePromise.waitFor(results));
2317
2315
  }
2318
2316
  options(indexOrRange, range) {
2319
2317
  let indexName = undefined;
@@ -12327,12 +12325,31 @@ function dbCollectionGroupKey(collectionGroup, offset) {
12327
12325
  }
12328
12326
  /**
12329
12327
  * Comparator that compares document keys according to the primary key sorting
12330
- * used by the `DbRemoteDocumentDocument` store (by collection path and then
12331
- * document ID).
12328
+ * used by the `DbRemoteDocumentDocument` store (by prefix path, collection id
12329
+ * and then document ID).
12330
+ *
12331
+ * Visible for testing.
12332
12332
  */
12333
12333
  function dbKeyComparator(l, r) {
12334
- const cmp = l.path.length - r.path.length;
12335
- return cmp !== 0 ? cmp : DocumentKey.comparator(l, r);
12334
+ const left = l.path.toArray();
12335
+ const right = r.path.toArray();
12336
+ // The ordering is based on https://chromium.googlesource.com/chromium/blink/+/fe5c21fef94dae71c1c3344775b8d8a7f7e6d9ec/Source/modules/indexeddb/IDBKey.cpp#74
12337
+ let cmp = 0;
12338
+ for (let i = 0; i < left.length - 2 && i < right.length - 2; ++i) {
12339
+ cmp = primitiveComparator(left[i], right[i]);
12340
+ if (cmp) {
12341
+ return cmp;
12342
+ }
12343
+ }
12344
+ cmp = primitiveComparator(left.length, right.length);
12345
+ if (cmp) {
12346
+ return cmp;
12347
+ }
12348
+ cmp = primitiveComparator(left[left.length - 2], right[right.length - 2]);
12349
+ if (cmp) {
12350
+ return cmp;
12351
+ }
12352
+ return primitiveComparator(left[left.length - 1], right[right.length - 1]);
12336
12353
  }
12337
12354
  /**
12338
12355
  * Schema Version for the Web client: