mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-08 08:32:12 +01:00
upgrade query-string dependency version (#1875)
* upgrade query-string dependency version * fix typings and implementation for getQueryStringFromLocation
This commit is contained in:
committed by
GitHub
parent
9dee08f68d
commit
542a5aac59
@@ -28,7 +28,7 @@
|
||||
"@scm-manager/ui-types": "^2.27.3-SNAPSHOT",
|
||||
"fetch-mock-jest": "^1.5.1",
|
||||
"gitdiff-parser": "^0.1.2",
|
||||
"query-string": "5",
|
||||
"query-string": "6.14.1",
|
||||
"react": "^17.0.1",
|
||||
"react-query": "^3.25.1"
|
||||
},
|
||||
|
||||
@@ -84,8 +84,13 @@ function parsePageNumber(pageAsString: string) {
|
||||
return page;
|
||||
}
|
||||
|
||||
export function getQueryStringFromLocation(location: any) {
|
||||
return location.search ? queryString.parse(location.search).q : undefined;
|
||||
export function getQueryStringFromLocation(location: { search?: string }): string | undefined {
|
||||
if (location.search) {
|
||||
const query = queryString.parse(location.search).q;
|
||||
if (query && !Array.isArray(query)) {
|
||||
return query;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function stripEndingSlash(url: string) {
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
"@types/jest": "^24.0.19",
|
||||
"@types/lowlight": "^0.0.0",
|
||||
"@types/query-string": "5",
|
||||
"@types/react": "^17.0.1",
|
||||
"@types/react-dom": "^17.0.1",
|
||||
"@types/react-router-dom": "^5.1.0",
|
||||
@@ -76,7 +75,7 @@
|
||||
"hast-util-sanitize": "^3.0.2",
|
||||
"lowlight": "^1.13.0",
|
||||
"prism-themes": "^1.4.0",
|
||||
"query-string": "5",
|
||||
"query-string": "6.14.1",
|
||||
"react": "^17.0.1",
|
||||
"react-diff-view": "^2.4.1",
|
||||
"react-dom": "^17.0.1",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"@scm-manager/ui-components": "^2.27.3-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.27.3-SNAPSHOT",
|
||||
"classnames": "^2.2.6",
|
||||
"query-string": "^5.0.1",
|
||||
"query-string": "6.14.1",
|
||||
"react": "^17.0.1",
|
||||
"react-hook-form": "^7.5.1",
|
||||
"react-i18next": "^10.13.1",
|
||||
@@ -33,7 +33,6 @@
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
"@types/i18next": "^13.0.0",
|
||||
"@types/jest": "^24.0.19",
|
||||
"@types/query-string": "5",
|
||||
"@types/react": "^17.0.1",
|
||||
"@types/react-redux": "5.0.7",
|
||||
"@types/react-router-dom": "^5.1.0",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"i18next": "^19.6.0",
|
||||
"i18next-browser-languagedetector": "^4.0.0",
|
||||
"i18next-fetch-backend": "^2.2.0",
|
||||
"query-string": "5",
|
||||
"query-string": "6.14.1",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-hook-form": "^7.5.1",
|
||||
@@ -34,7 +34,6 @@
|
||||
"@types/enzyme": "^3.10.3",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
"@types/jest": "^24.0.19",
|
||||
"@types/query-string": "5",
|
||||
"@types/react": "^17.0.1",
|
||||
"@types/react-dom": "^17.0.1",
|
||||
"@types/react-redux": "5.0.7",
|
||||
|
||||
21
yarn.lock
21
yarn.lock
@@ -4527,11 +4527,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.6.tgz#df9c3c8b31a247ec315e6996566be3171df4b3b1"
|
||||
integrity sha512-0/HnwIfW4ki2D8L8c9GVcG5I72s9jP5GSLVF0VIXDW00kmIpA6O33G7a8n59Tmh7Nz0WUC3rSb7PTY/sdW2JzA==
|
||||
|
||||
"@types/query-string@5":
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/query-string/-/query-string-5.1.0.tgz#7f40cdea49ddafa0ea4f3db35fb6c24d3bfd4dcc"
|
||||
integrity sha512-9/sJK+T04pNq7uwReR0CLxqXj1dhxiTapZ1tIxA0trEsT6FRS0bz09YMcMb7tsVBTm4RJ0NEBYGsAjoEmqoFXg==
|
||||
|
||||
"@types/reach__router@^1.2.3", "@types/reach__router@^1.3.7":
|
||||
version "1.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/reach__router/-/reach__router-1.3.7.tgz#de8ab374259ae7f7499fc1373b9697a5f3cd6428"
|
||||
@@ -16893,16 +16888,7 @@ qs@~6.5.2:
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
|
||||
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
|
||||
|
||||
query-string@5, query-string@^5.0.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb"
|
||||
integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==
|
||||
dependencies:
|
||||
decode-uri-component "^0.2.0"
|
||||
object-assign "^4.1.0"
|
||||
strict-uri-encode "^1.0.0"
|
||||
|
||||
query-string@^6.13.8:
|
||||
query-string@6.14.1, query-string@^6.13.8:
|
||||
version "6.14.1"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a"
|
||||
integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==
|
||||
@@ -19297,11 +19283,6 @@ stream-splicer@^2.0.0:
|
||||
inherits "^2.0.1"
|
||||
readable-stream "^2.0.2"
|
||||
|
||||
strict-uri-encode@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
|
||||
integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user