@firebase/firestore 3.12.1-canary.e642fc7cd → 3.12.1-canary.fe7da7ec3

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.
@@ -34,7 +34,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
34
34
  var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
35
35
 
36
36
  const name = "@firebase/firestore";
37
- const version$1 = "3.12.1-canary.e642fc7cd";
37
+ const version$1 = "3.12.1-canary.fe7da7ec3";
38
38
 
39
39
  /**
40
40
  * @license
@@ -87,7 +87,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
87
87
  User.FIRST_PARTY = new User('first-party-uid');
88
88
  User.MOCK_USER = new User('mock-user');
89
89
 
90
- const version = "9.22.1-canary.e642fc7cd";
90
+ const version = "9.22.1-canary.fe7da7ec3";
91
91
 
92
92
  /**
93
93
  * @license
@@ -11070,17 +11070,17 @@ class TargetIndexMatcher {
11070
11070
  return false;
11071
11071
  }
11072
11072
  const segments = fieldIndexGetDirectionalSegments(index);
11073
+ let equalitySegments = new Set();
11073
11074
  let segmentIndex = 0;
11074
11075
  let orderBysIndex = 0;
11075
11076
  // Process all equalities first. Equalities can appear out of order.
11076
11077
  for (; segmentIndex < segments.length; ++segmentIndex) {
11077
11078
  // We attempt to greedily match all segments to equality filters. If a
11078
11079
  // filter matches an index segment, we can mark the segment as used.
11079
- // Since it is not possible to use the same field path in both an equality
11080
- // and inequality/oderBy clause, we do not have to consider the possibility
11081
- // that a matching equality segment should instead be used to map to an
11082
- // inequality filter or orderBy clause.
11083
- if (!this.hasMatchingEqualityFilter(segments[segmentIndex])) {
11080
+ if (this.hasMatchingEqualityFilter(segments[segmentIndex])) {
11081
+ equalitySegments = equalitySegments.add(segments[segmentIndex].fieldPath.canonicalString());
11082
+ }
11083
+ else {
11084
11084
  // If we cannot find a matching filter, we need to verify whether the
11085
11085
  // remaining segments map to the target's inequality and its orderBy
11086
11086
  // clauses.
@@ -11093,13 +11093,16 @@ class TargetIndexMatcher {
11093
11093
  if (segmentIndex === segments.length) {
11094
11094
  return true;
11095
11095
  }
11096
- // If there is an inequality filter, the next segment must match both the
11097
- // filter and the first orderBy clause.
11098
11096
  if (this.inequalityFilter !== undefined) {
11099
- const segment = segments[segmentIndex];
11100
- if (!this.matchesFilter(this.inequalityFilter, segment) ||
11101
- !this.matchesOrderBy(this.orderBys[orderBysIndex++], segment)) {
11102
- return false;
11097
+ // If there is an inequality filter and the field was not in one of the
11098
+ // equality filters above, the next segment must match both the filter
11099
+ // and the first orderBy clause.
11100
+ if (!equalitySegments.has(this.inequalityFilter.field.canonicalString())) {
11101
+ const segment = segments[segmentIndex];
11102
+ if (!this.matchesFilter(this.inequalityFilter, segment) ||
11103
+ !this.matchesOrderBy(this.orderBys[orderBysIndex++], segment)) {
11104
+ return false;
11105
+ }
11103
11106
  }
11104
11107
  ++segmentIndex;
11105
11108
  }
@@ -27262,11 +27265,12 @@ function connectFirestoreEmulator(firestore, host, port, options = {}) {
27262
27265
  var _a;
27263
27266
  firestore = cast(firestore, Firestore$1);
27264
27267
  const settings = firestore._getSettings();
27265
- if (settings.host !== DEFAULT_HOST && settings.host !== host) {
27266
- logWarn('Host has been set in both settings() and useEmulator(), emulator host ' +
27267
- 'will be used');
27268
+ const newHostSetting = `${host}:${port}`;
27269
+ if (settings.host !== DEFAULT_HOST && settings.host !== newHostSetting) {
27270
+ logWarn('Host has been set in both settings() and connectFirestoreEmulator(), emulator host ' +
27271
+ 'will be used.');
27268
27272
  }
27269
- firestore._setSettings(Object.assign(Object.assign({}, settings), { host: `${host}:${port}`, ssl: false }));
27273
+ firestore._setSettings(Object.assign(Object.assign({}, settings), { host: newHostSetting, ssl: false }));
27270
27274
  if (options.mockUserToken) {
27271
27275
  let token;
27272
27276
  let user;