@feathersjs/client 5.0.0-pre.24 → 5.0.0-pre.27

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,30 @@
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
+ # [5.0.0-pre.27](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.26...v5.0.0-pre.27) (2022-07-13)
7
+
8
+ **Note:** Version bump only for package @feathersjs/client
9
+
10
+
11
+
12
+
13
+
14
+ # [5.0.0-pre.26](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.25...v5.0.0-pre.26) (2022-06-22)
15
+
16
+ **Note:** Version bump only for package @feathersjs/client
17
+
18
+
19
+
20
+
21
+
22
+ # [5.0.0-pre.25](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.24...v5.0.0-pre.25) (2022-06-22)
23
+
24
+ **Note:** Version bump only for package @feathersjs/client
25
+
26
+
27
+
28
+
29
+
6
30
  # [5.0.0-pre.24](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.23...v5.0.0-pre.24) (2022-06-21)
7
31
 
8
32
  **Note:** Version bump only for package @feathersjs/client
package/dist/feathers.js CHANGED
@@ -223,7 +223,7 @@ var AuthenticationClient = /*#__PURE__*/function () {
223
223
  var authPromise = this.app.get('authentication');
224
224
 
225
225
  if (!authPromise || force === true) {
226
- return this.getAccessToken().then(function (accessToken) {
226
+ authPromise = this.getAccessToken().then(function (accessToken) {
227
227
  if (!accessToken) {
228
228
  throw new errors_1.NotAuthenticated('No accessToken found in storage');
229
229
  }
@@ -233,6 +233,7 @@ var AuthenticationClient = /*#__PURE__*/function () {
233
233
  accessToken: accessToken
234
234
  });
235
235
  });
236
+ this.app.set('authentication', authPromise);
236
237
  }
237
238
 
238
239
  return authPromise;
@@ -4953,6 +4954,7 @@ var stringify = function stringify(
4953
4954
  object,
4954
4955
  prefix,
4955
4956
  generateArrayPrefix,
4957
+ commaRoundTrip,
4956
4958
  strictNullHandling,
4957
4959
  skipNulls,
4958
4960
  encoder,
@@ -5017,7 +5019,7 @@ var stringify = function stringify(
5017
5019
  for (var i = 0; i < valuesArray.length; ++i) {
5018
5020
  valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
5019
5021
  }
5020
- return [formatter(keyValue) + (isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
5022
+ return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
5021
5023
  }
5022
5024
  return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
5023
5025
  }
@@ -5041,7 +5043,7 @@ var stringify = function stringify(
5041
5043
  objKeys = sort ? keys.sort(sort) : keys;
5042
5044
  }
5043
5045
 
5044
- var adjustedPrefix = generateArrayPrefix === 'comma' && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
5046
+ var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
5045
5047
 
5046
5048
  for (var j = 0; j < objKeys.length; ++j) {
5047
5049
  var key = objKeys[j];
@@ -5062,6 +5064,7 @@ var stringify = function stringify(
5062
5064
  value,
5063
5065
  keyPrefix,
5064
5066
  generateArrayPrefix,
5067
+ commaRoundTrip,
5065
5068
  strictNullHandling,
5066
5069
  skipNulls,
5067
5070
  encoder,
@@ -5158,6 +5161,10 @@ module.exports = function (object, opts) {
5158
5161
  }
5159
5162
 
5160
5163
  var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
5164
+ if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
5165
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
5166
+ }
5167
+ var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
5161
5168
 
5162
5169
  if (!objKeys) {
5163
5170
  objKeys = Object.keys(obj);
@@ -5178,6 +5185,7 @@ module.exports = function (object, opts) {
5178
5185
  obj[key],
5179
5186
  key,
5180
5187
  generateArrayPrefix,
5188
+ commaRoundTrip,
5181
5189
  options.strictNullHandling,
5182
5190
  options.skipNulls,
5183
5191
  options.encode ? options.encoder : null,