step-node-agent 3.29.2 → 3.29.3-customJava25v2

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 (65) hide show
  1. package/node_modules/har-validator/node_modules/ajv/README.md +14 -6
  2. package/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js +23 -11
  3. package/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js +2 -2
  4. package/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js.map +1 -1
  5. package/node_modules/har-validator/node_modules/ajv/lib/ajv.d.ts +5 -0
  6. package/node_modules/har-validator/node_modules/ajv/lib/compile/index.js +8 -6
  7. package/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst +15 -4
  8. package/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js +14 -4
  9. package/node_modules/har-validator/node_modules/ajv/package.json +2 -1
  10. package/node_modules/har-validator/node_modules/ajv/scripts/info +0 -0
  11. package/node_modules/har-validator/node_modules/ajv/scripts/prepare-tests +0 -0
  12. package/node_modules/har-validator/node_modules/ajv/scripts/publish-built-version +0 -0
  13. package/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages +0 -0
  14. package/node_modules/minimatch/README.md +37 -0
  15. package/node_modules/minimatch/minimatch.js +160 -102
  16. package/node_modules/minimatch/package.json +2 -2
  17. package/node_modules/qs/.editorconfig +1 -1
  18. package/node_modules/qs/CHANGELOG.md +14 -1
  19. package/node_modules/qs/README.md +11 -4
  20. package/node_modules/qs/dist/qs.js +20 -20
  21. package/node_modules/qs/lib/parse.js +21 -10
  22. package/node_modules/qs/lib/utils.js +28 -8
  23. package/node_modules/qs/package.json +1 -1
  24. package/node_modules/qs/test/parse.js +125 -9
  25. package/node_modules/qs/test/utils.js +36 -20
  26. package/node_modules/request/node_modules/qs/CHANGELOG.md +12 -0
  27. package/node_modules/request/node_modules/qs/README.md +9 -3
  28. package/node_modules/request/node_modules/qs/dist/qs.js +10 -10
  29. package/node_modules/request/node_modules/qs/lib/parse.js +4 -4
  30. package/node_modules/request/node_modules/qs/lib/utils.js +6 -6
  31. package/node_modules/request/node_modules/qs/package.json +13 -4
  32. package/node_modules/request/node_modules/qs/test/parse.js +9 -0
  33. package/node_modules/request/node_modules/qs/test/stringify.js +6 -0
  34. package/node_modules/underscore/amd/_setup.js +1 -1
  35. package/node_modules/underscore/amd/pipe.js +13 -0
  36. package/node_modules/underscore/cjs/_setup.js +1 -1
  37. package/node_modules/underscore/cjs/pipe.js +12 -0
  38. package/node_modules/underscore/modules/_flatten.js +20 -18
  39. package/node_modules/underscore/modules/_setup.js +1 -1
  40. package/node_modules/underscore/modules/index.js +2 -2
  41. package/node_modules/underscore/modules/isEqual.js +108 -93
  42. package/node_modules/underscore/modules/package.json +1 -1
  43. package/node_modules/underscore/package.json +1 -1
  44. package/node_modules/underscore/underscore-esm-min.js +3 -3
  45. package/node_modules/underscore/underscore-esm-min.js.map +1 -1
  46. package/node_modules/underscore/underscore-esm.js +132 -115
  47. package/node_modules/underscore/underscore-esm.js.map +1 -1
  48. package/node_modules/underscore/underscore-min.js +3 -3
  49. package/node_modules/underscore/underscore-min.js.map +1 -1
  50. package/node_modules/underscore/underscore-node-f.cjs +132 -115
  51. package/node_modules/underscore/underscore-node-f.cjs.map +1 -1
  52. package/node_modules/underscore/underscore-node.cjs +2 -2
  53. package/node_modules/underscore/underscore-node.mjs +2 -2
  54. package/node_modules/underscore/underscore-umd-min.js +3 -3
  55. package/node_modules/underscore/underscore-umd-min.js.map +1 -1
  56. package/node_modules/underscore/underscore-umd.js +132 -115
  57. package/node_modules/underscore/underscore-umd.js.map +1 -1
  58. package/node_modules/underscore/underscore.js +132 -115
  59. package/package.json +1 -1
  60. package/node_modules/request/node_modules/qs/bower.json +0 -21
  61. package/node_modules/request/node_modules/qs/component.json +0 -15
  62. package/node_modules/underscore/amd/_set.js +0 -21
  63. package/node_modules/underscore/amd/set.js +0 -15
  64. package/node_modules/underscore/cjs/_set.js +0 -21
  65. package/node_modules/underscore/cjs/set.js +0 -15
@@ -69,12 +69,14 @@ test('merge()', function (t) {
69
69
  );
70
70
 
71
71
  t.test('with overflow objects (from arrayLimit)', function (st) {
72
+ // arrayLimit is max index, so with limit 0, max index 0 is allowed (1 element)
73
+ // To create overflow, need 2+ elements with limit 0, or 3+ with limit 1, etc.
72
74
  st.test('merges primitive into overflow object at next index', function (s2t) {
73
- // Create an overflow object via combine
74
- var overflow = utils.combine(['a'], 'b', 1, false);
75
+ // Create an overflow object via combine: 3 elements (indices 0-2) with limit 0
76
+ var overflow = utils.combine(['a', 'b'], 'c', 0, false);
75
77
  s2t.ok(utils.isOverflow(overflow), 'overflow object is marked');
76
- var merged = utils.merge(overflow, 'c');
77
- s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c' }, 'adds primitive at next numeric index');
78
+ var merged = utils.merge(overflow, 'd');
79
+ s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'adds primitive at next numeric index');
78
80
  s2t.end();
79
81
  });
80
82
 
@@ -94,21 +96,21 @@ test('merge()', function (t) {
94
96
  });
95
97
 
96
98
  st.test('merges overflow object into primitive', function (s2t) {
97
- // Create an overflow object via combine
98
- var overflow = utils.combine([], 'b', 0, false);
99
+ // Create an overflow object via combine: 2 elements (indices 0-1) with limit 0
100
+ var overflow = utils.combine(['a'], 'b', 0, false);
99
101
  s2t.ok(utils.isOverflow(overflow), 'overflow object is marked');
100
- var merged = utils.merge('a', overflow);
102
+ var merged = utils.merge('c', overflow);
101
103
  s2t.ok(utils.isOverflow(merged), 'result is also marked as overflow');
102
- s2t.deepEqual(merged, { 0: 'a', 1: 'b' }, 'creates object with primitive at 0, source values shifted');
104
+ s2t.deepEqual(merged, { 0: 'c', 1: 'a', 2: 'b' }, 'creates object with primitive at 0, source values shifted');
103
105
  s2t.end();
104
106
  });
105
107
 
106
108
  st.test('merges overflow object with multiple values into primitive', function (s2t) {
107
- // Create an overflow object via combine
108
- var overflow = utils.combine(['b'], 'c', 1, false);
109
+ // Create an overflow object via combine: 3 elements (indices 0-2) with limit 0
110
+ var overflow = utils.combine(['b', 'c'], 'd', 0, false);
109
111
  s2t.ok(utils.isOverflow(overflow), 'overflow object is marked');
110
112
  var merged = utils.merge('a', overflow);
111
- s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c' }, 'shifts all source indices by 1');
113
+ s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'shifts all source indices by 1');
112
114
  s2t.end();
113
115
  });
114
116
 
@@ -196,7 +198,7 @@ test('combine()', function (t) {
196
198
 
197
199
  st.test('exactly at the limit stays as array', function (s2t) {
198
200
  var combined = utils.combine(['a', 'b'], 'c', 3, false);
199
- s2t.deepEqual(combined, ['a', 'b', 'c'], 'stays as array when exactly at limit');
201
+ s2t.deepEqual(combined, ['a', 'b', 'c'], 'stays as array when count equals limit');
200
202
  s2t.ok(Array.isArray(combined), 'result is an array');
201
203
  s2t.end();
202
204
  });
@@ -208,16 +210,30 @@ test('combine()', function (t) {
208
210
  s2t.end();
209
211
  });
210
212
 
211
- st.test('with arrayLimit 0', function (s2t) {
213
+ st.test('with arrayLimit 1', function (s2t) {
214
+ var combined = utils.combine([], 'a', 1, false);
215
+ s2t.deepEqual(combined, ['a'], 'stays as array when count equals limit');
216
+ s2t.ok(Array.isArray(combined), 'result is an array');
217
+ s2t.end();
218
+ });
219
+
220
+ st.test('with arrayLimit 0 converts single element to object', function (s2t) {
212
221
  var combined = utils.combine([], 'a', 0, false);
213
- s2t.deepEqual(combined, { 0: 'a' }, 'converts single element to object with arrayLimit 0');
222
+ s2t.deepEqual(combined, { 0: 'a' }, 'converts to object when count exceeds limit');
223
+ s2t.notOk(Array.isArray(combined), 'result is not an array');
224
+ s2t.end();
225
+ });
226
+
227
+ st.test('with arrayLimit 0 and two elements converts to object', function (s2t) {
228
+ var combined = utils.combine(['a'], 'b', 0, false);
229
+ s2t.deepEqual(combined, { 0: 'a', 1: 'b' }, 'converts to object when count exceeds limit');
214
230
  s2t.notOk(Array.isArray(combined), 'result is not an array');
215
231
  s2t.end();
216
232
  });
217
233
 
218
234
  st.test('with plainObjects option', function (s2t) {
219
- var combined = utils.combine(['a'], 'b', 1, true);
220
- var expected = { __proto__: null, 0: 'a', 1: 'b' };
235
+ var combined = utils.combine(['a', 'b'], 'c', 1, true);
236
+ var expected = { __proto__: null, 0: 'a', 1: 'b', 2: 'c' };
221
237
  s2t.deepEqual(combined, expected, 'converts to object with null prototype');
222
238
  s2t.equal(Object.getPrototypeOf(combined), null, 'result has null prototype when plainObjects is true');
223
239
  s2t.end();
@@ -228,13 +244,13 @@ test('combine()', function (t) {
228
244
 
229
245
  t.test('with existing overflow object', function (st) {
230
246
  st.test('adds to existing overflow object at next index', function (s2t) {
231
- // Create overflow object first via combine
232
- var overflow = utils.combine(['a'], 'b', 1, false);
247
+ // Create overflow object first via combine: 3 elements (indices 0-2) with limit 0
248
+ var overflow = utils.combine(['a', 'b'], 'c', 0, false);
233
249
  s2t.ok(utils.isOverflow(overflow), 'initial object is marked as overflow');
234
250
 
235
- var combined = utils.combine(overflow, 'c', 10, false);
251
+ var combined = utils.combine(overflow, 'd', 10, false);
236
252
  s2t.equal(combined, overflow, 'returns the same object (mutated)');
237
- s2t.deepEqual(combined, { 0: 'a', 1: 'b', 2: 'c' }, 'adds value at next numeric index');
253
+ s2t.deepEqual(combined, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'adds value at next numeric index');
238
254
  s2t.end();
239
255
  });
240
256
 
@@ -1,3 +1,15 @@
1
+ ## **6.5.5**
2
+ - [Fix] fix regressions from robustness refactor
3
+ - [meta] add `npmignore` to autogenerate an npmignore file
4
+ - [actions] update reusable workflows
5
+
6
+ ## **6.5.4**
7
+ - [Robustness] avoid `.push`, use `void`
8
+ - [readme] clarify `parseArrays` and `arrayLimit` documentation (#543)
9
+ - [readme] document that `addQueryPrefix` does not add `?` to empty output (#418)
10
+ - [readme] replace runkit CI badge with shields.io check-runs badge
11
+ - [actions] fix rebase workflow permissions
12
+
1
13
  ## **6.5.3**
2
14
  - [Fix] `parse`: ignore `__proto__` keys (#428)
3
15
  - [Fix]` `utils.merge`: avoid a crash with a null target and a truthy non-array source
@@ -182,7 +182,7 @@ var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c');
182
182
  assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });
183
183
  ```
184
184
 
185
- **qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will
185
+ **qs** will also limit arrays to a maximum of `20` elements. Any array members with an index of `20` or greater will
186
186
  instead be converted to an object with the index as the key. This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array.
187
187
 
188
188
  ```javascript
@@ -197,7 +197,7 @@ var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 });
197
197
  assert.deepEqual(withArrayLimit, { a: { '1': 'b' } });
198
198
  ```
199
199
 
200
- To disable array parsing entirely, set `parseArrays` to `false`.
200
+ To prevent array syntax (`a[]`, `a[0]`) from being parsed as arrays, set `parseArrays` to `false`.
201
201
 
202
202
  ```javascript
203
203
  var noParsingArrays = qs.parse('a[]=b', { parseArrays: false });
@@ -361,6 +361,12 @@ The query string may optionally be prepended with a question mark:
361
361
  assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d');
362
362
  ```
363
363
 
364
+ Note that when the output is an empty string, the prefix will not be added:
365
+
366
+ ```javascript
367
+ assert.equal(qs.stringify({}, { addQueryPrefix: true }), '');
368
+ ```
369
+
364
370
  The delimiter may be overridden with stringify as well:
365
371
 
366
372
  ```javascript
@@ -506,5 +512,5 @@ The maintainers of qs and thousands of other packages are working with Tidelift
506
512
  [downloads-url]: https://npm-stat.com/charts.html?package=qs
507
513
  [codecov-image]: https://codecov.io/gh/ljharb/qs/branch/main/graphs/badge.svg
508
514
  [codecov-url]: https://app.codecov.io/gh/ljharb/qs/
509
- [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/qs
515
+ [actions-image]: https://img.shields.io/github/check-runs/ljharb/qs/main
510
516
  [actions-url]: https://github.com/ljharb/qs/actions
@@ -53,7 +53,7 @@ var defaults = {
53
53
  var parseValues = function parseQueryStringValues(str, options) {
54
54
  var obj = {};
55
55
  var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
56
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
56
+ var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
57
57
  var parts = cleanStr.split(options.delimiter, limit);
58
58
 
59
59
  for (var i = 0; i < parts.length; ++i) {
@@ -145,7 +145,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
145
145
  }
146
146
  }
147
147
 
148
- keys.push(parent);
148
+ keys[keys.length] = parent;
149
149
  }
150
150
 
151
151
  // Loop through children appending to the array until we hit depth
@@ -158,13 +158,13 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
158
158
  return;
159
159
  }
160
160
  }
161
- keys.push(segment[1]);
161
+ keys[keys.length] = segment[1];
162
162
  }
163
163
 
164
164
  // If there's a remainder, just add whatever is left
165
165
 
166
166
  if (segment) {
167
- keys.push('[' + key.slice(segment.index) + ']');
167
+ keys[keys.length] = '[' + key.slice(segment.index) + ']';
168
168
  }
169
169
 
170
170
  return parseObject(keys, val, options);
@@ -435,7 +435,7 @@ var has = Object.prototype.hasOwnProperty;
435
435
  var hexTable = (function () {
436
436
  var array = [];
437
437
  for (var i = 0; i < 256; ++i) {
438
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
438
+ array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
439
439
  }
440
440
 
441
441
  return array;
@@ -453,7 +453,7 @@ var compactQueue = function compactQueue(queue) {
453
453
 
454
454
  for (var j = 0; j < obj.length; ++j) {
455
455
  if (typeof obj[j] !== 'undefined') {
456
- compacted.push(obj[j]);
456
+ compacted[compacted.length] = obj[j];
457
457
  }
458
458
  }
459
459
 
@@ -482,7 +482,7 @@ var merge = function merge(target, source, options) {
482
482
 
483
483
  if (typeof source !== 'object') {
484
484
  if (Array.isArray(target)) {
485
- target.push(source);
485
+ target[target.length] = source;
486
486
  } else if (target && typeof target === 'object') {
487
487
  if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
488
488
  target[source] = true;
@@ -510,7 +510,7 @@ var merge = function merge(target, source, options) {
510
510
  if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
511
511
  target[i] = merge(targetItem, item, options);
512
512
  } else {
513
- target.push(item);
513
+ target[target.length] = item;
514
514
  }
515
515
  } else {
516
516
  target[i] = item;
@@ -612,8 +612,8 @@ var compact = function compact(value) {
612
612
  var key = keys[j];
613
613
  var val = obj[key];
614
614
  if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
615
- queue.push({ obj: obj, prop: key });
616
- refs.push(val);
615
+ queue[queue.length] = { obj: obj, prop: key };
616
+ refs[refs.length] = val;
617
617
  }
618
618
  }
619
619
  }
@@ -19,7 +19,7 @@ var defaults = {
19
19
  var parseValues = function parseQueryStringValues(str, options) {
20
20
  var obj = {};
21
21
  var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
22
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
22
+ var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
23
23
  var parts = cleanStr.split(options.delimiter, limit);
24
24
 
25
25
  for (var i = 0; i < parts.length; ++i) {
@@ -111,7 +111,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
111
111
  }
112
112
  }
113
113
 
114
- keys.push(parent);
114
+ keys[keys.length] = parent;
115
115
  }
116
116
 
117
117
  // Loop through children appending to the array until we hit depth
@@ -124,13 +124,13 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
124
124
  return;
125
125
  }
126
126
  }
127
- keys.push(segment[1]);
127
+ keys[keys.length] = segment[1];
128
128
  }
129
129
 
130
130
  // If there's a remainder, just add whatever is left
131
131
 
132
132
  if (segment) {
133
- keys.push('[' + key.slice(segment.index) + ']');
133
+ keys[keys.length] = '[' + key.slice(segment.index) + ']';
134
134
  }
135
135
 
136
136
  return parseObject(keys, val, options);
@@ -5,7 +5,7 @@ var has = Object.prototype.hasOwnProperty;
5
5
  var hexTable = (function () {
6
6
  var array = [];
7
7
  for (var i = 0; i < 256; ++i) {
8
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
8
+ array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
9
9
  }
10
10
 
11
11
  return array;
@@ -23,7 +23,7 @@ var compactQueue = function compactQueue(queue) {
23
23
 
24
24
  for (var j = 0; j < obj.length; ++j) {
25
25
  if (typeof obj[j] !== 'undefined') {
26
- compacted.push(obj[j]);
26
+ compacted[compacted.length] = obj[j];
27
27
  }
28
28
  }
29
29
 
@@ -52,7 +52,7 @@ var merge = function merge(target, source, options) {
52
52
 
53
53
  if (typeof source !== 'object') {
54
54
  if (Array.isArray(target)) {
55
- target.push(source);
55
+ target[target.length] = source;
56
56
  } else if (target && typeof target === 'object') {
57
57
  if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
58
58
  target[source] = true;
@@ -80,7 +80,7 @@ var merge = function merge(target, source, options) {
80
80
  if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
81
81
  target[i] = merge(targetItem, item, options);
82
82
  } else {
83
- target.push(item);
83
+ target[target.length] = item;
84
84
  }
85
85
  } else {
86
86
  target[i] = item;
@@ -182,8 +182,8 @@ var compact = function compact(value) {
182
182
  var key = keys[j];
183
183
  var val = obj[key];
184
184
  if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
185
- queue.push({ obj: obj, prop: key });
186
- refs.push(val);
185
+ queue[queue.length] = { obj: obj, prop: key };
186
+ refs[refs.length] = val;
187
187
  }
188
188
  }
189
189
  }
@@ -2,7 +2,7 @@
2
2
  "name": "qs",
3
3
  "description": "A querystring parser that supports nesting and arrays, with a depth limit",
4
4
  "homepage": "https://github.com/ljharb/qs",
5
- "version": "6.5.3",
5
+ "version": "6.5.5",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/ljharb/qs.git"
@@ -36,10 +36,11 @@
36
36
  "qs-iconv": "^1.0.4",
37
37
  "safe-publish-latest": "^2.0.0",
38
38
  "safer-buffer": "^2.1.2",
39
- "tape": "^5.4.0"
39
+ "tape": "^5.4.0",
40
+ "npmignore": "^0.3.1"
40
41
  },
41
42
  "scripts": {
42
- "prepublishOnly": "safe-publish-latest && npm run dist",
43
+ "prepublishOnly": "safe-publish-latest && npmignore --auto --commentLines=autogenerated && npm run dist",
43
44
  "prepublish": "not-in-publish || npm run prepublishOnly",
44
45
  "pretest": "npm run --silent readme && npm run --silent lint",
45
46
  "test": "npm run --silent tests-only",
@@ -50,5 +51,13 @@
50
51
  "lint": "eslint --ext=js,mjs .",
51
52
  "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js"
52
53
  },
53
- "license": "BSD-3-Clause"
54
+ "license": "BSD-3-Clause",
55
+ "publishConfig": {
56
+ "ignore": [
57
+ "!dist/*",
58
+ "bower.json",
59
+ "component.json",
60
+ ".github/workflows"
61
+ ]
62
+ }
54
63
  }
@@ -52,6 +52,15 @@ test('parse()', function (t) {
52
52
  st.end();
53
53
  });
54
54
 
55
+ t.test('correctly computes the remainder when depth is exceeded', function (st) {
56
+ st.deepEqual(
57
+ qs.parse('a[b][c][d][e]=f', { depth: 2 }),
58
+ { a: { b: { c: { '[d][e]': 'f' } } } },
59
+ 'the remainder is "[d][e]", not the full original key'
60
+ );
61
+ st.end();
62
+ });
63
+
55
64
  t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array');
56
65
 
57
66
  t.test('parses an explicit array', function (st) {
@@ -19,6 +19,12 @@ test('stringify()', function (t) {
19
19
  st.end();
20
20
  });
21
21
 
22
+ t.test('correctly encodes low-byte characters', function (st) {
23
+ st.equal(qs.stringify({ a: String.fromCharCode(1) }), 'a=%01', 'encodes 0x01');
24
+ st.equal(qs.stringify({ a: String.fromCharCode(15) }), 'a=%0F', 'encodes 0x0F');
25
+ st.end();
26
+ });
27
+
22
28
  t.test('stringifies falsy values', function (st) {
23
29
  st.equal(qs.stringify(undefined), '');
24
30
  st.equal(qs.stringify(null), '');
@@ -1,7 +1,7 @@
1
1
  define(['exports'], function (exports) {
2
2
 
3
3
  // Current version.
4
- var VERSION = '1.13.7';
4
+ var VERSION = '1.13.8';
5
5
 
6
6
  // Establish the root object, `window` (`self`) in the browser, `global`
7
7
  // on the server, or `this` in some virtual machines. We use `self`
@@ -0,0 +1,13 @@
1
+ define(['./restArguments', './reduce'], function (restArguments, reduce) {
2
+
3
+ function nextValue(previous, func) {
4
+ return func(previous);
5
+ }
6
+
7
+ var pipe = restArguments(function(value, funcs) {
8
+ return reduce(funcs, nextValue, value);
9
+ });
10
+
11
+ return pipe;
12
+
13
+ });
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
3
  // Current version.
4
- var VERSION = '1.13.7';
4
+ var VERSION = '1.13.8';
5
5
 
6
6
  // Establish the root object, `window` (`self`) in the browser, `global`
7
7
  // on the server, or `this` in some virtual machines. We use `self`
@@ -0,0 +1,12 @@
1
+ var restArguments = require('./restArguments.js');
2
+ var reduce = require('./reduce.js');
3
+
4
+ function nextValue(previous, func) {
5
+ return func(previous);
6
+ }
7
+
8
+ var pipe = restArguments(function(value, funcs) {
9
+ return reduce(funcs, nextValue, value);
10
+ });
11
+
12
+ module.exports = pipe;
@@ -4,25 +4,27 @@ import isArray from './isArray.js';
4
4
  import isArguments from './isArguments.js';
5
5
 
6
6
  // Internal implementation of a recursive `flatten` function.
7
- export default function flatten(input, depth, strict, output) {
8
- output = output || [];
9
- if (!depth && depth !== 0) {
10
- depth = Infinity;
11
- } else if (depth <= 0) {
12
- return output.concat(input);
13
- }
14
- var idx = output.length;
15
- for (var i = 0, length = getLength(input); i < length; i++) {
16
- var value = input[i];
17
- if (isArrayLike(value) && (isArray(value) || isArguments(value))) {
7
+ export default function flatten(input, depth, strict) {
8
+ if (!depth && depth !== 0) depth = Infinity;
9
+ var output = [], idx = 0, i = 0, length = getLength(input) || 0, stack = [];
10
+ while (true) {
11
+ if (i >= length) {
12
+ if (!stack.length) break;
13
+ var frame = stack.pop();
14
+ i = frame.i;
15
+ input = frame.v;
16
+ length = getLength(input);
17
+ continue;
18
+ }
19
+ var value = input[i++];
20
+ if (stack.length >= depth) {
21
+ output[idx++] = value;
22
+ } else if (isArrayLike(value) && (isArray(value) || isArguments(value))) {
18
23
  // Flatten current level of array or arguments object.
19
- if (depth > 1) {
20
- flatten(value, depth - 1, strict, output);
21
- idx = output.length;
22
- } else {
23
- var j = 0, len = value.length;
24
- while (j < len) output[idx++] = value[j++];
25
- }
24
+ stack.push({i: i, v: input});
25
+ i = 0;
26
+ input = value;
27
+ length = getLength(input);
26
28
  } else if (!strict) {
27
29
  output[idx++] = value;
28
30
  }
@@ -1,5 +1,5 @@
1
1
  // Current version.
2
- export var VERSION = '1.13.7';
2
+ export var VERSION = '1.13.8';
3
3
 
4
4
  // Establish the root object, `window` (`self`) in the browser, `global`
5
5
  // on the server, or `this` in some virtual machines. We use `self`
@@ -1,9 +1,9 @@
1
1
  // Named Exports
2
2
  // =============
3
3
 
4
- // Underscore.js 1.13.7
4
+ // Underscore.js 1.13.8
5
5
  // https://underscorejs.org
6
- // (c) 2009-2024 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
6
+ // (c) 2009-2026 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
7
7
  // Underscore may be freely distributed under the MIT license.
8
8
 
9
9
  // Baseline setup.