Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade to query-string v5.1.1 #59633

Merged
merged 9 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"prop-types": "15.6.0",
"proxy-from-env": "1.0.0",
"pug": "^2.0.4",
"query-string": "6.10.1",
"query-string": "5.1.1",
alexwizp marked this conversation as resolved.
Show resolved Hide resolved
"raw-loader": "3.1.0",
"react": "^16.12.0",
"react-color": "^2.13.8",
Expand Down
46 changes: 46 additions & 0 deletions test/typings/query_string.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

declare module 'query-string' {
type ArrayFormat = 'bracket' | 'index' | 'none';

export interface ParseOptions {
arrayFormat?: ArrayFormat;
sort: ((itemLeft: string, itemRight: string) => number) | false;
}

export interface ParsedQuery<T = string> {
[key: string]: T | T[] | null | undefined;
}

export function parse(str: string, options?: ParseOptions): ParsedQuery;

export function parseUrl(str: string, options?: ParseOptions): { url: string; query: any };

export interface StringifyOptions {
strict?: boolean;
encode?: boolean;
arrayFormat?: ArrayFormat;
sort: ((itemLeft: string, itemRight: string) => number) | false;
}

export function stringify(obj: object, options?: StringifyOptions): string;

export function extract(str: string): string;
}
46 changes: 46 additions & 0 deletions typings/query_string.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

declare module 'query-string' {
type ArrayFormat = 'bracket' | 'index' | 'none';

export interface ParseOptions {
arrayFormat?: ArrayFormat;
sort: ((itemLeft: string, itemRight: string) => number) | false;
}

export interface ParsedQuery<T = string> {
[key: string]: T | T[] | null | undefined;
}

export function parse(str: string, options?: ParseOptions): ParsedQuery;

export function parseUrl(str: string, options?: ParseOptions): { url: string; query: any };

export interface StringifyOptions {
strict?: boolean;
encode?: boolean;
arrayFormat?: ArrayFormat;
sort: ((itemLeft: string, itemRight: string) => number) | false;
}

export function stringify(obj: object, options?: StringifyOptions): string;

export function extract(str: string): string;
}
33 changes: 33 additions & 0 deletions x-pack/typings/query_string.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

declare module 'query-string' {
type ArrayFormat = 'bracket' | 'index' | 'none';

export interface ParseOptions {
arrayFormat?: ArrayFormat;
sort?: ((itemLeft: string, itemRight: string) => number) | false;
}

export interface ParsedQuery<T = string> {
[key: string]: T | T[] | null | undefined;
}

export function parse(str: string, options?: ParseOptions): ParsedQuery;

export function parseUrl(str: string, options?: ParseOptions): { url: string; query: any };

export interface StringifyOptions {
strict?: boolean;
encode?: boolean;
arrayFormat?: ArrayFormat;
sort?: ((itemLeft: string, itemRight: string) => number) | false;
}

export function stringify(obj: object, options?: StringifyOptions): string;

export function extract(str: string): string;
}
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23874,6 +23874,15 @@ qs@~6.4.0:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
integrity sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=

[email protected], 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"

[email protected]:
version "6.10.1"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.10.1.tgz#30b3505f6fca741d5ae541964d1b3ae9dc2a0de8"
Expand All @@ -23891,15 +23900,6 @@ query-string@^4.1.0, query-string@^4.2.2:
object-assign "^4.1.0"
strict-uri-encode "^1.0.0"

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"

querystring-es3@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
Expand Down