cozy-client 27.1.0 → 27.2.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [27.2.0](https://github.com/cozy/cozy-client/compare/v27.1.0...v27.2.0) (2021-11-15)
7
+
8
+
9
+ ### Features
10
+
11
+ * Be more explicit on query warning messages ([8d9b896](https://github.com/cozy/cozy-client/commit/8d9b896693f94898e610a79da69dda6bc0ad6f0a))
12
+
13
+
14
+
15
+
16
+
6
17
  # [27.1.0](https://github.com/cozy/cozy-client/compare/v27.0.1...v27.1.0) (2021-11-04)
7
18
 
8
19
  **Note:** Version bump only for package cozy-client
@@ -700,7 +700,7 @@ var CozyClient = /*#__PURE__*/function () {
700
700
  }, {
701
701
  key: "get",
702
702
  value: function get(doctype, id) {
703
- console.warn('client.get(doctype, id) is deprecated, please use Q(doctype).getById(id) to build the same query.');
703
+ console.warn("client.get(".concat(doctype, ", id) is deprecated, please use Q(").concat(doctype, ").getById(id) to build the same query."));
704
704
  return new _dsl.QueryDefinition({
705
705
  doctype: doctype,
706
706
  id: id
@@ -2415,7 +2415,7 @@ var CozyClient = /*#__PURE__*/function () {
2415
2415
  CozyClient.hooks = CozyClient.hooks || {};
2416
2416
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2417
2417
 
2418
- CozyClient.version = "27.1.0";
2418
+ CozyClient.version = "27.2.0";
2419
2419
 
2420
2420
  _microee.default.mixin(CozyClient);
2421
2421
 
@@ -120,13 +120,13 @@ var QueryDefinition = /*#__PURE__*/function () {
120
120
  }
121
121
 
122
122
  if (_sort.length > fieldsToIndex.length) {
123
- console.warn('You should not sort on non-indexed fields');
123
+ console.warn("You should not sort on non-indexed fields.\n\n Sort: ".concat(JSON.stringify(_sort), "\n\n Indexed fields: ").concat(fieldsToIndex));
124
124
  return;
125
125
  }
126
126
 
127
127
  for (var i = 0; i < _sort.length; i++) {
128
128
  if (Object.keys(_sort[i])[0] !== fieldsToIndex[i]) {
129
- console.warn('The sort order should be the same than the indexed fields');
129
+ console.warn("The sort order should be the same than the indexed fields.\n\n Sort: ".concat(JSON.stringify(_sort), "\n\n Indexed fields: ").concat(fieldsToIndex, "\n"));
130
130
  return;
131
131
  }
132
132
  }
@@ -146,13 +146,13 @@ var QueryDefinition = /*#__PURE__*/function () {
146
146
  var hasExistsFalse = (0, _findKey.default)(selector, ['$exists', false]);
147
147
 
148
148
  if (hasExistsFalse) {
149
- console.warn('The "$exists: false" predicate should be defined as a partial index for better performance');
149
+ console.warn("The \"$exists: false\" predicate should be defined as a partial index for better performance.\n\n Selector: ".concat(selector));
150
150
  }
151
151
 
152
152
  var hasNe = (0, _findKey.default)(selector, '$ne');
153
153
 
154
154
  if (hasNe) {
155
- console.info('The use of the $ne operator is more efficient with a partial index.');
155
+ console.info("The use of the $ne operator is more efficient with a partial index.\n\n Selector: ".concat(selector));
156
156
  }
157
157
  }
158
158
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "27.1.0",
3
+ "version": "27.2.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -68,5 +68,5 @@
68
68
  "react-native-inappbrowser-reborn": "^3.5.1"
69
69
  },
70
70
  "sideEffects": false,
71
- "gitHead": "b51301e21377602016243ed5a7d4d432075af7ef"
71
+ "gitHead": "3615a75a501a937ae3c73ada67d00b33d2ed7e62"
72
72
  }