cdk-common 2.1.11 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +81 -3
- package/API.md +78 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +14 -1
- package/lib/managed-policies.js +14 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +0 -45
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +0 -67
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +0 -54
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +0 -58
- package/node_modules/@types/concat-stream/node_modules/@types/node/constants.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +0 -18
- package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +0 -27
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +0 -46
- package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +0 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +0 -36
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +0 -20
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +0 -41
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +0 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +53 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +0 -28
- package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +0 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/quic.d.ts +0 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +0 -35
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +0 -115
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +0 -44
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +27 -23
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +7 -80
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +6 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +0 -94
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +0 -25
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +0 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +0 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +0 -71
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +0 -93
- package/node_modules/@types/concat-stream/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/client.d.ts +10 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +0 -45
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +0 -67
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +0 -54
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +0 -58
- package/node_modules/@types/form-data/node_modules/@types/node/constants.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +0 -18
- package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +0 -27
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +0 -46
- package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +0 -16
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +0 -36
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +0 -20
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +0 -41
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +0 -3
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +53 -16
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +0 -28
- package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +0 -13
- package/node_modules/@types/form-data/node_modules/@types/node/quic.d.ts +0 -13
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +0 -35
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +0 -115
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +0 -44
- package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +27 -23
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +7 -80
- package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +6 -16
- package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +0 -94
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +0 -25
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +0 -8
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +0 -38
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +0 -71
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +0 -93
- package/node_modules/@types/form-data/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +10 -0
- package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
- package/node_modules/qs/CHANGELOG.md +6 -0
- package/node_modules/qs/dist/qs.js +16 -16
- package/node_modules/qs/lib/parse.js +2 -2
- package/node_modules/qs/package.json +3 -3
- package/node_modules/qs/test/parse.js +86 -0
- package/node_modules/qs/test/stringify.js +9 -0
- package/node_modules/qs/test/utils.js +31 -3
- package/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/node_modules/side-channel-list/index.js +1 -3
- package/node_modules/side-channel-list/package.json +8 -8
- package/node_modules/side-channel-list/test/index.js +50 -0
- package/package.json +27 -27
|
@@ -92,6 +92,16 @@ export declare namespace Client {
|
|
|
92
92
|
* @default 100
|
|
93
93
|
*/
|
|
94
94
|
maxConcurrentStreams?: number;
|
|
95
|
+
/**
|
|
96
|
+
* @description Sets the HTTP/2 stream-level flow-control window size (SETTINGS_INITIAL_WINDOW_SIZE).
|
|
97
|
+
* @default 262144
|
|
98
|
+
*/
|
|
99
|
+
initialWindowSize?: number;
|
|
100
|
+
/**
|
|
101
|
+
* @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize).
|
|
102
|
+
* @default 524288
|
|
103
|
+
*/
|
|
104
|
+
connectionWindowSize?: number;
|
|
95
105
|
}
|
|
96
106
|
export interface SocketInfo {
|
|
97
107
|
localAddress?: string
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## **6.15.1**
|
|
2
|
+
- [Fix] `parse`: `parameterLimit: Infinity` with `throwOnLimitExceeded: true` silently drops all parameters
|
|
3
|
+
- [Deps] update `@ljharb/eslint-config`
|
|
4
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `iconv-lite`
|
|
5
|
+
- [Tests] increase coverage
|
|
6
|
+
|
|
1
7
|
## **6.15.0**
|
|
2
8
|
- [New] `parse`: add `strictMerge` option to wrap object/primitive conflicts in an array (#425, #122)
|
|
3
9
|
- [Fix] `duplicates` option should not apply to bracket notation keys (#514)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"use strict";var stringify=require(4),parse=require(3),formats=require(1);module.exports={formats:formats,parse:parse,stringify:stringify};
|
|
6
6
|
|
|
7
7
|
},{"1":1,"3":3,"4":4}],3:[function(require,module,exports){
|
|
8
|
-
"use strict";var utils=require(5),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function parseQueryStringValues(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,t.throwOnLimitExceeded?a+1:a);if(t.throwOnLimitExceeded&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(1===a?"":"s")+" allowed.");var l,n=-1,s=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)0===o[l].indexOf("utf8=")&&(o[l]===charsetSentinel?s="utf-8":o[l]===isoSentinel&&(s="iso-8859-1"),n=l,l=o.length);for(l=0;l<o.length;++l)if(l!==n){var d,c,p=o[l],u=p.indexOf("]="),y=-1===u?p.indexOf("="):u+1;if(-1===y?(d=t.decoder(p,defaults.decoder,s,"key"),c=t.strictNullHandling?null:""):null!==(d=t.decoder(p.slice(0,y),defaults.decoder,s,"key"))&&(c=utils.maybeMap(parseArrayValue(p.slice(y+1),t,isArray(r[d])?r[d].length:0),function(e){return t.decoder(e,defaults.decoder,s,"value")})),c&&t.interpretNumericEntities&&"iso-8859-1"===s&&(c=interpretNumericEntities(String(c))),p.indexOf("[]=")>-1&&(c=isArray(c)?[c]:c),t.comma&&isArray(c)&&c.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");c=utils.combine([],c,t.arrayLimit,t.plainObjects)}if(null!==d){var f=has.call(r,d);f&&("combine"===t.duplicates||p.indexOf("[]=")>-1)?r[d]=utils.combine(r[d],c,t.arrayLimit,t.plainObjects):f&&"last"!==t.duplicates||(r[d]=c)}}return r},parseObject=function(e,t,r,i){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");a=Array.isArray(t)&&t[o]?t[o].length:0}for(var l=i?t:parseArrayValue(t,r,a),n=e.length-1;n>=0;--n){var s,d=e[n];if("[]"===d&&r.parseArrays)s=utils.isOverflow(l)?l:r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:utils.combine([],l,r.arrayLimit,r.plainObjects);else{s=r.plainObjects?{__proto__:null}:{};var c="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,p=r.decodeDotInKeys?c.replace(/%2E/g,"."):c,u=parseInt(p,10),y=!isNaN(u)&&d!==p&&String(u)===p&&u>=0&&r.parseArrays;if(r.parseArrays||""!==p)if(y&&u<r.arrayLimit)(s=[])[u]=l;else{if(y&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");y?(s[u]=l,utils.markOverflow(s,u)):"__proto__"!==p&&(s[p]=l)}else s={0:l}}l=s}return l},splitKeyIntoSegments=function splitKeyIntoSegments(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&has.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(r),o=a?r.slice(0,a.index):r,l=[];if(o){if(!t.plainObjects&&has.call(Object.prototype,o)&&!t.allowPrototypes)return;l[l.length]=o}for(var n=0;null!==(a=i.exec(r))&&n<t.depth;){n+=1;var s=a[1].slice(1,-1);if(!t.plainObjects&&has.call(Object.prototype,s)&&!t.allowPrototypes)return;l[l.length]=a[1]}if(a){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");l[l.length]="["+r.slice(a.index)+"]"}return l},parseKeys=function parseQueryStringKeys(e,t,r,i){if(e){var a=splitKeyIntoSegments(e,r);if(a)return parseObject(a,t,r,i)}},normalizeParseOptions=function normalizeParseOptions(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?defaults.charset:e.charset,r=void 0===e.duplicates?defaults.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||defaults.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:defaults.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:defaults.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:defaults.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:defaults.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:defaults.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:defaults.decoder,delimiter:"string"==typeof e.delimiter||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:defaults.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:defaults.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:defaults.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:defaults.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:defaults.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};module.exports=function(e,t){var r=normalizeParseOptions(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var i="string"==typeof e?parseValues(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),l=0;l<o.length;++l){var n=o[l],s=parseKeys(n,i[n],r,"string"==typeof e);a=utils.merge(a,s,r)}return!0===r.allowSparse?a:utils.compact(a)};
|
|
8
|
+
"use strict";var utils=require(5),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function parseQueryStringValues(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,t.throwOnLimitExceeded&&void 0!==a?a+1:a);if(t.throwOnLimitExceeded&&void 0!==a&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(1===a?"":"s")+" allowed.");var l,n=-1,s=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)0===o[l].indexOf("utf8=")&&(o[l]===charsetSentinel?s="utf-8":o[l]===isoSentinel&&(s="iso-8859-1"),n=l,l=o.length);for(l=0;l<o.length;++l)if(l!==n){var d,c,p=o[l],u=p.indexOf("]="),y=-1===u?p.indexOf("="):u+1;if(-1===y?(d=t.decoder(p,defaults.decoder,s,"key"),c=t.strictNullHandling?null:""):null!==(d=t.decoder(p.slice(0,y),defaults.decoder,s,"key"))&&(c=utils.maybeMap(parseArrayValue(p.slice(y+1),t,isArray(r[d])?r[d].length:0),function(e){return t.decoder(e,defaults.decoder,s,"value")})),c&&t.interpretNumericEntities&&"iso-8859-1"===s&&(c=interpretNumericEntities(String(c))),p.indexOf("[]=")>-1&&(c=isArray(c)?[c]:c),t.comma&&isArray(c)&&c.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");c=utils.combine([],c,t.arrayLimit,t.plainObjects)}if(null!==d){var f=has.call(r,d);f&&("combine"===t.duplicates||p.indexOf("[]=")>-1)?r[d]=utils.combine(r[d],c,t.arrayLimit,t.plainObjects):f&&"last"!==t.duplicates||(r[d]=c)}}return r},parseObject=function(e,t,r,i){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");a=Array.isArray(t)&&t[o]?t[o].length:0}for(var l=i?t:parseArrayValue(t,r,a),n=e.length-1;n>=0;--n){var s,d=e[n];if("[]"===d&&r.parseArrays)s=utils.isOverflow(l)?l:r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:utils.combine([],l,r.arrayLimit,r.plainObjects);else{s=r.plainObjects?{__proto__:null}:{};var c="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,p=r.decodeDotInKeys?c.replace(/%2E/g,"."):c,u=parseInt(p,10),y=!isNaN(u)&&d!==p&&String(u)===p&&u>=0&&r.parseArrays;if(r.parseArrays||""!==p)if(y&&u<r.arrayLimit)(s=[])[u]=l;else{if(y&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");y?(s[u]=l,utils.markOverflow(s,u)):"__proto__"!==p&&(s[p]=l)}else s={0:l}}l=s}return l},splitKeyIntoSegments=function splitKeyIntoSegments(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&has.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(r),o=a?r.slice(0,a.index):r,l=[];if(o){if(!t.plainObjects&&has.call(Object.prototype,o)&&!t.allowPrototypes)return;l[l.length]=o}for(var n=0;null!==(a=i.exec(r))&&n<t.depth;){n+=1;var s=a[1].slice(1,-1);if(!t.plainObjects&&has.call(Object.prototype,s)&&!t.allowPrototypes)return;l[l.length]=a[1]}if(a){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");l[l.length]="["+r.slice(a.index)+"]"}return l},parseKeys=function parseQueryStringKeys(e,t,r,i){if(e){var a=splitKeyIntoSegments(e,r);if(a)return parseObject(a,t,r,i)}},normalizeParseOptions=function normalizeParseOptions(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?defaults.charset:e.charset,r=void 0===e.duplicates?defaults.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||defaults.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:defaults.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:defaults.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:defaults.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:defaults.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:defaults.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:defaults.decoder,delimiter:"string"==typeof e.delimiter||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:defaults.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:defaults.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:defaults.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:defaults.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:defaults.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};module.exports=function(e,t){var r=normalizeParseOptions(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var i="string"==typeof e?parseValues(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),l=0;l<o.length;++l){var n=o[l],s=parseKeys(n,i[n],r,"string"==typeof e);a=utils.merge(a,s,r)}return!0===r.allowSparse?a:utils.compact(a)};
|
|
9
9
|
|
|
10
10
|
},{"5":5}],4:[function(require,module,exports){
|
|
11
11
|
"use strict";var getSideChannel=require(46),utils=require(5),formats=require(1),has=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,r){return e+"["+r+"]"},repeat:function repeat(e){return e}},isArray=Array.isArray,push=Array.prototype.push,pushToArray=function(e,r){push.apply(e,isArray(r)?r:[r])},toISO=Date.prototype.toISOString,defaultFormat=formats.default,defaults={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:utils.encode,encodeValuesOnly:!1,filter:void 0,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:!1,serializeDate:function serializeDate(e){return toISO.call(e)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},sentinel={},stringify=function stringify(e,r,t,o,a,n,i,l,s,f,u,d,y,c,p,m,h,v){for(var g=e,w=v,b=0,A=!1;void 0!==(w=w.get(sentinel))&&!A;){var D=w.get(e);if(b+=1,void 0!==D){if(D===b)throw new RangeError("Cyclic object value");A=!0}void 0===w.get(sentinel)&&(b=0)}if("function"==typeof f?g=f(r,g):g instanceof Date?g=y(g):"comma"===t&&isArray(g)&&(g=utils.maybeMap(g,function(e){return e instanceof Date?y(e):e})),null===g){if(n)return s&&!m?s(r,defaults.encoder,h,"key",c):r;g=""}if(isNonNullishPrimitive(g)||utils.isBuffer(g))return s?[p(m?r:s(r,defaults.encoder,h,"key",c))+"="+p(s(g,defaults.encoder,h,"value",c))]:[p(r)+"="+p(String(g))];var S,E=[];if(void 0===g)return E;if("comma"===t&&isArray(g))m&&s&&(g=utils.maybeMap(g,s)),S=[{value:g.length>0?g.join(",")||null:void 0}];else if(isArray(f))S=f;else{var N=Object.keys(g);S=u?N.sort(u):N}var T=l?String(r).replace(/\./g,"%2E"):String(r),O=o&&isArray(g)&&1===g.length?T+"[]":T;if(a&&isArray(g)&&0===g.length)return O+"[]";for(var k=0;k<S.length;++k){var I=S[k],P="object"==typeof I&&I&&void 0!==I.value?I.value:g[I];if(!i||null!==P){var x=d&&l?String(I).replace(/\./g,"%2E"):String(I),z=isArray(g)?"function"==typeof t?t(O,x):O:O+(d?"."+x:"["+x+"]");v.set(e,b);var K=getSideChannel();K.set(sentinel,v),pushToArray(E,stringify(P,z,t,o,a,n,i,l,"comma"===t&&m&&isArray(g)?null:s,f,u,d,y,c,p,m,h,K))}}return E},normalizeStringifyOptions=function normalizeStringifyOptions(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var r=e.charset||defaults.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=formats.default;if(void 0!==e.format){if(!has.call(formats.formatters,e.format))throw new TypeError("Unknown format option provided.");t=e.format}var o,a=formats.formatters[t],n=defaults.filter;if(("function"==typeof e.filter||isArray(e.filter))&&(n=e.filter),o=e.arrayFormat in arrayPrefixGenerators?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":defaults.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var i=void 0===e.allowDots?!0===e.encodeDotInKeys||defaults.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:defaults.addQueryPrefix,allowDots:i,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,arrayFormat:o,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?defaults.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:defaults.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:defaults.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:defaults.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:defaults.encodeValuesOnly,filter:n,format:t,formatter:a,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:defaults.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:defaults.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling}};module.exports=function(e,r){var t,o=e,a=normalizeStringifyOptions(r);"function"==typeof a.filter?o=(0,a.filter)("",o):isArray(a.filter)&&(t=a.filter);var n=[];if("object"!=typeof o||null===o)return"";var i=arrayPrefixGenerators[a.arrayFormat],l="comma"===i&&a.commaRoundTrip;t||(t=Object.keys(o)),a.sort&&t.sort(a.sort);for(var s=getSideChannel(),f=0;f<t.length;++f){var u=t[f],d=o[u];a.skipNulls&&null===d||pushToArray(n,stringify(d,u,i,l,a.allowEmptyArrays,a.strictNullHandling,a.skipNulls,a.encodeDotInKeys,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,s))}var y=n.join(a.delimiter),c=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?c+="utf8=%26%2310003%3B&":c+="utf8=%E2%9C%93&"),y.length>0?c+y:""};
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
},{}],7:[function(require,module,exports){
|
|
22
22
|
"use strict";var bind=require(24),$apply=require(8),$call=require(9),$reflectApply=require(11);module.exports=$reflectApply||bind.call($call,$apply);
|
|
23
23
|
|
|
24
|
-
},{"11":11,"24":24,"8":8,"9":9}],
|
|
25
|
-
"use strict";module.exports=Function.prototype.apply;
|
|
26
|
-
|
|
27
|
-
},{}],9:[function(require,module,exports){
|
|
24
|
+
},{"11":11,"24":24,"8":8,"9":9}],9:[function(require,module,exports){
|
|
28
25
|
"use strict";module.exports=Function.prototype.call;
|
|
29
26
|
|
|
27
|
+
},{}],8:[function(require,module,exports){
|
|
28
|
+
"use strict";module.exports=Function.prototype.apply;
|
|
29
|
+
|
|
30
30
|
},{}],24:[function(require,module,exports){
|
|
31
31
|
"use strict";var implementation=require(23);module.exports=Function.prototype.bind||implementation;
|
|
32
32
|
|
|
@@ -81,21 +81,21 @@
|
|
|
81
81
|
},{}],35:[function(require,module,exports){
|
|
82
82
|
"use strict";module.exports=Math.floor;
|
|
83
83
|
|
|
84
|
+
},{}],37:[function(require,module,exports){
|
|
85
|
+
"use strict";module.exports=Math.max;
|
|
86
|
+
|
|
87
|
+
},{}],38:[function(require,module,exports){
|
|
88
|
+
"use strict";module.exports=Math.min;
|
|
89
|
+
|
|
84
90
|
},{}],34:[function(require,module,exports){
|
|
85
91
|
"use strict";module.exports=Math.abs;
|
|
86
92
|
|
|
87
93
|
},{}],39:[function(require,module,exports){
|
|
88
94
|
"use strict";module.exports=Math.pow;
|
|
89
95
|
|
|
90
|
-
},{}],38:[function(require,module,exports){
|
|
91
|
-
"use strict";module.exports=Math.min;
|
|
92
|
-
|
|
93
96
|
},{}],40:[function(require,module,exports){
|
|
94
97
|
"use strict";module.exports=Math.round;
|
|
95
98
|
|
|
96
|
-
},{}],37:[function(require,module,exports){
|
|
97
|
-
"use strict";module.exports=Math.max;
|
|
98
|
-
|
|
99
99
|
},{}],27:[function(require,module,exports){
|
|
100
100
|
"use strict";module.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null;
|
|
101
101
|
|
|
@@ -105,13 +105,13 @@
|
|
|
105
105
|
},{"22":22}],41:[function(require,module,exports){
|
|
106
106
|
"use strict";var $isNaN=require(36);module.exports=function sign(i){return $isNaN(i)||0===i?i:i<0?-1:1};
|
|
107
107
|
|
|
108
|
-
},{"36":36}],
|
|
109
|
-
"use strict";var origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=require(32);module.exports=function hasNativeSymbols(){return"function"==typeof origSymbol&&"function"==typeof Symbol&&"symbol"==typeof origSymbol("foo")&&"symbol"==typeof Symbol("bar")&&hasSymbolSham()};
|
|
110
|
-
|
|
111
|
-
},{"32":32}],33:[function(require,module,exports){
|
|
108
|
+
},{"36":36}],33:[function(require,module,exports){
|
|
112
109
|
"use strict";var call=Function.prototype.call,$hasOwn=Object.prototype.hasOwnProperty,bind=require(24);module.exports=bind.call(call,$hasOwn);
|
|
113
110
|
|
|
114
|
-
},{"24":24}],
|
|
111
|
+
},{"24":24}],31:[function(require,module,exports){
|
|
112
|
+
"use strict";var origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=require(32);module.exports=function hasNativeSymbols(){return"function"==typeof origSymbol&&"function"==typeof Symbol&&"symbol"==typeof origSymbol("foo")&&"symbol"==typeof Symbol("bar")&&hasSymbolSham()};
|
|
113
|
+
|
|
114
|
+
},{"32":32}],28:[function(require,module,exports){
|
|
115
115
|
"use strict";var reflectGetProto=require(27),originalGetProto=require(26),getDunderProto=require(13);module.exports=reflectGetProto?function getProto(t){return reflectGetProto(t)}:originalGetProto?function getProto(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return originalGetProto(t)}:getDunderProto?function getProto(t){return getDunderProto(t)}:null;
|
|
116
116
|
|
|
117
117
|
},{"13":13,"26":26,"27":27}],29:[function(require,module,exports){
|
|
@@ -67,10 +67,10 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
67
67
|
var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
|
|
68
68
|
var parts = cleanStr.split(
|
|
69
69
|
options.delimiter,
|
|
70
|
-
options.throwOnLimitExceeded ? limit + 1 : limit
|
|
70
|
+
options.throwOnLimitExceeded && typeof limit !== 'undefined' ? limit + 1 : limit
|
|
71
71
|
);
|
|
72
72
|
|
|
73
|
-
if (options.throwOnLimitExceeded && parts.length > limit) {
|
|
73
|
+
if (options.throwOnLimitExceeded && typeof limit !== 'undefined' && parts.length > limit) {
|
|
74
74
|
throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -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.15.
|
|
5
|
+
"version": "6.15.1",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/ljharb/qs.git"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@browserify/envify": "^6.0.0",
|
|
38
38
|
"@browserify/uglifyify": "^6.0.0",
|
|
39
|
-
"@ljharb/eslint-config": "^22.
|
|
39
|
+
"@ljharb/eslint-config": "^22.2.2",
|
|
40
40
|
"browserify": "^16.5.2",
|
|
41
41
|
"bundle-collapser": "^1.4.0",
|
|
42
42
|
"common-shakeify": "~1.0.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"has-property-descriptors": "^1.0.2",
|
|
52
52
|
"has-proto": "^1.2.0",
|
|
53
53
|
"has-symbols": "^1.1.0",
|
|
54
|
-
"iconv-lite": "^0.5.
|
|
54
|
+
"iconv-lite": "^0.5.2",
|
|
55
55
|
"in-publish": "^2.0.1",
|
|
56
56
|
"jackspeak": "=2.1.1",
|
|
57
57
|
"jiti": "^0.0.0",
|
|
@@ -213,6 +213,18 @@ test('parse()', function (t) {
|
|
|
213
213
|
st.end();
|
|
214
214
|
});
|
|
215
215
|
|
|
216
|
+
t.test('ignores prototype keys when depth = 0 and allowPrototypes is false', function (st) {
|
|
217
|
+
st.deepEqual(qs.parse('toString=foo', { depth: 0 }), {});
|
|
218
|
+
st.deepEqual(qs.parse('hasOwnProperty=bar', { depth: 0 }), {});
|
|
219
|
+
st.deepEqual(qs.parse('toString=foo&a=b', { depth: 0 }), { a: 'b' });
|
|
220
|
+
st.end();
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
t.test('allows prototype keys when depth = 0 and allowPrototypes is true', function (st) {
|
|
224
|
+
st.deepEqual(qs.parse('toString=foo', { depth: 0, allowPrototypes: true }), { toString: 'foo' });
|
|
225
|
+
st.end();
|
|
226
|
+
});
|
|
227
|
+
|
|
216
228
|
t.test('uses original key when depth = false', function (st) {
|
|
217
229
|
st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: false }), { 'a[0]': 'b', 'a[1]': 'c' });
|
|
218
230
|
st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: false }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' });
|
|
@@ -1074,6 +1086,15 @@ test('parse()', function (t) {
|
|
|
1074
1086
|
};
|
|
1075
1087
|
|
|
1076
1088
|
st.deepEqual(qs.parse('KeY=vAlUe', { decoder: decoder }), { key: 'VALUE' });
|
|
1089
|
+
|
|
1090
|
+
var noopDecoder = function () { return 'x'; };
|
|
1091
|
+
noopDecoder();
|
|
1092
|
+
st['throws'](
|
|
1093
|
+
function () { decoder('x', noopDecoder, 'utf-8', 'unknown'); },
|
|
1094
|
+
'this should never happen! type: unknown',
|
|
1095
|
+
'decoder throws for unexpected type'
|
|
1096
|
+
);
|
|
1097
|
+
|
|
1077
1098
|
st.end();
|
|
1078
1099
|
});
|
|
1079
1100
|
|
|
@@ -1103,6 +1124,14 @@ test('parse()', function (t) {
|
|
|
1103
1124
|
new RangeError('Parameter limit exceeded. Only 3 parameters allowed.'),
|
|
1104
1125
|
'throws error when parameter limit is exceeded'
|
|
1105
1126
|
);
|
|
1127
|
+
|
|
1128
|
+
sst['throws'](
|
|
1129
|
+
function () {
|
|
1130
|
+
qs.parse('a=1&b=2', { parameterLimit: 1, throwOnLimitExceeded: true });
|
|
1131
|
+
},
|
|
1132
|
+
new RangeError('Parameter limit exceeded. Only 1 parameter allowed.'),
|
|
1133
|
+
'throws error with singular "parameter" when parameterLimit is 1'
|
|
1134
|
+
);
|
|
1106
1135
|
sst.end();
|
|
1107
1136
|
});
|
|
1108
1137
|
|
|
@@ -1124,6 +1153,12 @@ test('parse()', function (t) {
|
|
|
1124
1153
|
sst.end();
|
|
1125
1154
|
});
|
|
1126
1155
|
|
|
1156
|
+
st.test('allows unlimited parameters when parameterLimit is Infinity and throwOnLimitExceeded is true', function (sst) {
|
|
1157
|
+
var result = qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: Infinity, throwOnLimitExceeded: true });
|
|
1158
|
+
sst.deepEqual(result, { a: '1', b: '2', c: '3', d: '4', e: '5', f: '6' }, 'parses all parameters without truncation or throwing');
|
|
1159
|
+
sst.end();
|
|
1160
|
+
});
|
|
1161
|
+
|
|
1127
1162
|
st.end();
|
|
1128
1163
|
});
|
|
1129
1164
|
|
|
@@ -1189,6 +1224,14 @@ test('parse()', function (t) {
|
|
|
1189
1224
|
'throws error when a sparse index exceeds arrayLimit'
|
|
1190
1225
|
);
|
|
1191
1226
|
|
|
1227
|
+
sst['throws'](
|
|
1228
|
+
function () {
|
|
1229
|
+
qs.parse('a[2]=b', { arrayLimit: 1, throwOnLimitExceeded: true });
|
|
1230
|
+
},
|
|
1231
|
+
new RangeError('Array limit exceeded. Only 1 element allowed in an array.'),
|
|
1232
|
+
'throws error with singular "element" when arrayLimit is 1'
|
|
1233
|
+
);
|
|
1234
|
+
|
|
1192
1235
|
sst.end();
|
|
1193
1236
|
});
|
|
1194
1237
|
|
|
@@ -1206,6 +1249,17 @@ test('parse()', function (t) {
|
|
|
1206
1249
|
sst.end();
|
|
1207
1250
|
});
|
|
1208
1251
|
|
|
1252
|
+
st.test('throws when duplicate bracket keys exceed arrayLimit with throwOnLimitExceeded', function (sst) {
|
|
1253
|
+
sst['throws'](
|
|
1254
|
+
function () {
|
|
1255
|
+
qs.parse('a[]=1&a[]=2&a[]=3&a[]=4&a[]=5&a[]=6', { arrayLimit: 5, throwOnLimitExceeded: true });
|
|
1256
|
+
},
|
|
1257
|
+
new RangeError('Array limit exceeded. Only 5 elements allowed in an array.'),
|
|
1258
|
+
'throws error when duplicate bracket notation exceeds array limit'
|
|
1259
|
+
);
|
|
1260
|
+
sst.end();
|
|
1261
|
+
});
|
|
1262
|
+
|
|
1209
1263
|
st.end();
|
|
1210
1264
|
});
|
|
1211
1265
|
|
|
@@ -1462,6 +1516,14 @@ test('comma + arrayLimit', function (t) {
|
|
|
1462
1516
|
new RangeError('Array limit exceeded. Only 3 elements allowed in an array.'),
|
|
1463
1517
|
'throws error when comma-split exceeds array limit'
|
|
1464
1518
|
);
|
|
1519
|
+
|
|
1520
|
+
st['throws'](
|
|
1521
|
+
function () {
|
|
1522
|
+
qs.parse('a=1,2,3', { comma: true, arrayLimit: 1, throwOnLimitExceeded: true });
|
|
1523
|
+
},
|
|
1524
|
+
new RangeError('Array limit exceeded. Only 1 element allowed in an array.'),
|
|
1525
|
+
'throws error with singular "element" when arrayLimit is 1'
|
|
1526
|
+
);
|
|
1465
1527
|
st.end();
|
|
1466
1528
|
});
|
|
1467
1529
|
|
|
@@ -1564,5 +1626,29 @@ test('mixed array and object notation', function (t) {
|
|
|
1564
1626
|
st.end();
|
|
1565
1627
|
});
|
|
1566
1628
|
|
|
1629
|
+
t.test('uses existing array length for currentArrayLength when parsing object input with bracket keys', function (st) {
|
|
1630
|
+
var input = {};
|
|
1631
|
+
var arr = ['x', 'y'];
|
|
1632
|
+
arr.a = ['z', 'w'];
|
|
1633
|
+
input['a[]'] = arr;
|
|
1634
|
+
st.deepEqual(qs.parse(input), { a: ['x', 'y'] }, 'parses object input with bracket keys using existing array values');
|
|
1635
|
+
st.end();
|
|
1636
|
+
});
|
|
1637
|
+
|
|
1638
|
+
t.test('throws with singular message when object input bracket key exceeds arrayLimit of 1', function (st) {
|
|
1639
|
+
var input = {};
|
|
1640
|
+
var arr = ['x'];
|
|
1641
|
+
arr.a = ['z', 'w'];
|
|
1642
|
+
input['a[]'] = arr;
|
|
1643
|
+
st['throws'](
|
|
1644
|
+
function () {
|
|
1645
|
+
qs.parse(input, { throwOnLimitExceeded: true, arrayLimit: 1 });
|
|
1646
|
+
},
|
|
1647
|
+
new RangeError('Array limit exceeded. Only 1 element allowed in an array.'),
|
|
1648
|
+
'throws singular error for object input exceeding arrayLimit 1'
|
|
1649
|
+
);
|
|
1650
|
+
st.end();
|
|
1651
|
+
});
|
|
1652
|
+
|
|
1567
1653
|
t.end();
|
|
1568
1654
|
});
|
|
@@ -1188,6 +1188,15 @@ test('stringify()', function (t) {
|
|
|
1188
1188
|
};
|
|
1189
1189
|
|
|
1190
1190
|
st.deepEqual(qs.stringify({ KeY: 'vAlUe' }, { encoder: encoder }), 'key=VALUE');
|
|
1191
|
+
|
|
1192
|
+
var noopEncoder = function () { return 'x'; };
|
|
1193
|
+
noopEncoder();
|
|
1194
|
+
st['throws'](
|
|
1195
|
+
function () { encoder('x', noopEncoder, 'utf-8', 'unknown'); },
|
|
1196
|
+
'this should never happen! type: unknown',
|
|
1197
|
+
'encoder throws for unexpected type'
|
|
1198
|
+
);
|
|
1199
|
+
|
|
1191
1200
|
st.end();
|
|
1192
1201
|
});
|
|
1193
1202
|
|
|
@@ -31,6 +31,7 @@ test('merge()', function (t) {
|
|
|
31
31
|
t.deepEqual(noOptionsNonObjectSource, { foo: 'baz', bar: true });
|
|
32
32
|
|
|
33
33
|
var func = function f() {};
|
|
34
|
+
func();
|
|
34
35
|
t.deepEqual(
|
|
35
36
|
utils.merge(func, { foo: 'bar' }),
|
|
36
37
|
[func, { foo: 'bar' }],
|
|
@@ -112,6 +113,15 @@ test('merge()', function (t) {
|
|
|
112
113
|
s2t.end();
|
|
113
114
|
});
|
|
114
115
|
|
|
116
|
+
st.test('merges overflow object into primitive with plainObjects', function (s2t) {
|
|
117
|
+
var overflow = utils.combine(['a'], 'b', 0, false);
|
|
118
|
+
s2t.ok(utils.isOverflow(overflow), 'overflow object is marked');
|
|
119
|
+
var merged = utils.merge('c', overflow, { plainObjects: true });
|
|
120
|
+
s2t.ok(utils.isOverflow(merged), 'result is also marked as overflow');
|
|
121
|
+
s2t.deepEqual(merged, { __proto__: null, 0: 'c', 1: 'a', 2: 'b' }, 'creates null-proto object with primitive at 0');
|
|
122
|
+
s2t.end();
|
|
123
|
+
});
|
|
124
|
+
|
|
115
125
|
st.test('merges overflow object with multiple values into primitive', function (s2t) {
|
|
116
126
|
// Create an overflow object via combine: 3 elements (indices 0-2) with limit 0
|
|
117
127
|
var overflow = utils.combine(['b', 'c'], 'd', 0, false);
|
|
@@ -128,6 +138,21 @@ test('merge()', function (t) {
|
|
|
128
138
|
s2t.end();
|
|
129
139
|
});
|
|
130
140
|
|
|
141
|
+
st.test('merges primitive into array that exceeds arrayLimit', function (s2t) {
|
|
142
|
+
var arr = ['a', 'b', 'c'];
|
|
143
|
+
var merged = utils.merge(arr, 'd', { arrayLimit: 1 });
|
|
144
|
+
s2t.ok(utils.isOverflow(merged), 'result is marked as overflow');
|
|
145
|
+
s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'converts to overflow object with primitive appended');
|
|
146
|
+
s2t.end();
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
st.test('merges array into primitive that exceeds arrayLimit', function (s2t) {
|
|
150
|
+
var merged = utils.merge('a', ['b', 'c'], { arrayLimit: 1 });
|
|
151
|
+
s2t.ok(utils.isOverflow(merged), 'result is marked as overflow');
|
|
152
|
+
s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c' }, 'converts to overflow object');
|
|
153
|
+
s2t.end();
|
|
154
|
+
});
|
|
155
|
+
|
|
131
156
|
st.end();
|
|
132
157
|
});
|
|
133
158
|
|
|
@@ -376,7 +401,9 @@ test('encode', function (t) {
|
|
|
376
401
|
});
|
|
377
402
|
|
|
378
403
|
test('isBuffer()', function (t) {
|
|
379
|
-
|
|
404
|
+
var fn = function () {};
|
|
405
|
+
fn();
|
|
406
|
+
forEach([null, undefined, true, false, '', 'abc', 42, 0, NaN, {}, [], fn, /a/g], function (x) {
|
|
380
407
|
t.equal(utils.isBuffer(x), false, inspect(x) + ' is not a buffer');
|
|
381
408
|
});
|
|
382
409
|
|
|
@@ -386,8 +413,9 @@ test('isBuffer()', function (t) {
|
|
|
386
413
|
var saferBuffer = SaferBuffer.from('abc');
|
|
387
414
|
t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer');
|
|
388
415
|
|
|
389
|
-
var buffer =
|
|
390
|
-
t.
|
|
416
|
+
var buffer = SaferBuffer.from('abc');
|
|
417
|
+
t.notEqual(saferBuffer, buffer, 'different buffer instances');
|
|
418
|
+
t.equal(utils.isBuffer(buffer), true, 'another Buffer instance is a buffer');
|
|
391
419
|
t.end();
|
|
392
420
|
});
|
|
393
421
|
|
|
@@ -5,11 +5,32 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.0.1](https://github.com/ljharb/side-channel-list.git
|
|
9
|
+
/compare/v1.0.0...v1.0.1) - 2026-04-08
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- [Fix] `delete`: do not reset the list when deleting the head node of a multi-node list [`#3`](https://github.com/ljharb/side-channel-list.git
|
|
14
|
+
/issues/3)
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [actions] update workflows [`9e79e6b`](https://github.com/ljharb/side-channel-list.git
|
|
19
|
+
/commit/9e79e6bf845532fafbf03b547429fe4f737214a3)
|
|
20
|
+
- [Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `eslint`, `npmignore` [`babf3ca`](https://github.com/ljharb/side-channel-list.git
|
|
21
|
+
/commit/babf3ca4849d2fd893a470a6b82c62a80ccc9307)
|
|
22
|
+
- [Deps] update `object-inspect` [`9f0f4b8`](https://github.com/ljharb/side-channel-list.git
|
|
23
|
+
/commit/9f0f4b88ff2aa8b7b7c9e589ac1513f133d64b9f)
|
|
24
|
+
|
|
8
25
|
## v1.0.0 - 2024-12-10
|
|
9
26
|
|
|
10
27
|
### Commits
|
|
11
28
|
|
|
12
|
-
- Initial implementation, tests, readme, types [`5d6baee`](https://github.com/ljharb/side-channel-list
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
29
|
+
- Initial implementation, tests, readme, types [`5d6baee`](https://github.com/ljharb/side-channel-list.git
|
|
30
|
+
/commit/5d6baee5c9054a1238007f5a1dfc109a7a816251)
|
|
31
|
+
- Initial commit [`3ae784c`](https://github.com/ljharb/side-channel-list.git
|
|
32
|
+
/commit/3ae784c63a47895fbaeed2a91ab54a8029a7a100)
|
|
33
|
+
- npm init [`07055a4`](https://github.com/ljharb/side-channel-list.git
|
|
34
|
+
/commit/07055a4d139895565b199dba5fe2479c1a1b9e28)
|
|
35
|
+
- Only apps should have lockfiles [`9573058`](https://github.com/ljharb/side-channel-list.git
|
|
36
|
+
/commit/9573058a47494e2d68f8c6c77b5d7fbe441949c1)
|
|
@@ -84,9 +84,8 @@ module.exports = function getSideChannelList() {
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
'delete': function (key) {
|
|
87
|
-
var root = $o && $o.next;
|
|
88
87
|
var deletedNode = listDelete($o, key);
|
|
89
|
-
if (deletedNode &&
|
|
88
|
+
if (deletedNode && $o && !$o.next) {
|
|
90
89
|
$o = void undefined;
|
|
91
90
|
}
|
|
92
91
|
return !!deletedNode;
|
|
@@ -108,6 +107,5 @@ module.exports = function getSideChannelList() {
|
|
|
108
107
|
listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
|
|
109
108
|
}
|
|
110
109
|
};
|
|
111
|
-
// @ts-expect-error TODO: figure out why this is erroring
|
|
112
110
|
return channel;
|
|
113
111
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "side-channel-list",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Store information about any JS value in a side channel, using a linked list",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"homepage": "https://github.com/ljharb/side-channel-list#readme",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"es-errors": "^1.3.0",
|
|
41
|
-
"object-inspect": "^1.13.
|
|
41
|
+
"object-inspect": "^1.13.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@arethetypeswrong/cli": "^0.
|
|
45
|
-
"@ljharb/eslint-config": "^
|
|
46
|
-
"@ljharb/tsconfig": "^0.
|
|
44
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
45
|
+
"@ljharb/eslint-config": "^22.2.2",
|
|
46
|
+
"@ljharb/tsconfig": "^0.3.2",
|
|
47
47
|
"@types/object-inspect": "^1.13.0",
|
|
48
|
-
"@types/tape": "^5.
|
|
48
|
+
"@types/tape": "^5.8.1",
|
|
49
49
|
"auto-changelog": "^2.5.0",
|
|
50
50
|
"eclint": "^2.8.1",
|
|
51
51
|
"encoding": "^0.1.13",
|
|
52
|
-
"eslint": "
|
|
52
|
+
"eslint": "^8.57.1",
|
|
53
53
|
"evalmd": "^0.0.19",
|
|
54
54
|
"in-publish": "^2.0.1",
|
|
55
|
-
"npmignore": "^0.3.
|
|
55
|
+
"npmignore": "^0.3.5",
|
|
56
56
|
"nyc": "^10.3.2",
|
|
57
57
|
"safe-publish-latest": "^2.0.0",
|
|
58
58
|
"tape": "^5.9.0",
|
|
@@ -100,5 +100,55 @@ test('getSideChannelList', function (t) {
|
|
|
100
100
|
st.end();
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
+
t.test('delete: first node in a multi-node list', function (st) {
|
|
104
|
+
var channel = getSideChannelList();
|
|
105
|
+
|
|
106
|
+
channel.set('a', 1);
|
|
107
|
+
channel.set('b', 2);
|
|
108
|
+
|
|
109
|
+
st.equal(channel['delete']('b'), true, 'deleting first data node yields true');
|
|
110
|
+
|
|
111
|
+
st.equal(channel.has('a'), true, 'second node is still present after deleting first');
|
|
112
|
+
st.equal(channel.get('a'), 1, 'second node value is intact after deleting first');
|
|
113
|
+
st.equal(channel.has('b'), false, 'deleted node is gone');
|
|
114
|
+
|
|
115
|
+
st.end();
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
t.test('delete: last remaining node empties the list', function (st) {
|
|
119
|
+
var channel = getSideChannelList();
|
|
120
|
+
|
|
121
|
+
channel.set('a', 1);
|
|
122
|
+
channel.set('b', 2);
|
|
123
|
+
|
|
124
|
+
st.equal(channel['delete']('b'), true, 'delete first node');
|
|
125
|
+
st.equal(channel['delete']('a'), true, 'delete second (last) node');
|
|
126
|
+
|
|
127
|
+
st.equal(channel.has('a'), false, 'a is gone');
|
|
128
|
+
st.equal(channel.has('b'), false, 'b is gone');
|
|
129
|
+
st.equal(channel.get('a'), undefined, 'get a yields undefined');
|
|
130
|
+
|
|
131
|
+
channel.set('c', 3);
|
|
132
|
+
st.equal(channel.get('c'), 3, 'can set new values after emptying');
|
|
133
|
+
|
|
134
|
+
st.end();
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
t.test('delete: middle node in a multi-node list', function (st) {
|
|
138
|
+
var channel = getSideChannelList();
|
|
139
|
+
|
|
140
|
+
channel.set('a', 1);
|
|
141
|
+
channel.set('b', 2);
|
|
142
|
+
channel.set('c', 3);
|
|
143
|
+
|
|
144
|
+
st.equal(channel['delete']('b'), true, 'deleting middle node yields true');
|
|
145
|
+
|
|
146
|
+
st.equal(channel.get('a'), 1, 'first node still intact');
|
|
147
|
+
st.equal(channel.has('b'), false, 'middle node is gone');
|
|
148
|
+
st.equal(channel.get('c'), 3, 'last node still intact');
|
|
149
|
+
|
|
150
|
+
st.end();
|
|
151
|
+
});
|
|
152
|
+
|
|
103
153
|
t.end();
|
|
104
154
|
});
|