node-red-contrib-web-worldmap 2.23.5 → 2.24.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.
Files changed (202) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/README.md +7 -1
  3. package/node_modules/body-parser/HISTORY.md +15 -0
  4. package/node_modules/body-parser/README.md +25 -12
  5. package/node_modules/body-parser/package.json +32 -35
  6. package/node_modules/{body-parser/node_modules/bytes → bytes}/History.md +5 -0
  7. package/node_modules/{body-parser/node_modules/bytes → bytes}/LICENSE +0 -0
  8. package/node_modules/{raw-body/node_modules/bytes → bytes}/Readme.md +42 -16
  9. package/node_modules/{raw-body/node_modules/bytes → bytes}/index.js +5 -1
  10. package/node_modules/{raw-body/node_modules/bytes → bytes}/package.json +20 -21
  11. package/node_modules/content-disposition/HISTORY.md +5 -0
  12. package/node_modules/content-disposition/README.md +3 -9
  13. package/node_modules/content-disposition/index.js +1 -1
  14. package/node_modules/content-disposition/node_modules/safe-buffer/LICENSE +21 -0
  15. package/node_modules/content-disposition/node_modules/safe-buffer/README.md +584 -0
  16. package/node_modules/content-disposition/node_modules/safe-buffer/index.d.ts +187 -0
  17. package/node_modules/content-disposition/node_modules/safe-buffer/index.js +65 -0
  18. package/node_modules/content-disposition/node_modules/safe-buffer/package.json +76 -0
  19. package/node_modules/content-disposition/package.json +25 -28
  20. package/node_modules/cookie/HISTORY.md +5 -0
  21. package/node_modules/cookie/README.md +4 -0
  22. package/node_modules/cookie/index.js +5 -1
  23. package/node_modules/cookie/package.json +20 -23
  24. package/node_modules/express/History.md +33 -0
  25. package/node_modules/express/Readme.md +8 -5
  26. package/node_modules/express/lib/application.js +1 -1
  27. package/node_modules/express/lib/request.js +1 -1
  28. package/node_modules/express/lib/response.js +16 -11
  29. package/node_modules/express/lib/router/index.js +6 -0
  30. package/node_modules/express/lib/utils.js +2 -6
  31. package/node_modules/express/node_modules/safe-buffer/LICENSE +21 -0
  32. package/node_modules/express/node_modules/safe-buffer/README.md +584 -0
  33. package/node_modules/express/node_modules/safe-buffer/index.d.ts +187 -0
  34. package/node_modules/express/node_modules/safe-buffer/index.js +65 -0
  35. package/node_modules/express/node_modules/safe-buffer/package.json +76 -0
  36. package/node_modules/express/package.json +35 -36
  37. package/node_modules/faye-websocket/CHANGELOG.md +5 -0
  38. package/node_modules/faye-websocket/LICENSE.md +1 -1
  39. package/node_modules/faye-websocket/README.md +13 -13
  40. package/node_modules/faye-websocket/lib/faye/websocket/api.js +10 -8
  41. package/node_modules/faye-websocket/lib/faye/websocket/client.js +4 -4
  42. package/node_modules/faye-websocket/lib/faye/websocket.js +1 -1
  43. package/node_modules/faye-websocket/package.json +14 -17
  44. package/node_modules/forwarded/HISTORY.md +5 -0
  45. package/node_modules/forwarded/README.md +3 -3
  46. package/node_modules/forwarded/index.js +15 -1
  47. package/node_modules/forwarded/package.json +25 -26
  48. package/node_modules/http-errors/HISTORY.md +16 -0
  49. package/node_modules/http-errors/README.md +12 -6
  50. package/node_modules/http-errors/index.js +35 -2
  51. package/node_modules/http-errors/package.json +28 -31
  52. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/LICENSE.md +0 -0
  53. package/node_modules/http-parser-js/README.md +39 -0
  54. package/node_modules/http-parser-js/http-parser.d.ts +175 -0
  55. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/http-parser.js +8 -5
  56. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/package.json +17 -19
  57. package/node_modules/inherits/inherits.js +2 -0
  58. package/node_modules/inherits/inherits_browser.js +18 -14
  59. package/node_modules/inherits/package.json +15 -18
  60. package/node_modules/ipaddr.js/README.md +1 -1
  61. package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +6 -9
  62. package/node_modules/ipaddr.js/package.json +15 -17
  63. package/node_modules/proxy-addr/HISTORY.md +11 -0
  64. package/node_modules/proxy-addr/README.md +3 -19
  65. package/node_modules/proxy-addr/index.js +1 -1
  66. package/node_modules/proxy-addr/package.json +28 -31
  67. package/node_modules/qs/.editorconfig +9 -0
  68. package/node_modules/qs/.eslintignore +2 -1
  69. package/node_modules/qs/.eslintrc +15 -1
  70. package/node_modules/qs/.github/FUNDING.yml +12 -0
  71. package/node_modules/qs/.nycrc +13 -0
  72. package/node_modules/qs/CHANGELOG.md +103 -0
  73. package/node_modules/qs/LICENSE.md +29 -0
  74. package/node_modules/qs/README.md +34 -0
  75. package/node_modules/qs/dist/qs.js +117 -67
  76. package/node_modules/qs/lib/formats.js +9 -4
  77. package/node_modules/qs/lib/parse.js +29 -14
  78. package/node_modules/qs/lib/stringify.js +55 -46
  79. package/node_modules/qs/lib/utils.js +23 -2
  80. package/node_modules/qs/package.json +39 -31
  81. package/node_modules/qs/test/parse.js +97 -1
  82. package/node_modules/qs/test/stringify.js +115 -1
  83. package/node_modules/qs/test/utils.js +1 -1
  84. package/node_modules/raw-body/HISTORY.md +14 -0
  85. package/node_modules/raw-body/README.md +3 -5
  86. package/node_modules/raw-body/package.json +30 -33
  87. package/node_modules/send/HISTORY.md +10 -0
  88. package/node_modules/send/README.md +4 -6
  89. package/node_modules/send/index.js +7 -3
  90. package/node_modules/send/node_modules/ms/index.js +3 -3
  91. package/node_modules/send/node_modules/ms/license.md +1 -1
  92. package/node_modules/send/node_modules/ms/package.json +19 -21
  93. package/node_modules/send/node_modules/ms/readme.md +1 -2
  94. package/node_modules/send/package.json +28 -31
  95. package/node_modules/serve-static/HISTORY.md +8 -0
  96. package/node_modules/serve-static/README.md +9 -11
  97. package/node_modules/serve-static/package.json +28 -31
  98. package/node_modules/setprototypeof/README.md +1 -1
  99. package/node_modules/setprototypeof/index.js +1 -1
  100. package/node_modules/setprototypeof/package.json +17 -18
  101. package/node_modules/sockjs/Changelog +12 -0
  102. package/node_modules/sockjs/lib/transport.js +1 -1
  103. package/node_modules/sockjs/package.json +14 -16
  104. package/node_modules/toidentifier/HISTORY.md +9 -0
  105. package/node_modules/toidentifier/README.md +3 -3
  106. package/node_modules/toidentifier/index.js +2 -0
  107. package/node_modules/toidentifier/package.json +28 -27
  108. package/node_modules/uuid/CHANGELOG.md +154 -44
  109. package/node_modules/uuid/CONTRIBUTING.md +18 -0
  110. package/node_modules/uuid/LICENSE.md +4 -16
  111. package/node_modules/uuid/README.md +384 -155
  112. package/node_modules/uuid/dist/bin/uuid +2 -0
  113. package/node_modules/uuid/dist/esm-browser/index.js +9 -0
  114. package/node_modules/uuid/{lib/md5-browser.js → dist/esm-browser/md5.js} +70 -71
  115. package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  116. package/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  117. package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  118. package/node_modules/uuid/dist/esm-browser/rng.js +19 -0
  119. package/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  120. package/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
  121. package/node_modules/uuid/{v1.js → dist/esm-browser/v1.js} +36 -50
  122. package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  123. package/node_modules/uuid/dist/esm-browser/v35.js +64 -0
  124. package/node_modules/uuid/dist/esm-browser/v4.js +24 -0
  125. package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  126. package/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  127. package/node_modules/uuid/dist/esm-browser/version.js +11 -0
  128. package/node_modules/uuid/dist/esm-node/index.js +9 -0
  129. package/node_modules/uuid/dist/esm-node/md5.js +13 -0
  130. package/node_modules/uuid/dist/esm-node/nil.js +1 -0
  131. package/node_modules/uuid/dist/esm-node/parse.js +35 -0
  132. package/node_modules/uuid/dist/esm-node/regex.js +1 -0
  133. package/node_modules/uuid/dist/esm-node/rng.js +12 -0
  134. package/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  135. package/node_modules/uuid/dist/esm-node/stringify.js +29 -0
  136. package/node_modules/uuid/dist/esm-node/v1.js +95 -0
  137. package/node_modules/uuid/dist/esm-node/v3.js +4 -0
  138. package/node_modules/uuid/dist/esm-node/v35.js +64 -0
  139. package/node_modules/uuid/dist/esm-node/v4.js +24 -0
  140. package/node_modules/uuid/dist/esm-node/v5.js +4 -0
  141. package/node_modules/uuid/dist/esm-node/validate.js +7 -0
  142. package/node_modules/uuid/dist/esm-node/version.js +11 -0
  143. package/node_modules/uuid/dist/index.js +79 -0
  144. package/node_modules/uuid/dist/md5-browser.js +223 -0
  145. package/node_modules/uuid/dist/md5.js +23 -0
  146. package/node_modules/uuid/dist/nil.js +8 -0
  147. package/node_modules/uuid/dist/parse.js +45 -0
  148. package/node_modules/uuid/dist/regex.js +8 -0
  149. package/node_modules/uuid/dist/rng-browser.js +26 -0
  150. package/node_modules/uuid/dist/rng.js +24 -0
  151. package/node_modules/uuid/dist/sha1-browser.js +104 -0
  152. package/node_modules/uuid/dist/sha1.js +23 -0
  153. package/node_modules/uuid/dist/stringify.js +39 -0
  154. package/node_modules/uuid/dist/umd/uuid.min.js +1 -0
  155. package/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
  156. package/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
  157. package/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
  158. package/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
  159. package/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
  160. package/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
  161. package/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
  162. package/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
  163. package/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
  164. package/node_modules/uuid/dist/uuid-bin.js +85 -0
  165. package/node_modules/uuid/dist/v1.js +107 -0
  166. package/node_modules/uuid/dist/v3.js +16 -0
  167. package/node_modules/uuid/dist/v35.js +78 -0
  168. package/node_modules/uuid/dist/v4.js +37 -0
  169. package/node_modules/uuid/dist/v5.js +16 -0
  170. package/node_modules/uuid/dist/validate.js +17 -0
  171. package/node_modules/uuid/dist/version.js +21 -0
  172. package/node_modules/uuid/package.json +116 -55
  173. package/node_modules/uuid/wrapper.mjs +10 -0
  174. package/package.json +3 -3
  175. package/worldmap/index.html +1 -0
  176. package/worldmap/leaflet/leaflet-arc.min.js +1 -0
  177. package/worldmap/worldmap.js +36 -22
  178. package/worldmap.html +1 -1
  179. package/worldmap.js +2 -2
  180. package/node_modules/body-parser/node_modules/bytes/Readme.md +0 -126
  181. package/node_modules/body-parser/node_modules/bytes/index.js +0 -162
  182. package/node_modules/body-parser/node_modules/bytes/package.json +0 -86
  183. package/node_modules/qs/LICENSE +0 -28
  184. package/node_modules/qs/test/.eslintrc +0 -17
  185. package/node_modules/qs/test/index.js +0 -7
  186. package/node_modules/raw-body/node_modules/bytes/History.md +0 -87
  187. package/node_modules/raw-body/node_modules/bytes/LICENSE +0 -23
  188. package/node_modules/uuid/AUTHORS +0 -5
  189. package/node_modules/uuid/bin/uuid +0 -65
  190. package/node_modules/uuid/index.js +0 -8
  191. package/node_modules/uuid/lib/bytesToUuid.js +0 -26
  192. package/node_modules/uuid/lib/md5.js +0 -25
  193. package/node_modules/uuid/lib/rng-browser.js +0 -34
  194. package/node_modules/uuid/lib/rng.js +0 -8
  195. package/node_modules/uuid/lib/sha1-browser.js +0 -89
  196. package/node_modules/uuid/lib/sha1.js +0 -25
  197. package/node_modules/uuid/lib/v35.js +0 -57
  198. package/node_modules/uuid/v3.js +0 -4
  199. package/node_modules/uuid/v4.js +0 -29
  200. package/node_modules/uuid/v5.js +0 -3
  201. package/node_modules/websocket-driver/node_modules/http-parser-js/CHANGELOG.md +0 -14
  202. package/node_modules/websocket-driver/node_modules/http-parser-js/README.md +0 -31
@@ -5,6 +5,8 @@ var qs = require('../');
5
5
  var utils = require('../lib/utils');
6
6
  var iconv = require('iconv-lite');
7
7
  var SaferBuffer = require('safer-buffer').Buffer;
8
+ var hasSymbols = require('has-symbols');
9
+ var hasBigInt = typeof BigInt === 'function';
8
10
 
9
11
  test('stringify()', function (t) {
10
12
  t.test('stringifies a querystring object', function (st) {
@@ -28,6 +30,39 @@ test('stringify()', function (t) {
28
30
  st.end();
29
31
  });
30
32
 
33
+ t.test('stringifies symbols', { skip: !hasSymbols() }, function (st) {
34
+ st.equal(qs.stringify(Symbol.iterator), '');
35
+ st.equal(qs.stringify([Symbol.iterator]), '0=Symbol%28Symbol.iterator%29');
36
+ st.equal(qs.stringify({ a: Symbol.iterator }), 'a=Symbol%28Symbol.iterator%29');
37
+ st.equal(
38
+ qs.stringify({ a: [Symbol.iterator] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }),
39
+ 'a[]=Symbol%28Symbol.iterator%29'
40
+ );
41
+ st.end();
42
+ });
43
+
44
+ t.test('stringifies bigints', { skip: !hasBigInt }, function (st) {
45
+ var three = BigInt(3);
46
+ var encodeWithN = function (value, defaultEncoder, charset) {
47
+ var result = defaultEncoder(value, defaultEncoder, charset);
48
+ return typeof value === 'bigint' ? result + 'n' : result;
49
+ };
50
+ st.equal(qs.stringify(three), '');
51
+ st.equal(qs.stringify([three]), '0=3');
52
+ st.equal(qs.stringify([three], { encoder: encodeWithN }), '0=3n');
53
+ st.equal(qs.stringify({ a: three }), 'a=3');
54
+ st.equal(qs.stringify({ a: three }, { encoder: encodeWithN }), 'a=3n');
55
+ st.equal(
56
+ qs.stringify({ a: [three] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }),
57
+ 'a[]=3'
58
+ );
59
+ st.equal(
60
+ qs.stringify({ a: [three] }, { encodeValuesOnly: true, encoder: encodeWithN, arrayFormat: 'brackets' }),
61
+ 'a[]=3n'
62
+ );
63
+ st.end();
64
+ });
65
+
31
66
  t.test('adds query prefix', function (st) {
32
67
  st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b');
33
68
  st.end();
@@ -301,6 +336,27 @@ test('stringify()', function (t) {
301
336
  st.end();
302
337
  });
303
338
 
339
+ t.test('stringifies an empty array in different arrayFormat', function (st) {
340
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false }), 'b[0]=&c=c');
341
+ // arrayFormat default
342
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices' }), 'b[0]=&c=c');
343
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets' }), 'b[]=&c=c');
344
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat' }), 'b=&c=c');
345
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma' }), 'b=&c=c');
346
+ // with strictNullHandling
347
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', strictNullHandling: true }), 'b[0]&c=c');
348
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', strictNullHandling: true }), 'b[]&c=c');
349
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', strictNullHandling: true }), 'b&c=c');
350
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true }), 'b&c=c');
351
+ // with skipNulls
352
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', skipNulls: true }), 'c=c');
353
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', skipNulls: true }), 'c=c');
354
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', skipNulls: true }), 'c=c');
355
+ st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', skipNulls: true }), 'c=c');
356
+
357
+ st.end();
358
+ });
359
+
304
360
  t.test('stringifies a null object', { skip: !Object.create }, function (st) {
305
361
  var obj = Object.create(null);
306
362
  obj.a = 'b';
@@ -520,6 +576,12 @@ test('stringify()', function (t) {
520
576
  return String.fromCharCode(buffer.readUInt8(0) + 97);
521
577
  }
522
578
  }), 'a=b');
579
+
580
+ st.equal(qs.stringify({ a: SaferBuffer.from('a b') }, {
581
+ encoder: function (buffer) {
582
+ return buffer;
583
+ }
584
+ }), 'a=a b');
523
585
  st.end();
524
586
  });
525
587
 
@@ -554,23 +616,43 @@ test('stringify()', function (t) {
554
616
  'custom serializeDate function called'
555
617
  );
556
618
 
619
+ st.equal(
620
+ qs.stringify(
621
+ { a: [date] },
622
+ {
623
+ serializeDate: function (d) { return d.getTime(); },
624
+ arrayFormat: 'comma'
625
+ }
626
+ ),
627
+ 'a=' + date.getTime(),
628
+ 'works with arrayFormat comma'
629
+ );
630
+
557
631
  st.end();
558
632
  });
559
633
 
560
- t.test('RFC 1738 spaces serialization', function (st) {
634
+ t.test('RFC 1738 serialization', function (st) {
561
635
  st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c');
562
636
  st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d');
637
+ st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b');
638
+
639
+ st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.RFC1738 }), 'foo(ref)=bar');
640
+
563
641
  st.end();
564
642
  });
565
643
 
566
644
  t.test('RFC 3986 spaces serialization', function (st) {
567
645
  st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c');
568
646
  st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d');
647
+ st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b');
648
+
569
649
  st.end();
570
650
  });
571
651
 
572
652
  t.test('Backward compatibility to RFC 3986', function (st) {
573
653
  st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c');
654
+ st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }), 'a%20b=a%20b');
655
+
574
656
  st.end();
575
657
  });
576
658
 
@@ -675,5 +757,37 @@ test('stringify()', function (t) {
675
757
  st.end();
676
758
  });
677
759
 
760
+ t.test('allows for encoding keys and values differently', function (st) {
761
+ var encoder = function (str, defaultEncoder, charset, type) {
762
+ if (type === 'key') {
763
+ return defaultEncoder(str, defaultEncoder, charset, type).toLowerCase();
764
+ }
765
+ if (type === 'value') {
766
+ return defaultEncoder(str, defaultEncoder, charset, type).toUpperCase();
767
+ }
768
+ throw 'this should never happen! type: ' + type;
769
+ };
770
+
771
+ st.deepEqual(qs.stringify({ KeY: 'vAlUe' }, { encoder: encoder }), 'key=VALUE');
772
+ st.end();
773
+ });
774
+
775
+ t.test('objects inside arrays', function (st) {
776
+ var obj = { a: { b: { c: 'd', e: 'f' } } };
777
+ var withArray = { a: { b: [{ c: 'd', e: 'f' }] } };
778
+
779
+ st.equal(qs.stringify(obj, { encode: false }), 'a[b][c]=d&a[b][e]=f', 'no array, no arrayFormat');
780
+ st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'bracket' }), 'a[b][c]=d&a[b][e]=f', 'no array, bracket');
781
+ st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'indices' }), 'a[b][c]=d&a[b][e]=f', 'no array, indices');
782
+ st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'comma' }), 'a[b][c]=d&a[b][e]=f', 'no array, comma');
783
+
784
+ st.equal(qs.stringify(withArray, { encode: false }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, no arrayFormat');
785
+ st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'bracket' }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, bracket');
786
+ st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'indices' }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, indices');
787
+ st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'comma' }), '???', 'array, comma (pending issue #378)', { skip: true });
788
+
789
+ st.end();
790
+ });
791
+
678
792
  t.end();
679
793
  });
@@ -130,7 +130,7 @@ test('isBuffer()', function (t) {
130
130
  var saferBuffer = SaferBuffer.from('abc');
131
131
  t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer');
132
132
 
133
- var buffer = Buffer.from ? Buffer.from('abc') : new Buffer('abc');
133
+ var buffer = Buffer.from && Buffer.alloc ? Buffer.from('abc') : new Buffer('abc');
134
134
  t.equal(utils.isBuffer(buffer), true, 'real Buffer instance is a buffer');
135
135
  t.end();
136
136
  });
@@ -1,3 +1,17 @@
1
+ 2.4.2 / 2021-11-16
2
+ ==================
3
+
4
+ * deps: bytes@3.1.1
5
+ * deps: http-errors@1.8.1
6
+ - deps: setprototypeof@1.2.0
7
+ - deps: toidentifier@1.0.1
8
+
9
+ 2.4.1 / 2019-06-25
10
+ ==================
11
+
12
+ * deps: http-errors@1.7.3
13
+ - deps: inherits@2.0.4
14
+
1
15
  2.4.0 / 2019-04-17
2
16
  ==================
3
17
 
@@ -3,7 +3,7 @@
3
3
  [![NPM Version][npm-image]][npm-url]
4
4
  [![NPM Downloads][downloads-image]][downloads-url]
5
5
  [![Node.js Version][node-version-image]][node-version-url]
6
- [![Build status][travis-image]][travis-url]
6
+ [![Build status][github-actions-ci-image]][github-actions-ci-url]
7
7
  [![Test coverage][coveralls-image]][coveralls-url]
8
8
 
9
9
  Gets the entire buffer of a stream either as a `Buffer` or a string.
@@ -33,8 +33,6 @@ $ npm install @types/node
33
33
 
34
34
  ## API
35
35
 
36
- <!-- eslint-disable no-unused-vars -->
37
-
38
36
  ```js
39
37
  var getRawBody = require('raw-body')
40
38
  ```
@@ -211,9 +209,9 @@ server.listen(3000);
211
209
  [npm-url]: https://npmjs.org/package/raw-body
212
210
  [node-version-image]: https://img.shields.io/node/v/raw-body.svg
213
211
  [node-version-url]: https://nodejs.org/en/download/
214
- [travis-image]: https://img.shields.io/travis/stream-utils/raw-body/master.svg
215
- [travis-url]: https://travis-ci.org/stream-utils/raw-body
216
212
  [coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body/master.svg
217
213
  [coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master
218
214
  [downloads-image]: https://img.shields.io/npm/dm/raw-body.svg
219
215
  [downloads-url]: https://npmjs.org/package/raw-body
216
+ [github-actions-ci-image]: https://img.shields.io/github/workflow/status/stream-utils/raw-body/ci/master?label=ci
217
+ [github-actions-ci-url]: https://github.com/jshttp/stream-utils/raw-body?query=workflow%3Aci
@@ -1,32 +1,27 @@
1
1
  {
2
- "_args": [
3
- [
4
- "raw-body@2.4.0",
5
- "/Users/conway/Projects/worldmap"
6
- ]
7
- ],
8
- "_from": "raw-body@2.4.0",
9
- "_id": "raw-body@2.4.0",
2
+ "_from": "raw-body@2.4.2",
3
+ "_id": "raw-body@2.4.2",
10
4
  "_inBundle": false,
11
- "_integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
5
+ "_integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==",
12
6
  "_location": "/raw-body",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
9
  "type": "version",
16
10
  "registry": true,
17
- "raw": "raw-body@2.4.0",
11
+ "raw": "raw-body@2.4.2",
18
12
  "name": "raw-body",
19
13
  "escapedName": "raw-body",
20
- "rawSpec": "2.4.0",
14
+ "rawSpec": "2.4.2",
21
15
  "saveSpec": null,
22
- "fetchSpec": "2.4.0"
16
+ "fetchSpec": "2.4.2"
23
17
  },
24
18
  "_requiredBy": [
25
19
  "/body-parser"
26
20
  ],
27
- "_resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
28
- "_spec": "2.4.0",
29
- "_where": "/Users/conway/Projects/worldmap",
21
+ "_resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz",
22
+ "_shasum": "baf3e9c21eebced59dd6533ac872b71f7b61cb32",
23
+ "_spec": "raw-body@2.4.2",
24
+ "_where": "/Users/conway/Projects/worldmap/node_modules/body-parser",
30
25
  "author": {
31
26
  "name": "Jonathan Ong",
32
27
  "email": "me@jongleberry.com",
@@ -35,6 +30,7 @@
35
30
  "bugs": {
36
31
  "url": "https://github.com/stream-utils/raw-body/issues"
37
32
  },
33
+ "bundleDependencies": false,
38
34
  "contributors": [
39
35
  {
40
36
  "name": "Douglas Christopher Wilson",
@@ -46,25 +42,26 @@
46
42
  }
47
43
  ],
48
44
  "dependencies": {
49
- "bytes": "3.1.0",
50
- "http-errors": "1.7.2",
45
+ "bytes": "3.1.1",
46
+ "http-errors": "1.8.1",
51
47
  "iconv-lite": "0.4.24",
52
48
  "unpipe": "1.0.0"
53
49
  },
50
+ "deprecated": false,
54
51
  "description": "Get and validate the raw body of a readable stream.",
55
52
  "devDependencies": {
56
- "bluebird": "3.5.4",
57
- "eslint": "5.16.0",
58
- "eslint-config-standard": "12.0.0",
59
- "eslint-plugin-import": "2.16.0",
60
- "eslint-plugin-markdown": "1.0.0",
61
- "eslint-plugin-node": "8.0.1",
62
- "eslint-plugin-promise": "4.1.1",
63
- "eslint-plugin-standard": "4.0.0",
64
- "istanbul": "0.4.5",
65
- "mocha": "6.1.3",
66
- "readable-stream": "2.3.6",
67
- "safe-buffer": "5.1.2"
53
+ "bluebird": "3.7.2",
54
+ "eslint": "7.32.0",
55
+ "eslint-config-standard": "14.1.1",
56
+ "eslint-plugin-import": "2.25.3",
57
+ "eslint-plugin-markdown": "2.2.1",
58
+ "eslint-plugin-node": "11.1.0",
59
+ "eslint-plugin-promise": "5.1.1",
60
+ "eslint-plugin-standard": "4.1.0",
61
+ "mocha": "9.1.3",
62
+ "nyc": "15.1.0",
63
+ "readable-stream": "2.3.7",
64
+ "safe-buffer": "5.2.1"
68
65
  },
69
66
  "engines": {
70
67
  "node": ">= 0.8"
@@ -84,10 +81,10 @@
84
81
  "url": "git+https://github.com/stream-utils/raw-body.git"
85
82
  },
86
83
  "scripts": {
87
- "lint": "eslint --plugin markdown --ext js,md .",
84
+ "lint": "eslint .",
88
85
  "test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/",
89
- "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/",
90
- "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/"
86
+ "test-ci": "nyc --reporter=lcov --reporter=text npm test",
87
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
91
88
  },
92
- "version": "2.4.0"
89
+ "version": "2.4.2"
93
90
  }
@@ -1,3 +1,13 @@
1
+ 0.17.2 / 2021-12-11
2
+ ===================
3
+
4
+ * pref: ignore empty http tokens
5
+ * deps: http-errors@1.8.1
6
+ - deps: inherits@2.0.4
7
+ - deps: toidentifier@1.0.1
8
+ - deps: setprototypeof@1.2.0
9
+ * deps: ms@2.1.3
10
+
1
11
  0.17.1 / 2019-05-10
2
12
  ===================
3
13
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![NPM Version][npm-version-image]][npm-url]
4
4
  [![NPM Downloads][npm-downloads-image]][npm-url]
5
- [![Linux Build][travis-image]][travis-url]
5
+ [![Linux Build][github-actions-ci-image]][github-actions-ci-url]
6
6
  [![Windows Build][appveyor-image]][appveyor-url]
7
7
  [![Test Coverage][coveralls-image]][coveralls-url]
8
8
 
@@ -26,8 +26,6 @@ $ npm install send
26
26
 
27
27
  ## API
28
28
 
29
- <!-- eslint-disable no-unused-vars -->
30
-
31
29
  ```js
32
30
  var send = require('send')
33
31
  ```
@@ -87,7 +85,7 @@ This is skipped if the requested file already has an extension.
87
85
 
88
86
  ##### immutable
89
87
 
90
- Enable or diable the `immutable` directive in the `Cache-Control` response
88
+ Enable or disable the `immutable` directive in the `Cache-Control` response
91
89
  header, defaults to `false`. If set to `true`, the `maxAge` option should
92
90
  also be specified to enable caching. The `immutable` directive will prevent
93
91
  supported clients from making conditional requests during the life of the
@@ -320,10 +318,10 @@ server.listen(3000)
320
318
  [appveyor-url]: https://ci.appveyor.com/project/dougwilson/send
321
319
  [coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/send/master
322
320
  [coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master
321
+ [github-actions-ci-image]: https://badgen.net/github/checks/pillarjs/send/master?label=ci
322
+ [github-actions-ci-url]: https://github.com/pillarjs/send/actions?query=workflow%3Aci
323
323
  [node-image]: https://badgen.net/npm/node/send
324
324
  [node-url]: https://nodejs.org/en/download/
325
325
  [npm-downloads-image]: https://badgen.net/npm/dm/send
326
326
  [npm-url]: https://npmjs.org/package/send
327
327
  [npm-version-image]: https://badgen.net/npm/v/send
328
- [travis-image]: https://badgen.net/travis/pillarjs/send/master?label=linux
329
- [travis-url]: https://travis-ci.org/pillarjs/send
@@ -435,7 +435,7 @@ SendStream.prototype.onStatError = function onStatError (error) {
435
435
 
436
436
  SendStream.prototype.isFresh = function isFresh () {
437
437
  return fresh(this.req.headers, {
438
- 'etag': this.res.getHeader('ETag'),
438
+ etag: this.res.getHeader('ETag'),
439
439
  'last-modified': this.res.getHeader('Last-Modified')
440
440
  })
441
441
  }
@@ -1096,7 +1096,9 @@ function parseTokenList (str) {
1096
1096
  }
1097
1097
  break
1098
1098
  case 0x2c: /* , */
1099
- list.push(str.substring(start, end))
1099
+ if (start !== end) {
1100
+ list.push(str.substring(start, end))
1101
+ }
1100
1102
  start = end = i + 1
1101
1103
  break
1102
1104
  default:
@@ -1106,7 +1108,9 @@ function parseTokenList (str) {
1106
1108
  }
1107
1109
 
1108
1110
  // final token
1109
- list.push(str.substring(start, end))
1111
+ if (start !== end) {
1112
+ list.push(str.substring(start, end))
1113
+ }
1110
1114
 
1111
1115
  return list
1112
1116
  }
@@ -23,12 +23,12 @@ var y = d * 365.25;
23
23
  * @api public
24
24
  */
25
25
 
26
- module.exports = function(val, options) {
26
+ module.exports = function (val, options) {
27
27
  options = options || {};
28
28
  var type = typeof val;
29
29
  if (type === 'string' && val.length > 0) {
30
30
  return parse(val);
31
- } else if (type === 'number' && isNaN(val) === false) {
31
+ } else if (type === 'number' && isFinite(val)) {
32
32
  return options.long ? fmtLong(val) : fmtShort(val);
33
33
  }
34
34
  throw new Error(
@@ -50,7 +50,7 @@ function parse(str) {
50
50
  if (str.length > 100) {
51
51
  return;
52
52
  }
53
- var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
53
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
54
54
  str
55
55
  );
56
56
  if (!match) {
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Zeit, Inc.
3
+ Copyright (c) 2020 Vercel, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,42 +1,40 @@
1
1
  {
2
- "_args": [
3
- [
4
- "ms@2.1.1",
5
- "/Users/conway/Projects/worldmap"
6
- ]
7
- ],
8
- "_from": "ms@2.1.1",
9
- "_id": "ms@2.1.1",
2
+ "_from": "ms@2.1.3",
3
+ "_id": "ms@2.1.3",
10
4
  "_inBundle": false,
11
- "_integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
5
+ "_integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
12
6
  "_location": "/send/ms",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
9
  "type": "version",
16
10
  "registry": true,
17
- "raw": "ms@2.1.1",
11
+ "raw": "ms@2.1.3",
18
12
  "name": "ms",
19
13
  "escapedName": "ms",
20
- "rawSpec": "2.1.1",
14
+ "rawSpec": "2.1.3",
21
15
  "saveSpec": null,
22
- "fetchSpec": "2.1.1"
16
+ "fetchSpec": "2.1.3"
23
17
  },
24
18
  "_requiredBy": [
25
19
  "/send"
26
20
  ],
27
- "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
28
- "_spec": "2.1.1",
29
- "_where": "/Users/conway/Projects/worldmap",
21
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
22
+ "_shasum": "574c8138ce1d2b5861f0b44579dbadd60c6615b2",
23
+ "_spec": "ms@2.1.3",
24
+ "_where": "/Users/conway/Projects/worldmap/node_modules/send",
30
25
  "bugs": {
31
- "url": "https://github.com/zeit/ms/issues"
26
+ "url": "https://github.com/vercel/ms/issues"
32
27
  },
28
+ "bundleDependencies": false,
29
+ "deprecated": false,
33
30
  "description": "Tiny millisecond conversion utility",
34
31
  "devDependencies": {
35
- "eslint": "4.12.1",
32
+ "eslint": "4.18.2",
36
33
  "expect.js": "0.3.1",
37
34
  "husky": "0.14.3",
38
35
  "lint-staged": "5.0.0",
39
- "mocha": "4.0.1"
36
+ "mocha": "4.0.1",
37
+ "prettier": "2.0.5"
40
38
  },
41
39
  "eslintConfig": {
42
40
  "extends": "eslint:recommended",
@@ -48,7 +46,7 @@
48
46
  "files": [
49
47
  "index.js"
50
48
  ],
51
- "homepage": "https://github.com/zeit/ms#readme",
49
+ "homepage": "https://github.com/vercel/ms#readme",
52
50
  "license": "MIT",
53
51
  "lint-staged": {
54
52
  "*.js": [
@@ -61,12 +59,12 @@
61
59
  "name": "ms",
62
60
  "repository": {
63
61
  "type": "git",
64
- "url": "git+https://github.com/zeit/ms.git"
62
+ "url": "git+https://github.com/vercel/ms.git"
65
63
  },
66
64
  "scripts": {
67
65
  "lint": "eslint lib/* bin/*",
68
66
  "precommit": "lint-staged",
69
67
  "test": "mocha tests.js"
70
68
  },
71
- "version": "2.1.1"
69
+ "version": "2.1.3"
72
70
  }
@@ -1,7 +1,6 @@
1
1
  # ms
2
2
 
3
- [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
4
- [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
3
+ ![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)
5
4
 
6
5
  Use this package to easily convert various time formats to milliseconds.
7
6
 
@@ -1,33 +1,28 @@
1
1
  {
2
- "_args": [
3
- [
4
- "send@0.17.1",
5
- "/Users/conway/Projects/worldmap"
6
- ]
7
- ],
8
- "_from": "send@0.17.1",
9
- "_id": "send@0.17.1",
2
+ "_from": "send@0.17.2",
3
+ "_id": "send@0.17.2",
10
4
  "_inBundle": false,
11
- "_integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
5
+ "_integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==",
12
6
  "_location": "/send",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
9
  "type": "version",
16
10
  "registry": true,
17
- "raw": "send@0.17.1",
11
+ "raw": "send@0.17.2",
18
12
  "name": "send",
19
13
  "escapedName": "send",
20
- "rawSpec": "0.17.1",
14
+ "rawSpec": "0.17.2",
21
15
  "saveSpec": null,
22
- "fetchSpec": "0.17.1"
16
+ "fetchSpec": "0.17.2"
23
17
  },
24
18
  "_requiredBy": [
25
19
  "/express",
26
20
  "/serve-static"
27
21
  ],
28
- "_resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
29
- "_spec": "0.17.1",
30
- "_where": "/Users/conway/Projects/worldmap",
22
+ "_resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz",
23
+ "_shasum": "926622f76601c41808012c8bf1688fe3906f7820",
24
+ "_spec": "send@0.17.2",
25
+ "_where": "/Users/conway/Projects/worldmap/node_modules/express",
31
26
  "author": {
32
27
  "name": "TJ Holowaychuk",
33
28
  "email": "tj@vision-media.ca"
@@ -35,6 +30,7 @@
35
30
  "bugs": {
36
31
  "url": "https://github.com/pillarjs/send/issues"
37
32
  },
33
+ "bundleDependencies": false,
38
34
  "contributors": [
39
35
  {
40
36
  "name": "Douglas Christopher Wilson",
@@ -57,26 +53,27 @@
57
53
  "escape-html": "~1.0.3",
58
54
  "etag": "~1.8.1",
59
55
  "fresh": "0.5.2",
60
- "http-errors": "~1.7.2",
56
+ "http-errors": "1.8.1",
61
57
  "mime": "1.6.0",
62
- "ms": "2.1.1",
58
+ "ms": "2.1.3",
63
59
  "on-finished": "~2.3.0",
64
60
  "range-parser": "~1.2.1",
65
61
  "statuses": "~1.5.0"
66
62
  },
63
+ "deprecated": false,
67
64
  "description": "Better streaming static file server with Range and conditional-GET support",
68
65
  "devDependencies": {
69
66
  "after": "0.8.2",
70
- "eslint": "5.16.0",
71
- "eslint-config-standard": "12.0.0",
72
- "eslint-plugin-import": "2.17.2",
73
- "eslint-plugin-markdown": "1.0.0",
74
- "eslint-plugin-node": "8.0.1",
75
- "eslint-plugin-promise": "4.1.1",
76
- "eslint-plugin-standard": "4.0.0",
77
- "istanbul": "0.4.5",
78
- "mocha": "6.1.4",
79
- "supertest": "4.0.2"
67
+ "eslint": "7.32.0",
68
+ "eslint-config-standard": "14.1.1",
69
+ "eslint-plugin-import": "2.25.3",
70
+ "eslint-plugin-markdown": "2.2.1",
71
+ "eslint-plugin-node": "11.1.0",
72
+ "eslint-plugin-promise": "5.2.0",
73
+ "eslint-plugin-standard": "4.1.0",
74
+ "mocha": "9.1.3",
75
+ "nyc": "15.1.0",
76
+ "supertest": "6.1.6"
80
77
  },
81
78
  "engines": {
82
79
  "node": ">= 0.8.0"
@@ -100,10 +97,10 @@
100
97
  "url": "git+https://github.com/pillarjs/send.git"
101
98
  },
102
99
  "scripts": {
103
- "lint": "eslint --plugin markdown --ext js,md .",
100
+ "lint": "eslint .",
104
101
  "test": "mocha --check-leaks --reporter spec --bail",
105
- "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec",
106
- "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot"
102
+ "test-ci": "nyc --reporter=lcov --reporter=text npm test",
103
+ "test-cov": "nyc --reporter=html --reporter=text npm test"
107
104
  },
108
- "version": "0.17.1"
105
+ "version": "0.17.2"
109
106
  }