From 85270dbb771a9022ad99e875baee4be22705aacb Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 3 Dec 2024 10:12:35 +0100
Subject: [PATCH] chore(deps): bump query-string from 7.1.3 to 9.1.1 (#3845)
---
flow-typed/npm/query-string_v6.x.x.js | 42 ------------------
flow-typed/npm/query-string_v9.x.x.js | 23 ++++++++++
package.json | 2 +-
.../components/App/withAppUrlSync.js | 4 +-
.../components/UrlSync/withUrlSync.js | 4 +-
yarn.lock | 43 +++++++++----------
6 files changed, 49 insertions(+), 69 deletions(-)
delete mode 100644 flow-typed/npm/query-string_v6.x.x.js
create mode 100644 flow-typed/npm/query-string_v9.x.x.js
diff --git a/flow-typed/npm/query-string_v6.x.x.js b/flow-typed/npm/query-string_v6.x.x.js
deleted file mode 100644
index 837d96d34c..0000000000
--- a/flow-typed/npm/query-string_v6.x.x.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// flow-typed signature: 4a4ede4f7f12b874598b0b727b9a1c4c
-// flow-typed version: f898dad1b0/query-string_v6.x.x/flow_>=v0.104.x
-
-declare module 'query-string' {
- declare type ArrayFormat = 'none' | 'bracket' | 'index' | 'comma'
- declare type ParseOptions = {|
- arrayFormat?: ArrayFormat,
- decode?: boolean,
- sort?: false | (A, B) => number,
- parseNumbers?: boolean,
- parseBooleans?: boolean,
- |}
-
- declare type StringifyOptions = {|
- arrayFormat?: ArrayFormat,
- encode?: boolean,
- strict?: boolean,
- sort?: false | (A, B) => number,
- skipNull?: boolean,
- |}
-
- declare type ObjectParameter = string | number | boolean | null | void;
-
- declare type ObjectParameters = $ReadOnly<{ [string]: ObjectParameter | $ReadOnlyArray, ... }>
-
- declare type QueryParameters = { [string]: string | Array | null, ... }
-
- declare type StringifyObjectParameter = {| url: string, query?: QueryParameters |}
-
- declare module.exports: {
- extract(str: string): string,
- parse(str: string, opts?: ParseOptions): QueryParameters,
- parseUrl(str: string, opts?: ParseOptions): {
- url: string,
- query: QueryParameters,
- ...
- },
- stringify(obj: ObjectParameters, opts?: StringifyOptions): string,
- stringifyUrl(obj: StringifyObjectParameter, opts?: StringifyOptions): string,
- ...
- }
-}
diff --git a/flow-typed/npm/query-string_v9.x.x.js b/flow-typed/npm/query-string_v9.x.x.js
new file mode 100644
index 0000000000..c242d25b12
--- /dev/null
+++ b/flow-typed/npm/query-string_v9.x.x.js
@@ -0,0 +1,23 @@
+// flow-typed signature: ec1d99909d639f153164cf55049d63b2
+// flow-typed version: <>/query-string_v^9.1.1/flow_v0.132.0
+
+/**
+ * This is an autogenerated libdef stub for:
+ *
+ * 'query-string'
+ *
+ * Fill this stub out by replacing all the `any` types.
+ *
+ * Once filled out, we encourage you to share your work with the
+ * community by sending a pull request to:
+ * https://github.com/flowtype/flow-typed
+ */
+
+declare module 'query-string' {
+ declare type QueryParameters = { [string]: string | Array | null, ... }
+
+ declare module.exports: {
+ parse(str: string, opts?: any): QueryParameters,
+ ...
+ }
+}
diff --git a/package.json b/package.json
index a2d8318017..4053ecf698 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,7 @@
"loglevel": "^1.9.1",
"moment": "^2.29.4",
"prop-types": "^15.8.1",
- "query-string": "^7.1.1",
+ "query-string": "^9.1.1",
"react": "^16.14.0",
"react-addons-update": "^15.6.3",
"react-dnd": "^14.0.5",
diff --git a/src/core_modules/capture-core/components/App/withAppUrlSync.js b/src/core_modules/capture-core/components/App/withAppUrlSync.js
index 4f6980e195..9bb3b83e9d 100644
--- a/src/core_modules/capture-core/components/App/withAppUrlSync.js
+++ b/src/core_modules/capture-core/components/App/withAppUrlSync.js
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react';
import { connect } from 'react-redux';
-import { parse, type QueryParameters } from 'query-string';
+import queryString, { type QueryParameters } from 'query-string';
import { paramsSelector } from './appSync.selectors';
import { LoadingMaskForPage } from '../LoadingMasks';
import { viewEventFromUrl } from '../Pages/ViewEvent/ViewEventComponent/viewEvent.actions';
@@ -81,7 +81,7 @@ export const withAppUrlSync = () => (InnerComponent: React.ComponentType) =
setPageAndParams() {
const { location } = this.props;
this.page = location.pathname.substring(1);
- this.params = parse(location && location.search);
+ this.params = queryString.parse(location && location.search);
}
render() {
diff --git a/src/core_modules/capture-core/components/UrlSync/withUrlSync.js b/src/core_modules/capture-core/components/UrlSync/withUrlSync.js
index c452f2a92c..ecb9ed1599 100644
--- a/src/core_modules/capture-core/components/UrlSync/withUrlSync.js
+++ b/src/core_modules/capture-core/components/UrlSync/withUrlSync.js
@@ -3,7 +3,7 @@
* @namespace UrlSync
*/
import * as React from 'react';
-import { parse, type QueryParameters } from 'query-string';
+import queryString, { type QueryParameters } from 'query-string';
import { pageFetchesOrgUnitUsingTheOldWay } from '../../utils/url';
type Props = {
@@ -96,7 +96,7 @@ const getUrlSyncer = (
isOutOfSync() {
const syncSpecification = onGetSyncSpecification(this.props);
const { history: { location }, statePage, urlPage } = this.props;
- const locationParams = parse(location && location.search);
+ const locationParams = queryString.parse(location && location.search);
const urlParamsAreOutOfSync = this.paramsNeedsUpdate(syncSpecification, locationParams);
const urlPathnameIsOutOfSync = urlPage !== statePage;
diff --git a/yarn.lock b/yarn.lock
index 6850c89709..82c88bc729 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7280,11 +7280,16 @@ decimal.js@^10.2.1:
resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23"
integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==
-decode-uri-component@^0.2.0, decode-uri-component@^0.2.2:
+decode-uri-component@^0.2.0:
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
+decode-uri-component@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.4.1.tgz#2ac4859663c704be22bf7db760a1494a49ab2cc5"
+ integrity sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==
+
decompress-response@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
@@ -9099,10 +9104,10 @@ fill-range@^7.1.1:
dependencies:
to-regex-range "^5.0.1"
-filter-obj@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b"
- integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==
+filter-obj@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-5.1.0.tgz#5bd89676000a713d7db2e197f660274428e524ed"
+ integrity sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==
final-form@^4.20.2:
version "4.20.10"
@@ -14582,15 +14587,14 @@ qs@~6.5.2:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad"
integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==
-query-string@^7.1.1:
- version "7.1.3"
- resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328"
- integrity sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==
+query-string@^9.1.1:
+ version "9.1.1"
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-9.1.1.tgz#dbfebb4196aeb2919915f2b2b81b91b965cf03a0"
+ integrity sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==
dependencies:
- decode-uri-component "^0.2.2"
- filter-obj "^1.1.0"
- split-on-first "^1.0.0"
- strict-uri-encode "^2.0.0"
+ decode-uri-component "^0.4.1"
+ filter-obj "^5.1.0"
+ split-on-first "^3.0.0"
querystringify@^2.1.1:
version "2.2.0"
@@ -16301,10 +16305,10 @@ spdy@^4.0.2:
select-hose "^2.0.0"
spdy-transport "^3.0.0"
-split-on-first@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f"
- integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==
+split-on-first@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-3.0.0.tgz#f04959c9ea8101b9b0bbf35a61b9ebea784a23e7"
+ integrity sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==
split-string@^3.0.1, split-string@^3.0.2:
version "3.1.0"
@@ -16394,11 +16398,6 @@ stream-shift@^1.0.0:
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b"
integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==
-strict-uri-encode@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
- integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==
-
string-argv@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6"