@firebase/firestore 3.8.3-canary.c8a6e08b0 → 3.8.3-canary.d5d78cbcf

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.
@@ -6,7 +6,7 @@ import { FirebaseError, getDefaultEmulatorHostnameAndPort, createMockUserToken,
6
6
  import nodeFetch from 'node-fetch';
7
7
  import { randomBytes as randomBytes$1 } from 'crypto';
8
8
 
9
- const version$1 = "3.8.3-canary.c8a6e08b0";
9
+ const version$1 = "3.8.3-canary.d5d78cbcf";
10
10
 
11
11
  /**
12
12
  * @license
@@ -59,7 +59,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
59
59
  User.FIRST_PARTY = new User('first-party-uid');
60
60
  User.MOCK_USER = new User('mock-user');
61
61
 
62
- const version = "9.17.1-canary.c8a6e08b0";
62
+ const version = "9.17.1-canary.d5d78cbcf";
63
63
 
64
64
  /**
65
65
  * @license
@@ -7660,45 +7660,26 @@ function validateDisjunctiveFilterElements(value, operator) {
7660
7660
  throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid Query. A non-empty array is required for ' +
7661
7661
  `'${operator.toString()}' filters.`);
7662
7662
  }
7663
- if (value.length > 10) {
7664
- throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid Query. '${operator.toString()}' filters support a ` +
7665
- 'maximum of 10 elements in the value array.');
7666
- }
7667
7663
  }
7668
7664
  /**
7669
7665
  * Given an operator, returns the set of operators that cannot be used with it.
7670
7666
  *
7671
- * Operators in a query must adhere to the following set of rules:
7672
- * 1. Only one array operator is allowed.
7673
- * 2. Only one disjunctive operator is allowed.
7674
- * 3. `NOT_EQUAL` cannot be used with another `NOT_EQUAL` operator.
7675
- * 4. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
7667
+ * This is not a comprehensive check, and this function should be removed in the
7668
+ * long term. Validations should occur in the Firestore backend.
7676
7669
  *
7677
- * Array operators: `ARRAY_CONTAINS`, `ARRAY_CONTAINS_ANY`
7678
- * Disjunctive operators: `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`
7670
+ * Operators in a query must adhere to the following set of rules:
7671
+ * 1. Only one inequality per query.
7672
+ * 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
7679
7673
  */
7680
7674
  function conflictingOps(op) {
7681
7675
  switch (op) {
7682
7676
  case "!=" /* Operator.NOT_EQUAL */:
7683
7677
  return ["!=" /* Operator.NOT_EQUAL */, "not-in" /* Operator.NOT_IN */];
7684
- case "array-contains" /* Operator.ARRAY_CONTAINS */:
7685
- return [
7686
- "array-contains" /* Operator.ARRAY_CONTAINS */,
7687
- "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
7688
- "not-in" /* Operator.NOT_IN */
7689
- ];
7690
- case "in" /* Operator.IN */:
7691
- return ["array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */, "in" /* Operator.IN */, "not-in" /* Operator.NOT_IN */];
7692
7678
  case "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */:
7693
- return [
7694
- "array-contains" /* Operator.ARRAY_CONTAINS */,
7695
- "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
7696
- "in" /* Operator.IN */,
7697
- "not-in" /* Operator.NOT_IN */
7698
- ];
7679
+ case "in" /* Operator.IN */:
7680
+ return ["not-in" /* Operator.NOT_IN */];
7699
7681
  case "not-in" /* Operator.NOT_IN */:
7700
7682
  return [
7701
- "array-contains" /* Operator.ARRAY_CONTAINS */,
7702
7683
  "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
7703
7684
  "in" /* Operator.IN */,
7704
7685
  "not-in" /* Operator.NOT_IN */,