diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index ca98ca671cc..255810bbbf5 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -32,7 +32,6 @@ "metro-config": "^0.80.3", "metro-core": "^0.80.3", "node-fetch": "^2.2.0", - "querystring": "^0.2.1", "readline": "^1.3.0" }, "devDependencies": { diff --git a/packages/community-cli-plugin/src/utils/parseKeyValueParamArray.js b/packages/community-cli-plugin/src/utils/parseKeyValueParamArray.js index 021529007ae..2ebdebb4fa0 100644 --- a/packages/community-cli-plugin/src/utils/parseKeyValueParamArray.js +++ b/packages/community-cli-plugin/src/utils/parseKeyValueParamArray.js @@ -9,8 +9,6 @@ * @oncall react_native */ -import querystring from 'querystring'; - export default function parseKeyValueParamArray( keyValueArray: $ReadOnlyArray, ): Record { @@ -23,8 +21,11 @@ export default function parseKeyValueParamArray( if (item.indexOf('&') !== -1) { throw new Error('Parameter cannot include "&" but found: ' + item); } - Object.assign(result, querystring.parse(item)); + const params = new URLSearchParams(item); + params.forEach((value, key) => { + // $FlowExpectedError[prop-missing] + result[key] = value; + }); } - return result; } diff --git a/yarn.lock b/yarn.lock index 4fd997e0347..67ee7669f0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8150,11 +8150,6 @@ query-string@^6.12.1: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" -querystring@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" - integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"