node-red-contrib-web-worldmap 5.5.6 → 5.5.8

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 (46) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +3 -1
  3. package/node_modules/@turf/bezier-spline/package.json +4 -4
  4. package/node_modules/@turf/helpers/package.json +2 -2
  5. package/node_modules/@turf/invariant/package.json +3 -3
  6. package/node_modules/body-parser/HISTORY.md +8 -0
  7. package/node_modules/body-parser/lib/types/urlencoded.js +2 -9
  8. package/node_modules/body-parser/package.json +9 -10
  9. package/node_modules/cookie/index.js +2 -1
  10. package/node_modules/cookie/package.json +1 -1
  11. package/node_modules/cookie-signature/History.md +5 -1
  12. package/node_modules/cookie-signature/index.js +6 -6
  13. package/node_modules/cookie-signature/package.json +2 -2
  14. package/node_modules/finalhandler/HISTORY.md +6 -0
  15. package/node_modules/finalhandler/package.json +3 -3
  16. package/node_modules/http-errors/HISTORY.md +6 -0
  17. package/node_modules/http-errors/index.js +4 -3
  18. package/node_modules/http-errors/package.json +12 -8
  19. package/node_modules/qs/.editorconfig +1 -1
  20. package/node_modules/qs/CHANGELOG.md +14 -1
  21. package/node_modules/qs/README.md +11 -4
  22. package/node_modules/qs/dist/qs.js +20 -20
  23. package/node_modules/qs/lib/parse.js +21 -10
  24. package/node_modules/qs/lib/utils.js +28 -8
  25. package/node_modules/qs/package.json +1 -1
  26. package/node_modules/qs/test/parse.js +125 -9
  27. package/node_modules/qs/test/utils.js +36 -20
  28. package/node_modules/raw-body/package.json +5 -7
  29. package/node_modules/send/HISTORY.md +19 -7
  30. package/node_modules/send/package.json +6 -6
  31. package/node_modules/serve-static/HISTORY.md +6 -0
  32. package/node_modules/serve-static/package.json +2 -2
  33. package/node_modules/statuses/HISTORY.md +5 -0
  34. package/node_modules/statuses/README.md +3 -0
  35. package/node_modules/statuses/package.json +7 -7
  36. package/package.json +5 -3
  37. package/worldmap/worldmap.js +1 -1
  38. package/node_modules/body-parser/SECURITY.md +0 -25
  39. package/node_modules/cookie-signature/.npmignore +0 -4
  40. package/node_modules/raw-body/HISTORY.md +0 -308
  41. package/node_modules/raw-body/SECURITY.md +0 -24
  42. package/node_modules/send/node_modules/encodeurl/HISTORY.md +0 -14
  43. package/node_modules/send/node_modules/encodeurl/LICENSE +0 -22
  44. package/node_modules/send/node_modules/encodeurl/README.md +0 -128
  45. package/node_modules/send/node_modules/encodeurl/index.js +0 -60
  46. package/node_modules/send/node_modules/encodeurl/package.json +0 -40
@@ -63,7 +63,7 @@ var parseValues = function parseQueryStringValues(str, options) {
63
63
  var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
64
64
  cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
65
65
 
66
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
66
+ var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
67
67
  var parts = cleanStr.split(
68
68
  options.delimiter,
69
69
  options.throwOnLimitExceeded ? limit + 1 : limit
@@ -130,6 +130,13 @@ var parseValues = function parseQueryStringValues(str, options) {
130
130
  val = isArray(val) ? [val] : val;
131
131
  }
132
132
 
133
+ if (options.comma && isArray(val) && val.length > options.arrayLimit) {
134
+ if (options.throwOnLimitExceeded) {
135
+ throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
136
+ }
137
+ val = utils.combine([], val, options.arrayLimit, options.plainObjects);
138
+ }
139
+
133
140
  if (key !== null) {
134
141
  var existing = has.call(obj, key);
135
142
  if (existing && options.duplicates === 'combine') {
@@ -180,17 +187,21 @@ var parseObject = function (chain, val, options, valuesParsed) {
180
187
  var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
181
188
  var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
182
189
  var index = parseInt(decodedRoot, 10);
183
- if (!options.parseArrays && decodedRoot === '') {
184
- obj = { 0: leaf };
185
- } else if (
186
- !isNaN(index)
190
+ var isValidArrayIndex = !isNaN(index)
187
191
  && root !== decodedRoot
188
192
  && String(index) === decodedRoot
189
193
  && index >= 0
190
- && (options.parseArrays && index <= options.arrayLimit)
191
- ) {
194
+ && options.parseArrays;
195
+ if (!options.parseArrays && decodedRoot === '') {
196
+ obj = { 0: leaf };
197
+ } else if (isValidArrayIndex && index < options.arrayLimit) {
192
198
  obj = [];
193
199
  obj[index] = leaf;
200
+ } else if (isValidArrayIndex && options.throwOnLimitExceeded) {
201
+ throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
202
+ } else if (isValidArrayIndex) {
203
+ obj[index] = leaf;
204
+ utils.markOverflow(obj, index);
194
205
  } else if (decodedRoot !== '__proto__') {
195
206
  obj[decodedRoot] = leaf;
196
207
  }
@@ -230,7 +241,7 @@ var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
230
241
  }
231
242
  }
232
243
 
233
- keys.push(parent);
244
+ keys[keys.length] = parent;
234
245
  }
235
246
 
236
247
  var i = 0;
@@ -244,7 +255,7 @@ var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
244
255
  }
245
256
  }
246
257
 
247
- keys.push(segment[1]);
258
+ keys[keys.length] = segment[1];
248
259
  }
249
260
 
250
261
  if (segment) {
@@ -252,7 +263,7 @@ var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
252
263
  throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
253
264
  }
254
265
 
255
- keys.push('[' + key.slice(segment.index) + ']');
266
+ keys[keys.length] = '[' + key.slice(segment.index) + ']';
256
267
  }
257
268
 
258
269
  return keys;
@@ -30,7 +30,7 @@ var setMaxIndex = function setMaxIndex(obj, maxIndex) {
30
30
  var hexTable = (function () {
31
31
  var array = [];
32
32
  for (var i = 0; i < 256; ++i) {
33
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
33
+ array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
34
34
  }
35
35
 
36
36
  return array;
@@ -46,7 +46,7 @@ var compactQueue = function compactQueue(queue) {
46
46
 
47
47
  for (var j = 0; j < obj.length; ++j) {
48
48
  if (typeof obj[j] !== 'undefined') {
49
- compacted.push(obj[j]);
49
+ compacted[compacted.length] = obj[j];
50
50
  }
51
51
  }
52
52
 
@@ -74,7 +74,11 @@ var merge = function merge(target, source, options) {
74
74
 
75
75
  if (typeof source !== 'object' && typeof source !== 'function') {
76
76
  if (isArray(target)) {
77
- target.push(source);
77
+ var nextIndex = target.length;
78
+ if (options && typeof options.arrayLimit === 'number' && nextIndex > options.arrayLimit) {
79
+ return markOverflow(arrayToObject(target.concat(source), options), nextIndex);
80
+ }
81
+ target[nextIndex] = source;
78
82
  } else if (target && typeof target === 'object') {
79
83
  if (isOverflow(target)) {
80
84
  // Add at next numeric index for overflow objects
@@ -107,7 +111,11 @@ var merge = function merge(target, source, options) {
107
111
  }
108
112
  return markOverflow(result, getMaxIndex(source) + 1);
109
113
  }
110
- return [target].concat(source);
114
+ var combined = [target].concat(source);
115
+ if (options && typeof options.arrayLimit === 'number' && combined.length > options.arrayLimit) {
116
+ return markOverflow(arrayToObject(combined, options), combined.length - 1);
117
+ }
118
+ return combined;
111
119
  }
112
120
 
113
121
  var mergeTarget = target;
@@ -122,7 +130,7 @@ var merge = function merge(target, source, options) {
122
130
  if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
123
131
  target[i] = merge(targetItem, item, options);
124
132
  } else {
125
- target.push(item);
133
+ target[target.length] = item;
126
134
  }
127
135
  } else {
128
136
  target[i] = item;
@@ -139,6 +147,17 @@ var merge = function merge(target, source, options) {
139
147
  } else {
140
148
  acc[key] = value;
141
149
  }
150
+
151
+ if (isOverflow(source) && !isOverflow(acc)) {
152
+ markOverflow(acc, getMaxIndex(source));
153
+ }
154
+ if (isOverflow(acc)) {
155
+ var keyNum = parseInt(key, 10);
156
+ if (String(keyNum) === key && keyNum >= 0 && keyNum > getMaxIndex(acc)) {
157
+ setMaxIndex(acc, keyNum);
158
+ }
159
+ }
160
+
142
161
  return acc;
143
162
  }, mergeTarget);
144
163
  };
@@ -255,8 +274,8 @@ var compact = function compact(value) {
255
274
  var key = keys[j];
256
275
  var val = obj[key];
257
276
  if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
258
- queue.push({ obj: obj, prop: key });
259
- refs.push(val);
277
+ queue[queue.length] = { obj: obj, prop: key };
278
+ refs[refs.length] = val;
260
279
  }
261
280
  }
262
281
  }
@@ -298,7 +317,7 @@ var maybeMap = function maybeMap(val, fn) {
298
317
  if (isArray(val)) {
299
318
  var mapped = [];
300
319
  for (var i = 0; i < val.length; i += 1) {
301
- mapped.push(fn(val[i]));
320
+ mapped[mapped.length] = fn(val[i]);
302
321
  }
303
322
  return mapped;
304
323
  }
@@ -315,6 +334,7 @@ module.exports = {
315
334
  isBuffer: isBuffer,
316
335
  isOverflow: isOverflow,
317
336
  isRegExp: isRegExp,
337
+ markOverflow: markOverflow,
318
338
  maybeMap: maybeMap,
319
339
  merge: merge
320
340
  };
@@ -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.14.1",
5
+ "version": "6.14.2",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/ljharb/qs.git"
@@ -261,11 +261,11 @@ test('parse()', function (t) {
261
261
  });
262
262
 
263
263
  t.test('limits specific array indices to arrayLimit', function (st) {
264
- st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] });
265
- st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } });
264
+ st.deepEqual(qs.parse('a[19]=a', { arrayLimit: 20 }), { a: ['a'] });
265
+ st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: { 20: 'a' } });
266
266
 
267
- st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] });
268
- st.deepEqual(qs.parse('a[21]=a'), { a: { 21: 'a' } });
267
+ st.deepEqual(qs.parse('a[19]=a'), { a: ['a'] });
268
+ st.deepEqual(qs.parse('a[20]=a'), { a: { 20: 'a' } });
269
269
  st.end();
270
270
  });
271
271
 
@@ -483,7 +483,7 @@ test('parse()', function (t) {
483
483
 
484
484
  t.test('allows overriding array limit', function (st) {
485
485
  st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } });
486
- st.deepEqual(qs.parse('a[0]=b', { arrayLimit: 0 }), { a: ['b'] });
486
+ st.deepEqual(qs.parse('a[0]=b', { arrayLimit: 0 }), { a: { 0: 'b' } });
487
487
 
488
488
  st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } });
489
489
  st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: 0 }), { a: { '-1': 'b' } });
@@ -1118,6 +1118,7 @@ test('parse()', function (t) {
1118
1118
  });
1119
1119
 
1120
1120
  st.test('throws error when array limit exceeded', function (sst) {
1121
+ // 4 elements exceeds limit of 3
1121
1122
  sst['throws'](
1122
1123
  function () {
1123
1124
  qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3, throwOnLimitExceeded: true });
@@ -1128,6 +1129,14 @@ test('parse()', function (t) {
1128
1129
  sst.end();
1129
1130
  });
1130
1131
 
1132
+ st.test('does not throw when at limit', function (sst) {
1133
+ // 3 elements = limit of 3, should not throw
1134
+ var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 3, throwOnLimitExceeded: true });
1135
+ sst.ok(Array.isArray(result.a), 'result is an array');
1136
+ sst.deepEqual(result.a, ['1', '2', '3'], 'all values present');
1137
+ sst.end();
1138
+ });
1139
+
1131
1140
  st.test('converts array to object if length is greater than limit', function (sst) {
1132
1141
  var result = qs.parse('a[1]=1&a[2]=2&a[3]=3&a[4]=4&a[5]=5&a[6]=6', { arrayLimit: 5 });
1133
1142
 
@@ -1135,6 +1144,40 @@ test('parse()', function (t) {
1135
1144
  sst.end();
1136
1145
  });
1137
1146
 
1147
+ st.test('throws error when indexed notation exceeds arrayLimit with throwOnLimitExceeded', function (sst) {
1148
+ sst['throws'](
1149
+ function () {
1150
+ qs.parse('a[1001]=b', { arrayLimit: 1000, throwOnLimitExceeded: true });
1151
+ },
1152
+ new RangeError('Array limit exceeded. Only 1000 elements allowed in an array.'),
1153
+ 'throws error for a single index exceeding arrayLimit'
1154
+ );
1155
+
1156
+ sst['throws'](
1157
+ function () {
1158
+ qs.parse('a[0]=1&a[1]=2&a[2]=3&a[10]=4', { arrayLimit: 6, throwOnLimitExceeded: true, allowSparse: true });
1159
+ },
1160
+ new RangeError('Array limit exceeded. Only 6 elements allowed in an array.'),
1161
+ 'throws error when a sparse index exceeds arrayLimit'
1162
+ );
1163
+
1164
+ sst.end();
1165
+ });
1166
+
1167
+ st.test('does not throw for indexed notation within arrayLimit with throwOnLimitExceeded', function (sst) {
1168
+ var result = qs.parse('a[4]=b', { arrayLimit: 5, throwOnLimitExceeded: true, allowSparse: true });
1169
+ sst.ok(Array.isArray(result.a), 'result is an array');
1170
+ sst.equal(result.a.length, 5, 'array has correct length');
1171
+ sst.equal(result.a[4], 'b', 'value at index 4 is correct');
1172
+ sst.end();
1173
+ });
1174
+
1175
+ st.test('silently converts to object for indexed notation exceeding arrayLimit without throwOnLimitExceeded', function (sst) {
1176
+ var result = qs.parse('a[1001]=b', { arrayLimit: 1000 });
1177
+ sst.deepEqual(result, { a: { 1001: 'b' } }, 'converts to object without throwing');
1178
+ sst.end();
1179
+ });
1180
+
1138
1181
  st.end();
1139
1182
  });
1140
1183
 
@@ -1304,24 +1347,72 @@ test('DOS', function (t) {
1304
1347
  });
1305
1348
 
1306
1349
  test('arrayLimit boundary conditions', function (t) {
1350
+ // arrayLimit is the max number of elements allowed in an array
1307
1351
  t.test('exactly at the limit stays as array', function (st) {
1352
+ // 3 elements = limit of 3
1308
1353
  var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 3 });
1309
- st.ok(Array.isArray(result.a), 'result is an array when exactly at limit');
1354
+ st.ok(Array.isArray(result.a), 'result is an array when count equals limit');
1310
1355
  st.deepEqual(result.a, ['1', '2', '3'], 'all values present');
1311
1356
  st.end();
1312
1357
  });
1313
1358
 
1314
1359
  t.test('one over the limit converts to object', function (st) {
1360
+ // 4 elements exceeds limit of 3
1315
1361
  var result = qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3 });
1316
1362
  st.notOk(Array.isArray(result.a), 'result is not an array when over limit');
1317
1363
  st.deepEqual(result.a, { 0: '1', 1: '2', 2: '3', 3: '4' }, 'all values preserved as object');
1318
1364
  st.end();
1319
1365
  });
1320
1366
 
1321
- t.test('arrayLimit 1 with two values', function (st) {
1367
+ t.test('arrayLimit 1 with one value', function (st) {
1368
+ // 1 element = limit of 1
1369
+ var result = qs.parse('a[]=1', { arrayLimit: 1 });
1370
+ st.ok(Array.isArray(result.a), 'result is an array when count equals limit');
1371
+ st.deepEqual(result.a, ['1'], 'value preserved as array');
1372
+ st.end();
1373
+ });
1374
+
1375
+ t.test('arrayLimit 1 with two values converts to object', function (st) {
1376
+ // 2 elements exceeds limit of 1
1322
1377
  var result = qs.parse('a[]=1&a[]=2', { arrayLimit: 1 });
1323
1378
  st.notOk(Array.isArray(result.a), 'result is not an array');
1324
- st.deepEqual(result.a, { 0: '1', 1: '2' }, 'both values preserved');
1379
+ st.deepEqual(result.a, { 0: '1', 1: '2' }, 'all values preserved as object');
1380
+ st.end();
1381
+ });
1382
+
1383
+ t.end();
1384
+ });
1385
+
1386
+ test('comma + arrayLimit', function (t) {
1387
+ t.test('comma-separated values within arrayLimit stay as array', function (st) {
1388
+ var result = qs.parse('a=1,2,3', { comma: true, arrayLimit: 5 });
1389
+ st.ok(Array.isArray(result.a), 'result is an array');
1390
+ st.deepEqual(result.a, ['1', '2', '3'], 'all values present');
1391
+ st.end();
1392
+ });
1393
+
1394
+ t.test('comma-separated values exceeding arrayLimit convert to object', function (st) {
1395
+ var result = qs.parse('a=1,2,3,4', { comma: true, arrayLimit: 3 });
1396
+ st.notOk(Array.isArray(result.a), 'result is not an array when over limit');
1397
+ st.deepEqual(result.a, { 0: '1', 1: '2', 2: '3', 3: '4' }, 'all values preserved as object');
1398
+ st.end();
1399
+ });
1400
+
1401
+ t.test('comma-separated values exceeding arrayLimit with throwOnLimitExceeded throws', function (st) {
1402
+ st['throws'](
1403
+ function () {
1404
+ qs.parse('a=1,2,3,4', { comma: true, arrayLimit: 3, throwOnLimitExceeded: true });
1405
+ },
1406
+ new RangeError('Array limit exceeded. Only 3 elements allowed in an array.'),
1407
+ 'throws error when comma-split exceeds array limit'
1408
+ );
1409
+ st.end();
1410
+ });
1411
+
1412
+ t.test('comma-separated values at exactly arrayLimit stay as array', function (st) {
1413
+ var result = qs.parse('a=1,2,3', { comma: true, arrayLimit: 3 });
1414
+ st.ok(Array.isArray(result.a), 'result is an array when exactly at limit');
1415
+ st.deepEqual(result.a, ['1', '2', '3'], 'all values present');
1325
1416
  st.end();
1326
1417
  });
1327
1418
 
@@ -1384,13 +1475,38 @@ test('mixed array and object notation', function (t) {
1384
1475
  });
1385
1476
 
1386
1477
  t.test('multiple plain values exceeding limit', function (st) {
1478
+ // 3 elements (indices 0-2), max index 2 > limit 1
1387
1479
  st.deepEqual(
1388
- qs.parse('a=b&a=c&a=d', { arrayLimit: 2 }),
1480
+ qs.parse('a=b&a=c&a=d', { arrayLimit: 1 }),
1389
1481
  { a: { 0: 'b', 1: 'c', 2: 'd' } },
1390
1482
  'duplicate plain keys convert to object when exceeding limit'
1391
1483
  );
1392
1484
  st.end();
1393
1485
  });
1394
1486
 
1487
+ t.test('mixed notation produces consistent results when arrayLimit is exceeded', function (st) {
1488
+ var expected = { a: { 0: 'b', 1: 'c', 2: 'd' } };
1489
+
1490
+ st.deepEqual(
1491
+ qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: -1 }),
1492
+ expected,
1493
+ 'arrayLimit -1'
1494
+ );
1495
+
1496
+ st.deepEqual(
1497
+ qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: 0 }),
1498
+ expected,
1499
+ 'arrayLimit 0'
1500
+ );
1501
+
1502
+ st.deepEqual(
1503
+ qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: 1 }),
1504
+ expected,
1505
+ 'arrayLimit 1'
1506
+ );
1507
+
1508
+ st.end();
1509
+ });
1510
+
1395
1511
  t.end();
1396
1512
  });
@@ -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,7 +1,7 @@
1
1
  {
2
2
  "name": "raw-body",
3
3
  "description": "Get and validate the raw body of a readable stream.",
4
- "version": "2.5.2",
4
+ "version": "2.5.3",
5
5
  "author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
6
6
  "contributors": [
7
7
  "Douglas Christopher Wilson <doug@somethingdoug.com>",
@@ -10,10 +10,10 @@
10
10
  "license": "MIT",
11
11
  "repository": "stream-utils/raw-body",
12
12
  "dependencies": {
13
- "bytes": "3.1.2",
14
- "http-errors": "2.0.0",
15
- "iconv-lite": "0.4.24",
16
- "unpipe": "1.0.0"
13
+ "bytes": "~3.1.2",
14
+ "http-errors": "~2.0.1",
15
+ "iconv-lite": "~0.4.24",
16
+ "unpipe": "~1.0.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "bluebird": "3.7.2",
@@ -33,10 +33,8 @@
33
33
  "node": ">= 0.8"
34
34
  },
35
35
  "files": [
36
- "HISTORY.md",
37
36
  "LICENSE",
38
37
  "README.md",
39
- "SECURITY.md",
40
38
  "index.d.ts",
41
39
  "index.js"
42
40
  ],
@@ -1,3 +1,15 @@
1
+ 0.19.2 / 2025-12-15
2
+ ===================
3
+
4
+ * deps: use tilde notation for dependencies
5
+ * deps: http-errors@~2.0.1
6
+ * deps: statuses@~2.0.2
7
+
8
+ 0.19.1 / 2024-10-09
9
+ ===================
10
+
11
+ * deps: encodeurl@~2.0.0
12
+
1
13
  0.19.0 / 2024-09-10
2
14
  ===================
3
15
 
@@ -485,37 +497,37 @@
485
497
 
486
498
  * update range-parser and fresh
487
499
 
488
- 0.1.4 / 2013-08-11
500
+ 0.1.4 / 2013-08-11
489
501
  ==================
490
502
 
491
503
  * update fresh
492
504
 
493
- 0.1.3 / 2013-07-08
505
+ 0.1.3 / 2013-07-08
494
506
  ==================
495
507
 
496
508
  * Revert "Fix fd leak"
497
509
 
498
- 0.1.2 / 2013-07-03
510
+ 0.1.2 / 2013-07-03
499
511
  ==================
500
512
 
501
513
  * Fix fd leak
502
514
 
503
- 0.1.0 / 2012-08-25
515
+ 0.1.0 / 2012-08-25
504
516
  ==================
505
517
 
506
518
  * add options parameter to send() that is passed to fs.createReadStream() [kanongil]
507
519
 
508
- 0.0.4 / 2012-08-16
520
+ 0.0.4 / 2012-08-16
509
521
  ==================
510
522
 
511
523
  * allow custom "Accept-Ranges" definition
512
524
 
513
- 0.0.3 / 2012-07-16
525
+ 0.0.3 / 2012-07-16
514
526
  ==================
515
527
 
516
528
  * fix normalization of the root directory. Closes #3
517
529
 
518
- 0.0.2 / 2012-07-09
530
+ 0.0.2 / 2012-07-09
519
531
  ==================
520
532
 
521
533
  * add passing of req explicitly for now (YUCK)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "send",
3
3
  "description": "Better streaming static file server with Range and conditional-GET support",
4
- "version": "0.19.0",
4
+ "version": "0.19.2",
5
5
  "author": "TJ Holowaychuk <tj@vision-media.ca>",
6
6
  "contributors": [
7
7
  "Douglas Christopher Wilson <doug@somethingdoug.com>",
@@ -19,16 +19,16 @@
19
19
  "debug": "2.6.9",
20
20
  "depd": "2.0.0",
21
21
  "destroy": "1.2.0",
22
- "encodeurl": "~1.0.2",
22
+ "encodeurl": "~2.0.0",
23
23
  "escape-html": "~1.0.3",
24
24
  "etag": "~1.8.1",
25
- "fresh": "0.5.2",
26
- "http-errors": "2.0.0",
25
+ "fresh": "~0.5.2",
26
+ "http-errors": "~2.0.1",
27
27
  "mime": "1.6.0",
28
28
  "ms": "2.1.3",
29
- "on-finished": "2.4.1",
29
+ "on-finished": "~2.4.1",
30
30
  "range-parser": "~1.2.1",
31
- "statuses": "2.0.1"
31
+ "statuses": "~2.0.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "after": "0.8.2",
@@ -1,3 +1,9 @@
1
+ 1.16.3 / 2024-12-15
2
+ ===================
3
+
4
+ * deps: send@~0.19.1
5
+ - deps: encodeurl@~2.0.0
6
+
1
7
  1.16.2 / 2024-09-11
2
8
  ===================
3
9
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "serve-static",
3
3
  "description": "Serve static files",
4
- "version": "1.16.2",
4
+ "version": "1.16.3",
5
5
  "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
6
6
  "license": "MIT",
7
7
  "repository": "expressjs/serve-static",
@@ -9,7 +9,7 @@
9
9
  "encodeurl": "~2.0.0",
10
10
  "escape-html": "~1.0.3",
11
11
  "parseurl": "~1.3.3",
12
- "send": "0.19.0"
12
+ "send": "~0.19.1"
13
13
  },
14
14
  "devDependencies": {
15
15
  "eslint": "7.32.0",
@@ -1,3 +1,8 @@
1
+ 2.0.2 / 2025-06-06
2
+ ==================
3
+
4
+ * Migrate to `String.prototype.slice()`
5
+
1
6
  2.0.1 / 2021-01-03
2
7
  ==================
3
8