From de37398af08036d62a6b4eb6d475c02b0e6f1161 Mon Sep 17 00:00:00 2001 From: Darcy Clarke Date: Mon, 14 Nov 2022 19:14:52 -0500 Subject: [PATCH] query-string@6.14.1 --- .../decode-uri-component/package.json | 4 +- node_modules/filter-obj/index.js | 17 + node_modules/filter-obj/license | 21 ++ node_modules/filter-obj/package.json | 69 ++++ node_modules/filter-obj/readme.md | 41 +++ node_modules/query-string/index.d.ts | 299 ++++++++++++++++- node_modules/query-string/index.js | 182 +++++++++-- node_modules/query-string/license | 2 +- node_modules/query-string/package.json | 31 +- node_modules/query-string/readme.md | 301 ++++++++++++++++-- node_modules/strict-uri-encode/package.json | 4 +- package-lock.json | 16 +- package.json | 2 +- 13 files changed, 902 insertions(+), 87 deletions(-) create mode 100644 node_modules/filter-obj/index.js create mode 100644 node_modules/filter-obj/license create mode 100644 node_modules/filter-obj/package.json create mode 100644 node_modules/filter-obj/readme.md diff --git a/node_modules/decode-uri-component/package.json b/node_modules/decode-uri-component/package.json index 4af5d4c04f54d..1b89b88103ff5 100644 --- a/node_modules/decode-uri-component/package.json +++ b/node_modules/decode-uri-component/package.json @@ -2,7 +2,7 @@ "_from": "decode-uri-component@^0.2.0", "_id": "decode-uri-component@0.2.0", "_inBundle": false, - "_integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "_integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==", "_location": "/decode-uri-component", "_phantomChildren": {}, "_requested": { @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "_shasum": "eb3913333458775cb84cd1a1fae062106bb87545", "_spec": "decode-uri-component@^0.2.0", - "_where": "/Users/rebecca/code/npm/node_modules/query-string", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/query-string", "author": { "name": "Sam Verschueren", "email": "sam.verschueren@gmail.com", diff --git a/node_modules/filter-obj/index.js b/node_modules/filter-obj/index.js new file mode 100644 index 0000000000000..c462e030d2eb7 --- /dev/null +++ b/node_modules/filter-obj/index.js @@ -0,0 +1,17 @@ +'use strict'; +module.exports = function (obj, predicate) { + var ret = {}; + var keys = Object.keys(obj); + var isArr = Array.isArray(predicate); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var val = obj[key]; + + if (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) { + ret[key] = val; + } + } + + return ret; +}; diff --git a/node_modules/filter-obj/license b/node_modules/filter-obj/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/filter-obj/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/filter-obj/package.json b/node_modules/filter-obj/package.json new file mode 100644 index 0000000000000..2f2297d0aa66d --- /dev/null +++ b/node_modules/filter-obj/package.json @@ -0,0 +1,69 @@ +{ + "_from": "filter-obj@^1.1.0", + "_id": "filter-obj@1.1.0", + "_inBundle": false, + "_integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", + "_location": "/filter-obj", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "filter-obj@^1.1.0", + "name": "filter-obj", + "escapedName": "filter-obj", + "rawSpec": "^1.1.0", + "saveSpec": null, + "fetchSpec": "^1.1.0" + }, + "_requiredBy": [ + "/query-string" + ], + "_resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "_shasum": "9b311112bc6c6127a16e016c6c5d7f19e0805c5b", + "_spec": "filter-obj@^1.1.0", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/query-string", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/filter-obj/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Filter object keys and values into a new object", + "devDependencies": { + "ava": "0.0.4", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/filter-obj#readme", + "keywords": [ + "filter", + "obj", + "object", + "key", + "keys", + "value", + "values", + "val", + "iterate", + "iterator" + ], + "license": "MIT", + "name": "filter-obj", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/filter-obj.git" + }, + "scripts": { + "test": "xo && node test.js" + }, + "version": "1.1.0" +} diff --git a/node_modules/filter-obj/readme.md b/node_modules/filter-obj/readme.md new file mode 100644 index 0000000000000..6de3c59c5e323 --- /dev/null +++ b/node_modules/filter-obj/readme.md @@ -0,0 +1,41 @@ +# filter-obj [![Build Status](https://travis-ci.org/sindresorhus/filter-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/filter-obj) + +> Filter object keys and values into a new object + + +## Install + +``` +$ npm install --save filter-obj +``` + + +## Usage + +```js +var filterObj = require('filter-obj'); + +var obj = { + foo: true, + bar: false +}; + +var newObject = filterObj(obj, function (key, value, object) { + return value === true; +}); +//=> {foo: true} + +var newObject2 = filterObj(obj, ['bar']); +//=> {bar: true} +``` + + +## Related + +- [map-obj](https://github.com/sindresorhus/map-obj) - Map object keys and values into a new object +- [object-assign](https://github.com/sindresorhus/object-assign) - Copy enumerable own properties from one or more source objects to a target object + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/query-string/index.d.ts b/node_modules/query-string/index.d.ts index a5bd661c2991d..4a115fbb2f15d 100644 --- a/node_modules/query-string/index.d.ts +++ b/node_modules/query-string/index.d.ts @@ -12,6 +12,8 @@ export interface ParseOptions { - `bracket`: Parse arrays with bracket representation: ``` + import queryString = require('query-string'); + queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); //=> {foo: ['1', '2', '3']} ``` @@ -19,6 +21,8 @@ export interface ParseOptions { - `index`: Parse arrays with index representation: ``` + import queryString = require('query-string'); + queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); //=> {foo: ['1', '2', '3']} ``` @@ -26,18 +30,38 @@ export interface ParseOptions { - `comma`: Parse arrays with elements separated by comma: ``` + import queryString = require('query-string'); + queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); //=> {foo: ['1', '2', '3']} ``` + - `separator`: Parse arrays with elements separated by a custom character: + + ``` + import queryString = require('query-string'); + + queryString.parse('foo=1|2|3', {arrayFormat: 'separator', arrayFormatSeparator: '|'}); + //=> {foo: ['1', '2', '3']} + ``` + - `none`: Parse arrays with elements using duplicate keys: ``` + import queryString = require('query-string'); + queryString.parse('foo=1&foo=2&foo=3'); //=> {foo: ['1', '2', '3']} ``` */ - readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'none'; + readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'separator' | 'none'; + + /** + The character used to separate array elements when using `{arrayFormat: 'separator'}`. + + @default , + */ + readonly arrayFormatSeparator?: string; /** Supports both `Function` as a custom sorting function or `false` to disable sorting. @@ -48,16 +72,22 @@ export interface ParseOptions { @example ``` + import queryString = require('query-string'); + const order = ['c', 'a', 'b']; queryString.parse('?a=one&b=two&c=three', { sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) }); - // => {c: 'three', a: 'one', b: 'two'} + //=> {c: 'three', a: 'one', b: 'two'} ``` + @example + ``` + import queryString = require('query-string'); + queryString.parse('?a=one&c=three&b=two', {sort: false}); - // => {a: 'one', c: 'three', b: 'two'} + //=> {a: 'one', c: 'three', b: 'two'} ``` */ readonly sort?: ((itemLeft: string, itemRight: string) => number) | false; @@ -68,7 +98,9 @@ export interface ParseOptions { @default false @example - ```js + ``` + import queryString = require('query-string'); + queryString.parse('foo=1', {parseNumbers: true}); //=> {foo: 1} ``` @@ -82,15 +114,32 @@ export interface ParseOptions { @example ``` + import queryString = require('query-string'); + queryString.parse('foo=true', {parseBooleans: true}); //=> {foo: true} ``` */ readonly parseBooleans?: boolean; + + /** + Parse the fragment identifier from the URL and add it to result object. + + @default false + + @example + ``` + import queryString = require('query-string'); + + queryString.parseUrl('https://foo.bar?foo=bar#xyz', {parseFragmentIdentifier: true}); + //=> {url: 'https://foo.bar', query: {foo: 'bar'}, fragmentIdentifier: 'xyz'} + ``` + */ + readonly parseFragmentIdentifier?: boolean; } export interface ParsedQuery { - [key: string]: T | T[] | null | undefined; + [key: string]: T | T[] | null; } /** @@ -108,17 +157,31 @@ export function parse(query: string, options?: ParseOptions): ParsedQuery; export interface ParsedUrl { readonly url: string; readonly query: ParsedQuery; + + /** + The fragment identifier of the URL. + + Present when the `parseFragmentIdentifier` option is `true`. + */ + readonly fragmentIdentifier?: string; } /** Extract the URL and the query string as an object. +If the `parseFragmentIdentifier` option is `true`, the object will also contain a `fragmentIdentifier` property. + @param url - The URL to parse. @example ``` +import queryString = require('query-string'); + queryString.parseUrl('https://foo.bar?foo=bar'); //=> {url: 'https://foo.bar', query: {foo: 'bar'}} + +queryString.parseUrl('https://foo.bar?foo=bar#xyz', {parseFragmentIdentifier: true}); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}, fragmentIdentifier: 'xyz'} ``` */ export function parseUrl(url: string, options?: ParseOptions): ParsedUrl; @@ -144,6 +207,8 @@ export interface StringifyOptions { - `bracket`: Serialize arrays using bracket representation: ``` + import queryString = require('query-string'); + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); //=> 'foo[]=1&foo[]=2&foo[]=3' ``` @@ -151,6 +216,8 @@ export interface StringifyOptions { - `index`: Serialize arrays using index representation: ``` + import queryString = require('query-string'); + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); //=> 'foo[0]=1&foo[1]=2&foo[2]=3' ``` @@ -158,18 +225,38 @@ export interface StringifyOptions { - `comma`: Serialize arrays by separating elements with comma: ``` + import queryString = require('query-string'); + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); //=> 'foo=1,2,3' ``` + - `separator`: Serialize arrays by separating elements with character: + + ``` + import queryString = require('query-string'); + + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'separator', arrayFormatSeparator: '|'}); + //=> 'foo=1|2|3' + ``` + - `none`: Serialize arrays by using duplicate keys: ``` + import queryString = require('query-string'); + queryString.stringify({foo: [1, 2, 3]}); //=> 'foo=1&foo=2&foo=3' ``` */ - readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'none'; + readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'separator' | 'none'; + + /** + The character used to separate array elements when using `{arrayFormat: 'separator'}`. + + @default , + */ + readonly arrayFormatSeparator?: string; /** Supports both `Function` as a custom sorting function or `false` to disable sorting. @@ -180,29 +267,223 @@ export interface StringifyOptions { @example ``` + import queryString = require('query-string'); + const order = ['c', 'a', 'b']; queryString.stringify({a: 1, b: 2, c: 3}, { sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) }); - // => 'c=3&a=1&b=2' + //=> 'c=3&a=1&b=2' + ``` + + @example + ``` + import queryString = require('query-string'); queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); - // => 'b=1&c=2&a=3' + //=> 'b=1&c=2&a=3' ``` */ readonly sort?: ((itemLeft: string, itemRight: string) => number) | false; + + /** + Skip keys with `null` as the value. + + Note that keys with `undefined` as the value are always skipped. + + @default false + + @example + ``` + import queryString = require('query-string'); + + queryString.stringify({a: 1, b: undefined, c: null, d: 4}, { + skipNull: true + }); + //=> 'a=1&d=4' + + queryString.stringify({a: undefined, b: null}, { + skipNull: true + }); + //=> '' + ``` + */ + readonly skipNull?: boolean; + + /** + Skip keys with an empty string as the value. + + @default false + + @example + ``` + import queryString = require('query-string'); + + queryString.stringify({a: 1, b: '', c: '', d: 4}, { + skipEmptyString: true + }); + //=> 'a=1&d=4' + ``` + + @example + ``` + import queryString = require('query-string'); + + queryString.stringify({a: '', b: ''}, { + skipEmptyString: true + }); + //=> '' + ``` + */ + readonly skipEmptyString?: boolean; } +export type Stringifiable = string | boolean | number | null | undefined; + +export type StringifiableRecord = Record< + string, + Stringifiable | readonly Stringifiable[] +>; + /** Stringify an object into a query string and sort the keys. */ export function stringify( - object: {[key: string]: any}, + // TODO: Use the below instead when the following TS issues are fixed: + // - https://github.com/microsoft/TypeScript/issues/15300 + // - https://github.com/microsoft/TypeScript/issues/42021 + // Context: https://github.com/sindresorhus/query-string/issues/298 + // object: StringifiableRecord, + object: Record, options?: StringifyOptions ): string; /** Extract a query string from a URL that can be passed into `.parse()`. + +Note: This behaviour can be changed with the `skipNull` option. */ export function extract(url: string): string; + +export interface UrlObject { + readonly url: string; + + /** + Overrides queries in the `url` property. + */ + readonly query?: StringifiableRecord; + + /** + Overrides the fragment identifier in the `url` property. + */ + readonly fragmentIdentifier?: string; +} + +/** +Stringify an object into a URL with a query string and sorting the keys. The inverse of [`.parseUrl()`](https://github.com/sindresorhus/query-string#parseurlstring-options) + +Query items in the `query` property overrides queries in the `url` property. + +The `fragmentIdentifier` property overrides the fragment identifier in the `url` property. + +@example +``` +queryString.stringifyUrl({url: 'https://foo.bar', query: {foo: 'bar'}}); +//=> 'https://foo.bar?foo=bar' + +queryString.stringifyUrl({url: 'https://foo.bar?foo=baz', query: {foo: 'bar'}}); +//=> 'https://foo.bar?foo=bar' + +queryString.stringifyUrl({ + url: 'https://foo.bar', + query: { + top: 'foo' + }, + fragmentIdentifier: 'bar' +}); +//=> 'https://foo.bar?top=foo#bar' +``` +*/ +export function stringifyUrl( + object: UrlObject, + options?: StringifyOptions +): string; + +/** +Pick query parameters from a URL. + +@param url - The URL containing the query parameters to pick. +@param keys - The names of the query parameters to keep. All other query parameters will be removed from the URL. +@param filter - A filter predicate that will be provided the name of each query parameter and its value. The `parseNumbers` and `parseBooleans` options also affect `value`. + +@returns The URL with the picked query parameters. + +@example +``` +queryString.pick('https://foo.bar?foo=1&bar=2#hello', ['foo']); +//=> 'https://foo.bar?foo=1#hello' + +queryString.pick('https://foo.bar?foo=1&bar=2#hello', (name, value) => value === 2, {parseNumbers: true}); +//=> 'https://foo.bar?bar=2#hello' +``` +*/ +export function pick( + url: string, + keys: readonly string[], + options?: ParseOptions & StringifyOptions +): string +export function pick( + url: string, + filter: (key: string, value: string | boolean | number) => boolean, + options?: {parseBooleans: true, parseNumbers: true} & ParseOptions & StringifyOptions +): string +export function pick( + url: string, + filter: (key: string, value: string | boolean) => boolean, + options?: {parseBooleans: true} & ParseOptions & StringifyOptions +): string +export function pick( + url: string, + filter: (key: string, value: string | number) => boolean, + options?: {parseNumbers: true} & ParseOptions & StringifyOptions +): string + +/** +Exclude query parameters from a URL. Like `.pick()` but reversed. + +@param url - The URL containing the query parameters to exclude. +@param keys - The names of the query parameters to remove. All other query parameters will remain in the URL. +@param filter - A filter predicate that will be provided the name of each query parameter and its value. The `parseNumbers` and `parseBooleans` options also affect `value`. + +@returns The URL without the excluded the query parameters. + +@example +``` +queryString.exclude('https://foo.bar?foo=1&bar=2#hello', ['foo']); +//=> 'https://foo.bar?bar=2#hello' + +queryString.exclude('https://foo.bar?foo=1&bar=2#hello', (name, value) => value === 2, {parseNumbers: true}); +//=> 'https://foo.bar?foo=1#hello' +``` +*/ +export function exclude( + url: string, + keys: readonly string[], + options?: ParseOptions & StringifyOptions +): string +export function exclude( + url: string, + filter: (key: string, value: string | boolean | number) => boolean, + options?: {parseBooleans: true, parseNumbers: true} & ParseOptions & StringifyOptions +): string +export function exclude( + url: string, + filter: (key: string, value: string | boolean) => boolean, + options?: {parseBooleans: true} & ParseOptions & StringifyOptions +): string +export function exclude( + url: string, + filter: (key: string, value: string | number) => boolean, + options?: {parseNumbers: true} & ParseOptions & StringifyOptions +): string diff --git a/node_modules/query-string/index.js b/node_modules/query-string/index.js index 35c13e1a66565..423b9d6bce4dd 100644 --- a/node_modules/query-string/index.js +++ b/node_modules/query-string/index.js @@ -2,13 +2,21 @@ const strictUriEncode = require('strict-uri-encode'); const decodeComponent = require('decode-uri-component'); const splitOnFirst = require('split-on-first'); +const filterObject = require('filter-obj'); + +const isNullOrUndefined = value => value === null || value === undefined; function encoderForArrayFormat(options) { switch (options.arrayFormat) { case 'index': return key => (result, value) => { const index = result.length; - if (value === undefined) { + + if ( + value === undefined || + (options.skipNull && value === null) || + (options.skipEmptyString && value === '') + ) { return result; } @@ -24,7 +32,11 @@ function encoderForArrayFormat(options) { case 'bracket': return key => (result, value) => { - if (value === undefined) { + if ( + value === undefined || + (options.skipNull && value === null) || + (options.skipEmptyString && value === '') + ) { return result; } @@ -36,21 +48,26 @@ function encoderForArrayFormat(options) { }; case 'comma': - return key => (result, value, index) => { + case 'separator': + return key => (result, value) => { if (value === null || value === undefined || value.length === 0) { return result; } - if (index === 0) { + if (result.length === 0) { return [[encode(key, options), '=', encode(value, options)].join('')]; } - return [[result, encode(value, options)].join(',')]; + return [[result, encode(value, options)].join(options.arrayFormatSeparator)]; }; default: return key => (result, value) => { - if (value === undefined) { + if ( + value === undefined || + (options.skipNull && value === null) || + (options.skipEmptyString && value === '') + ) { return result; } @@ -104,9 +121,12 @@ function parserForArrayFormat(options) { }; case 'comma': + case 'separator': return (key, value, accumulator) => { - const isArray = typeof value === 'string' && value.split('').indexOf(',') > -1; - const newValue = isArray ? value.split(',') : value; + const isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator); + const isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator)); + value = isEncodedArray ? decode(value, options) : value; + const newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options); accumulator[key] = newValue; }; @@ -122,6 +142,12 @@ function parserForArrayFormat(options) { } } +function validateArrayFormatSeparator(value) { + if (typeof value !== 'string' || value.length !== 1) { + throw new TypeError('arrayFormatSeparator must be single character string'); + } +} + function encode(value, options) { if (options.encode) { return options.strict ? strictUriEncode(value) : encodeURIComponent(value); @@ -161,6 +187,16 @@ function removeHash(input) { return input; } +function getHash(url) { + let hash = ''; + const hashStart = url.indexOf('#'); + if (hashStart !== -1) { + hash = url.slice(hashStart); + } + + return hash; +} + function extract(input) { input = removeHash(input); const queryStart = input.indexOf('?'); @@ -171,44 +207,65 @@ function extract(input) { return input.slice(queryStart + 1); } -function parse(input, options) { +function parseValue(value, options) { + if (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) { + value = Number(value); + } else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) { + value = value.toLowerCase() === 'true'; + } + + return value; +} + +function parse(query, options) { options = Object.assign({ decode: true, sort: true, arrayFormat: 'none', + arrayFormatSeparator: ',', parseNumbers: false, parseBooleans: false }, options); + validateArrayFormatSeparator(options.arrayFormatSeparator); + const formatter = parserForArrayFormat(options); // Create an object with no prototype const ret = Object.create(null); - if (typeof input !== 'string') { + if (typeof query !== 'string') { return ret; } - input = input.trim().replace(/^[?#&]/, ''); + query = query.trim().replace(/^[?#&]/, ''); - if (!input) { + if (!query) { return ret; } - for (const param of input.split('&')) { - let [key, value] = splitOnFirst(param.replace(/\+/g, ' '), '='); + for (const param of query.split('&')) { + if (param === '') { + continue; + } + + let [key, value] = splitOnFirst(options.decode ? param.replace(/\+/g, ' ') : param, '='); // Missing `=` should be `null`: // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters - value = value === undefined ? null : decode(value, options); + value = value === undefined ? null : ['comma', 'separator'].includes(options.arrayFormat) ? value : decode(value, options); + formatter(decode(key, options), value, ret); + } - if (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) { - value = Number(value); - } else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) { - value = value.toLowerCase() === 'true'; + for (const key of Object.keys(ret)) { + const value = ret[key]; + if (typeof value === 'object' && value !== null) { + for (const k of Object.keys(value)) { + value[k] = parseValue(value[k], options); + } + } else { + ret[key] = parseValue(value, options); } - - formatter(decode(key, options), value, ret); } if (options.sort === false) { @@ -239,11 +296,28 @@ exports.stringify = (object, options) => { options = Object.assign({ encode: true, strict: true, - arrayFormat: 'none' + arrayFormat: 'none', + arrayFormatSeparator: ',' }, options); + validateArrayFormatSeparator(options.arrayFormatSeparator); + + const shouldFilter = key => ( + (options.skipNull && isNullOrUndefined(object[key])) || + (options.skipEmptyString && object[key] === '') + ); + const formatter = encoderForArrayFormat(options); - const keys = Object.keys(object); + + const objectCopy = {}; + + for (const key of Object.keys(object)) { + if (!shouldFilter(key)) { + objectCopy[key] = object[key]; + } + } + + const keys = Object.keys(objectCopy); if (options.sort !== false) { keys.sort(options.sort); @@ -270,9 +344,61 @@ exports.stringify = (object, options) => { }).filter(x => x.length > 0).join('&'); }; -exports.parseUrl = (input, options) => { - return { - url: removeHash(input).split('?')[0] || '', - query: parse(extract(input), options) - }; +exports.parseUrl = (url, options) => { + options = Object.assign({ + decode: true + }, options); + + const [url_, hash] = splitOnFirst(url, '#'); + + return Object.assign( + { + url: url_.split('?')[0] || '', + query: parse(extract(url), options) + }, + options && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {} + ); +}; + +exports.stringifyUrl = (object, options) => { + options = Object.assign({ + encode: true, + strict: true + }, options); + + const url = removeHash(object.url).split('?')[0] || ''; + const queryFromUrl = exports.extract(object.url); + const parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false}); + + const query = Object.assign(parsedQueryFromUrl, object.query); + let queryString = exports.stringify(query, options); + if (queryString) { + queryString = `?${queryString}`; + } + + let hash = getHash(object.url); + if (object.fragmentIdentifier) { + hash = `#${encode(object.fragmentIdentifier, options)}`; + } + + return `${url}${queryString}${hash}`; +}; + +exports.pick = (input, filter, options) => { + options = Object.assign({ + parseFragmentIdentifier: true + }, options); + + const {url, query, fragmentIdentifier} = exports.parseUrl(input, options); + return exports.stringifyUrl({ + url, + query: filterObject(query, filter), + fragmentIdentifier + }, options); +}; + +exports.exclude = (input, filter, options) => { + const exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value); + + return exports.pick(input, exclusionFilter, options); }; diff --git a/node_modules/query-string/license b/node_modules/query-string/license index e7af2f77107d7..e464bf785eda7 100644 --- a/node_modules/query-string/license +++ b/node_modules/query-string/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (http://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/node_modules/query-string/package.json b/node_modules/query-string/package.json index 4df6b20ef0e91..731c2ceb0b9d8 100644 --- a/node_modules/query-string/package.json +++ b/node_modules/query-string/package.json @@ -1,32 +1,32 @@ { - "_from": "query-string@6.8.2", - "_id": "query-string@6.8.2", + "_from": "query-string@6.14.1", + "_id": "query-string@6.14.1", "_inBundle": false, - "_integrity": "sha512-J3Qi8XZJXh93t2FiKyd/7Ec6GNifsjKXUsVFkSBj/kjLsDylWhnCz4NT1bkPcKotttPW+QbKGqqPH8OoI2pdqw==", + "_integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==", "_location": "/query-string", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "query-string@6.8.2", + "raw": "query-string@6.14.1", "name": "query-string", "escapedName": "query-string", - "rawSpec": "6.8.2", + "rawSpec": "6.14.1", "saveSpec": null, - "fetchSpec": "6.8.2" + "fetchSpec": "6.14.1" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.8.2.tgz", - "_shasum": "36cb7e452ae11a4b5e9efee83375e0954407b2f6", - "_spec": "query-string@6.8.2", - "_where": "/Users/isaacs/dev/npm/cli", + "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz", + "_shasum": "7ac2dca46da7f309449ba0f86b1fd28255b0c86a", + "_spec": "query-string@6.14.1", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" + "url": "https://sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/query-string/issues" @@ -34,6 +34,7 @@ "bundleDependencies": false, "dependencies": { "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" }, @@ -41,6 +42,7 @@ "description": "Parse and stringify URL query strings", "devDependencies": { "ava": "^1.4.1", + "benchmark": "^2.1.4", "deep-equal": "^1.0.1", "fast-check": "^1.5.0", "tsd": "^0.7.3", @@ -53,6 +55,7 @@ "index.js", "index.d.ts" ], + "funding": "https://github.com/sponsors/sindresorhus", "homepage": "https://github.com/sindresorhus/query-string#readme", "keywords": [ "browser", @@ -67,7 +70,8 @@ "stringify", "encode", "decode", - "searchparams" + "searchparams", + "filter" ], "license": "MIT", "name": "query-string", @@ -76,7 +80,8 @@ "url": "git+https://github.com/sindresorhus/query-string.git" }, "scripts": { + "benchmark": "node benchmark.js", "test": "xo && ava && tsd" }, - "version": "6.8.2" + "version": "6.14.1" } diff --git a/node_modules/query-string/readme.md b/node_modules/query-string/readme.md index 297a47d5a00e9..280972e398ca8 100644 --- a/node_modules/query-string/readme.md +++ b/node_modules/query-string/readme.md @@ -1,7 +1,30 @@ -# query-string [![Build Status](https://travis-ci.org/sindresorhus/query-string.svg?branch=master)](https://travis-ci.org/sindresorhus/query-string) +# query-string > Parse and stringify URL [query strings](https://en.wikipedia.org/wiki/Query_string) +
+ +--- + +
+

+

+ + My open source work is supported by the community + +

+ Special thanks to: +
+
+ + + +

+
+ +--- + +
## Install @@ -9,8 +32,7 @@ $ npm install query-string ``` -This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, or, [if your project is using create-react-app v1](https://github.com/sindresorhus/query-string/pull/148#issuecomment-399656020), use version 5: `npm install query-string@5`. - +This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, or, if your project is using create-react-app v1, use version 5: `npm install query-string@5`. ## Usage @@ -43,7 +65,6 @@ console.log(location.search); //=> '?foo=unicorn&ilike=pizza' ``` - ## API ### .parse(string, options?) @@ -58,19 +79,21 @@ Type: `object` ##### decode -Type: `boolean`
+Type: `boolean`\ Default: `true` Decode the keys and values. URL components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). ##### arrayFormat -Type: `string`
+Type: `string`\ Default: `'none'` - `'bracket'`: Parse arrays with bracket representation: ```js +const queryString = require('query-string'); + queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); //=> {foo: ['1', '2', '3']} ``` @@ -78,6 +101,8 @@ queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); - `'index'`: Parse arrays with index representation: ```js +const queryString = require('query-string'); + queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); //=> {foo: ['1', '2', '3']} ``` @@ -85,30 +110,52 @@ queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); - `'comma'`: Parse arrays with elements separated by comma: ```js +const queryString = require('query-string'); + queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); //=> {foo: ['1', '2', '3']} ``` +- `'separator'`: Parse arrays with elements separated by a custom character: + +```js +const queryString = require('query-string'); + +queryString.parse('foo=1|2|3', {arrayFormat: 'separator', arrayFormatSeparator: '|'}); +//=> {foo: ['1', '2', '3']} +``` + - `'none'`: Parse arrays with elements using duplicate keys: ```js +const queryString = require('query-string'); + queryString.parse('foo=1&foo=2&foo=3'); //=> {foo: ['1', '2', '3']} ``` +##### arrayFormatSeparator + +Type: `string`\ +Default: `','` + +The character used to separate array elements when using `{arrayFormat: 'separator'}`. + ##### sort -Type: `Function | boolean`
+Type: `Function | boolean`\ Default: `true` Supports both `Function` as a custom sorting function or `false` to disable sorting. ##### parseNumbers -Type: `boolean`
+Type: `boolean`\ Default: `false` ```js +const queryString = require('query-string'); + queryString.parse('foo=1', {parseNumbers: true}); //=> {foo: 1} ``` @@ -117,17 +164,19 @@ Parse the value as a number type instead of string type if it's a number. ##### parseBooleans -Type: `boolean`
+Type: `boolean`\ Default: `false` ```js +const queryString = require('query-string'); + queryString.parse('foo=true', {parseBooleans: true}); //=> {foo: true} ``` Parse the value as a boolean type instead of string type if it's a boolean. -### .stringify(object, [options]) +### .stringify(object, options?) Stringify an object into a query string and sorting the keys. @@ -137,26 +186,28 @@ Type: `object` ##### strict -Type: `boolean`
+Type: `boolean`\ Default: `true` Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. ##### encode -Type: `boolean`
+Type: `boolean`\ Default: `true` [URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. ##### arrayFormat -Type: `string`
+Type: `string`\ Default: `'none'` - `'bracket'`: Serialize arrays using bracket representation: ```js +const queryString = require('query-string'); + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); //=> 'foo[]=1&foo[]=2&foo[]=3' ``` @@ -164,6 +215,8 @@ queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); - `'index'`: Serialize arrays using index representation: ```js +const queryString = require('query-string'); + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); //=> 'foo[0]=1&foo[1]=2&foo[2]=3' ``` @@ -171,6 +224,8 @@ queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); - `'comma'`: Serialize arrays by separating elements with comma: ```js +const queryString = require('query-string'); + queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); //=> 'foo=1,2,3' ``` @@ -178,10 +233,19 @@ queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); - `'none'`: Serialize arrays by using duplicate keys: ```js +const queryString = require('query-string'); + queryString.stringify({foo: [1, 2, 3]}); //=> 'foo=1&foo=2&foo=3' ``` +##### arrayFormatSeparator + +Type: `string`\ +Default: `','` + +The character used to separate array elements when using `{arrayFormat: 'separator'}`. + ##### sort Type: `Function | boolean` @@ -189,6 +253,8 @@ Type: `Function | boolean` Supports both `Function` as a custom sorting function or `false` to disable sorting. ```js +const queryString = require('query-string'); + const order = ['c', 'a', 'b']; queryString.stringify({a: 1, b: 2, c: 3}, { @@ -198,29 +264,214 @@ queryString.stringify({a: 1, b: 2, c: 3}, { ``` ```js +const queryString = require('query-string'); + queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); //=> 'b=1&c=2&a=3' ``` If omitted, keys are sorted using `Array#sort()`, which means, converting them to strings and comparing strings in Unicode code point order. +##### skipNull + +Skip keys with `null` as the value. + +Note that keys with `undefined` as the value are always skipped. + +Type: `boolean`\ +Default: `false` + +```js +const queryString = require('query-string'); + +queryString.stringify({a: 1, b: undefined, c: null, d: 4}, { + skipNull: true +}); +//=> 'a=1&d=4' +``` + +```js +const queryString = require('query-string'); + +queryString.stringify({a: undefined, b: null}, { + skipNull: true +}); +//=> '' +``` + +##### skipEmptyString + +Skip keys with an empty string as the value. + +Type: `boolean`\ +Default: `false` + +```js +const queryString = require('query-string'); + +queryString.stringify({a: 1, b: '', c: '', d: 4}, { + skipEmptyString: true +}); +//=> 'a=1&d=4' +``` + +```js +const queryString = require('query-string'); + +queryString.stringify({a: '', b: ''}, { + skipEmptyString: true +}); +//=> '' +``` + ### .extract(string) Extract a query string from a URL that can be passed into `.parse()`. +Note: This behaviour can be changed with the `skipNull` option. + ### .parseUrl(string, options?) Extract the URL and the query string as an object. -The `options` are the same as for `.parse()`. - Returns an object with a `url` and `query` property. +If the `parseFragmentIdentifier` option is `true`, the object will also contain a `fragmentIdentifier` property. + ```js +const queryString = require('query-string'); + queryString.parseUrl('https://foo.bar?foo=bar'); //=> {url: 'https://foo.bar', query: {foo: 'bar'}} + +queryString.parseUrl('https://foo.bar?foo=bar#xyz', {parseFragmentIdentifier: true}); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}, fragmentIdentifier: 'xyz'} +``` + +#### options + +Type: `object` + +The options are the same as for `.parse()`. + +Extra options are as below. + +##### parseFragmentIdentifier + +Parse the fragment identifier from the URL. + +Type: `boolean`\ +Default: `false` + +```js +const queryString = require('query-string'); + +queryString.parseUrl('https://foo.bar?foo=bar#xyz', {parseFragmentIdentifier: true}); +//=> {url: 'https://foo.bar', query: {foo: 'bar'}, fragmentIdentifier: 'xyz'} +``` + +### .stringifyUrl(object, options?) + +Stringify an object into a URL with a query string and sorting the keys. The inverse of [`.parseUrl()`](https://github.com/sindresorhus/query-string#parseurlstring-options) + +The `options` are the same as for `.stringify()`. + +Returns a string with the URL and a query string. + +Query items in the `query` property overrides queries in the `url` property. + +The `fragmentIdentifier` property overrides the fragment identifier in the `url` property. + +```js +queryString.stringifyUrl({url: 'https://foo.bar', query: {foo: 'bar'}}); +//=> 'https://foo.bar?foo=bar' + +queryString.stringifyUrl({url: 'https://foo.bar?foo=baz', query: {foo: 'bar'}}); +//=> 'https://foo.bar?foo=bar' + +queryString.stringifyUrl({ + url: 'https://foo.bar', + query: { + top: 'foo' + }, + fragmentIdentifier: 'bar' +}); +//=> 'https://foo.bar?top=foo#bar' +``` + +#### object + +Type: `object` + +##### url + +Type: `string` + +The URL to stringify. + +##### query + +Type: `object` + +Query items to add to the URL. + +### .pick(url, keys, options?) +### .pick(url, filter, options?) + +Pick query parameters from a URL. + +Returns a string with the new URL. + +```js +const queryString = require('query-string'); + +queryString.pick('https://foo.bar?foo=1&bar=2#hello', ['foo']); +//=> 'https://foo.bar?foo=1#hello' + +queryString.pick('https://foo.bar?foo=1&bar=2#hello', (name, value) => value === 2, {parseNumbers: true}); +//=> 'https://foo.bar?bar=2#hello' ``` +### .exclude(url, keys, options?) +### .exclude(url, filter, options?) + +Exclude query parameters from a URL. + +Returns a string with the new URL. + +```js +const queryString = require('query-string'); + +queryString.exclude('https://foo.bar?foo=1&bar=2#hello', ['foo']); +//=> 'https://foo.bar?bar=2#hello' + +queryString.exclude('https://foo.bar?foo=1&bar=2#hello', (name, value) => value === 2, {parseNumbers: true}); +//=> 'https://foo.bar?foo=1#hello' +``` + +#### url + +Type: `string` + +The URL containing the query parameters to filter. + +#### keys + +Type: `string[]` + +The names of the query parameters to filter based on the function used. + +#### filter + +Type: `(key, value) => boolean` + +A filter predicate that will be provided the name of each query parameter and its value. The `parseNumbers` and `parseBooleans` options also affect `value`. + +#### options + +Type: `object` + +[Parse options](#options) and [stringify options](#options-1). ## Nesting @@ -229,6 +480,8 @@ This module intentionally doesn't support nesting as it's not spec'd and varies You're much better off just converting the object to a JSON string: ```js +const queryString = require('query-string'); + queryString.stringify({ foo: 'bar', nested: JSON.stringify({ @@ -241,6 +494,8 @@ queryString.stringify({ However, there is support for multiple instances of the same key: ```js +const queryString = require('query-string'); + queryString.parse('likes=cake&name=bob&likes=icecream'); //=> {likes: ['cake', 'icecream'], name: 'bob'} @@ -248,12 +503,13 @@ queryString.stringify({color: ['taupe', 'chartreuse'], id: '515'}); //=> 'color=taupe&color=chartreuse&id=515' ``` - ## Falsy values Sometimes you want to unset a key, or maybe just make it present without assigning a value to it. Here is how falsy values are stringified: ```js +const queryString = require('query-string'); + queryString.stringify({foo: false}); //=> 'foo=false' @@ -264,15 +520,8 @@ queryString.stringify({foo: undefined}); //=> '' ``` +## query-string for enterprise ---- +Available as part of the Tidelift Subscription. -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
+The maintainers of query-string and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-query-string?utm_source=npm-query-string&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/strict-uri-encode/package.json b/node_modules/strict-uri-encode/package.json index ddd02a7a30556..c338ef843320d 100644 --- a/node_modules/strict-uri-encode/package.json +++ b/node_modules/strict-uri-encode/package.json @@ -2,7 +2,7 @@ "_from": "strict-uri-encode@^2.0.0", "_id": "strict-uri-encode@2.0.0", "_inBundle": false, - "_integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", + "_integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", "_location": "/strict-uri-encode", "_phantomChildren": {}, "_requested": { @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", "_shasum": "b9c7330c7042862f6b142dc274bbcc5866ce3546", "_spec": "strict-uri-encode@^2.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/query-string", + "_where": "/Users/darcyclarke/Documents/Repos/npm/v6/node_modules/query-string", "author": { "name": "Kevin Mårtensson", "email": "kevinmartensson@gmail.com", diff --git a/package-lock.json b/package-lock.json index eb26b0d15dd0d..599bafa914230 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2009,7 +2009,7 @@ "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==" }, "decompress-response": { "version": "4.2.1", @@ -2769,6 +2769,11 @@ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "dev": true }, + "filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==" + }, "find-cache-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", @@ -6130,11 +6135,12 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "query-string": { - "version": "6.8.2", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.8.2.tgz", - "integrity": "sha512-J3Qi8XZJXh93t2FiKyd/7Ec6GNifsjKXUsVFkSBj/kjLsDylWhnCz4NT1bkPcKotttPW+QbKGqqPH8OoI2pdqw==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz", + "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==", "requires": { "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" } @@ -6953,7 +6959,7 @@ "strict-uri-encode": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==" }, "string-width": { "version": "2.1.1", diff --git a/package.json b/package.json index 40d1d5c4dd1c0..9eafac9706a05 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "qrcode-terminal": "^0.12.0", - "query-string": "^6.8.2", + "query-string": "^6.14.1", "qw": "~1.0.1", "read": "~1.0.7", "read-cmd-shim": "^1.0.5",