aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2022-10-18 11:04:08 +0200
committersonartech <sonartech@sonarsource.com>2022-10-19 20:03:07 +0000
commit0f13f1b2b89d18ecff62b29ff00b6178d1b9770a (patch)
treeca2a680026957684e74fe49a3df7913e5003ec25 /server
parent7231accc3e97c228da8181525ffb56748ba2bae6 (diff)
downloadsonarqube-0f13f1b2b89d18ecff62b29ff00b6178d1b9770a.tar.gz
sonarqube-0f13f1b2b89d18ecff62b29ff00b6178d1b9770a.zip
[NO JIRA] Upgrade typescript
Diffstat (limited to 'server')
-rw-r--r--server/sonar-docs/package.json2
-rw-r--r--server/sonar-docs/yarn.lock54
-rw-r--r--server/sonar-web/package.json2
-rw-r--r--server/sonar-web/src/main/js/components/controls/Select.tsx17
-rw-r--r--server/sonar-web/src/main/js/components/controls/__tests__/Select-test.tsx10
-rw-r--r--server/sonar-web/src/main/js/helpers/mocks/react-select.ts15
-rw-r--r--server/sonar-web/src/main/js/helpers/query.ts2
-rw-r--r--server/sonar-web/yarn.lock18
8 files changed, 88 insertions, 32 deletions
diff --git a/server/sonar-docs/package.json b/server/sonar-docs/package.json
index 4482e180a83..6932214ca0c 100644
--- a/server/sonar-docs/package.json
+++ b/server/sonar-docs/package.json
@@ -57,7 +57,7 @@
"prettier": "1.19.1",
"react-test-renderer": "16.8.5",
"remark": "11.0.2",
- "typescript": "4.6.3",
+ "typescript": "4.8.4",
"unist-util-visit": "2.0.2"
},
"scripts": {
diff --git a/server/sonar-docs/yarn.lock b/server/sonar-docs/yarn.lock
index 2763c65e1c3..302c6da08c6 100644
--- a/server/sonar-docs/yarn.lock
+++ b/server/sonar-docs/yarn.lock
@@ -663,6 +663,13 @@ __metadata:
languageName: node
linkType: hard
+"@babel/helper-string-parser@npm:^7.19.4":
+ version: 7.19.4
+ resolution: "@babel/helper-string-parser@npm:7.19.4"
+ checksum: b2f8a3920b30dfac81ec282ac4ad9598ea170648f8254b10f475abe6d944808fb006aab325d3eb5a8ad3bea8dfa888cfa6ef471050dae5748497c110ec060943
+ languageName: node
+ linkType: hard
+
"@babel/helper-validator-identifier@npm:^7.10.4":
version: 7.10.4
resolution: "@babel/helper-validator-identifier@npm:7.10.4"
@@ -677,6 +684,13 @@ __metadata:
languageName: node
linkType: hard
+"@babel/helper-validator-identifier@npm:^7.19.1":
+ version: 7.19.1
+ resolution: "@babel/helper-validator-identifier@npm:7.19.1"
+ checksum: 0eca5e86a729162af569b46c6c41a63e18b43dbe09fda1d2a3c8924f7d617116af39cac5e4cd5d431bb760b4dca3c0970e0c444789b1db42bcf1fa41fbad0a3a
+ languageName: node
+ linkType: hard
+
"@babel/helper-validator-option@npm:^7.16.7":
version: 7.16.7
resolution: "@babel/helper-validator-option@npm:7.16.7"
@@ -2031,6 +2045,17 @@ __metadata:
languageName: node
linkType: hard
+"@babel/types@npm:^7.15.4":
+ version: 7.19.4
+ resolution: "@babel/types@npm:7.19.4"
+ dependencies:
+ "@babel/helper-string-parser": ^7.19.4
+ "@babel/helper-validator-identifier": ^7.19.1
+ to-fast-properties: ^2.0.0
+ checksum: 4032f6407093f80dd4f4764be676f7527d2a5c0381586967cd79683cf8af01cdc16745a381b9cef045f702f0c9b0dffd880d84ee55dad59ba01bd23d5d52a8e0
+ languageName: node
+ linkType: hard
+
"@babel/types@npm:^7.16.7, @babel/types@npm:^7.17.0, @babel/types@npm:^7.3.3":
version: 7.17.0
resolution: "@babel/types@npm:7.17.0"
@@ -9349,6 +9374,17 @@ __metadata:
languageName: node
linkType: hard
+"fs-extra@npm:^10.1.0":
+ version: 10.1.0
+ resolution: "fs-extra@npm:10.1.0"
+ dependencies:
+ graceful-fs: ^4.2.0
+ jsonfile: ^6.0.1
+ universalify: ^2.0.0
+ checksum: dc94ab37096f813cc3ca12f0f1b5ad6744dfed9ed21e953d72530d103cea193c2f81584a39e9dee1bea36de5ee66805678c0dddc048e8af1427ac19c00fffc50
+ languageName: node
+ linkType: hard
+
"fs-extra@npm:^8.1.0":
version: 8.1.0
resolution: "fs-extra@npm:8.1.0"
@@ -19025,7 +19061,7 @@ fsevents@~2.1.2:
react-typography: 0.16.20
rehype-react: 6.1.0
remark: 11.0.2
- typescript: 4.6.3
+ typescript: 4.8.4
typography: 0.16.21
unist-util-visit: 2.0.2
languageName: unknown
@@ -20334,23 +20370,23 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
-"typescript@npm:4.6.3":
- version: 4.6.3
- resolution: "typescript@npm:4.6.3"
+"typescript@npm:4.8.4":
+ version: 4.8.4
+ resolution: "typescript@npm:4.8.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
+ checksum: 3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0
languageName: node
linkType: hard
-"typescript@patch:typescript@4.6.3#~builtin<compat/typescript>":
- version: 4.6.3
- resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=bda367"
+"typescript@patch:typescript@4.8.4#~builtin<compat/typescript>":
+ version: 4.8.4
+ resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
+ checksum: 301459fc3eb3b1a38fe91bf96d98eb55da88a9cb17b4ef80b4d105d620f4d547ba776cc27b44cc2ef58b66eda23fe0a74142feb5e79a6fb99f54fc018a696afa
languageName: node
linkType: hard
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json
index 9a20370065f..f8ea8460bb2 100644
--- a/server/sonar-web/package.json
+++ b/server/sonar-web/package.json
@@ -106,7 +106,7 @@
"prettier": "1.19.1",
"react-select-event": "5.5.1",
"testing-library-selector": "0.2.1",
- "typescript": "4.6.3",
+ "typescript": "4.8.4",
"whatwg-fetch": "3.6.2"
},
"resolutions": {
diff --git a/server/sonar-web/src/main/js/components/controls/Select.tsx b/server/sonar-web/src/main/js/components/controls/Select.tsx
index af43b811421..55a994fdd59 100644
--- a/server/sonar-web/src/main/js/components/controls/Select.tsx
+++ b/server/sonar-web/src/main/js/components/controls/Select.tsx
@@ -96,12 +96,15 @@ export function multiValueRemove<
return <div {...props.innerProps}>×</div>;
}
-export type SelectOptionProps<T, IsMulti extends boolean> = OptionProps<T, IsMulti>;
+export type SelectOptionProps<T extends OptionTypeBase, IsMulti extends boolean> = OptionProps<
+ T,
+ IsMulti
+>;
export const SelectOption = components.Option;
/* Keeping it as a class to simplify a dozen tests */
export default class Select<
- Option,
+ Option extends OptionTypeBase,
IsMulti extends boolean = false,
Group extends GroupTypeBase<Option> = GroupTypeBase<Option>
> extends React.Component<NamedProps<Option, IsMulti, Group> & StyleExtensionProps> {
@@ -124,7 +127,7 @@ export default class Select<
}
export function CreatableSelect<
- Option,
+ Option extends OptionTypeBase,
isMulti extends boolean,
Group extends GroupTypeBase<Option> = GroupTypeBase<Option>
>(props: AsyncCreatableProps<Option, isMulti, Group>) {
@@ -144,7 +147,7 @@ export function CreatableSelect<
}
export function SearchSelect<
- Option,
+ Option extends OptionTypeBase,
IsMulti extends boolean,
Group extends GroupTypeBase<Option> = GroupTypeBase<Option>
>(props: NamedProps<Option, IsMulti, Group> & AsyncProps<Option, Group> & StyleExtensionProps) {
@@ -165,7 +168,11 @@ export function SearchSelect<
);
}
-export function selectStyle<Option, IsMulti extends boolean, Group extends GroupTypeBase<Option>>(
+export function selectStyle<
+ Option extends OptionTypeBase,
+ IsMulti extends boolean,
+ Group extends GroupTypeBase<Option>
+>(
props?: NamedProps<Option, IsMulti, Group> & AsyncProps<Option, Group> & StyleExtensionProps
): StylesConfig<Option, IsMulti, Group> {
return {
diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/Select-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Select-test.tsx
index 840cef0a826..3360ccd64a1 100644
--- a/server/sonar-web/src/main/js/components/controls/__tests__/Select-test.tsx
+++ b/server/sonar-web/src/main/js/components/controls/__tests__/Select-test.tsx
@@ -19,7 +19,13 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import { components, GroupTypeBase, InputProps, Props as ReactSelectProps } from 'react-select';
+import {
+ components,
+ GroupTypeBase,
+ InputProps,
+ OptionTypeBase,
+ Props as ReactSelectProps
+} from 'react-select';
import { LoadingIndicatorProps } from 'react-select/src/components/indicators';
import { MultiValueRemoveProps } from 'react-select/src/components/MultiValue';
import { mockReactSelectIndicatorProps } from '../../../helpers/mocks/react-select';
@@ -75,7 +81,7 @@ describe('Select', () => {
});
function shallowRender<
- Option,
+ Option extends OptionTypeBase,
IsMulti extends boolean = false,
Group extends GroupTypeBase<Option> = GroupTypeBase<Option>
>(props: Partial<ReactSelectProps<Option, IsMulti, Group>> = {}) {
diff --git a/server/sonar-web/src/main/js/helpers/mocks/react-select.ts b/server/sonar-web/src/main/js/helpers/mocks/react-select.ts
index d25e6abf791..17f4562c437 100644
--- a/server/sonar-web/src/main/js/helpers/mocks/react-select.ts
+++ b/server/sonar-web/src/main/js/helpers/mocks/react-select.ts
@@ -17,10 +17,17 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ControlProps, GroupTypeBase, IndicatorProps, InputProps, OptionProps } from 'react-select';
+import {
+ ControlProps,
+ GroupTypeBase,
+ IndicatorProps,
+ InputProps,
+ OptionProps,
+ OptionTypeBase
+} from 'react-select';
export function mockReactSelectOptionProps<
- OptionType,
+ OptionType extends OptionTypeBase,
IsMulti extends boolean,
GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
>(
@@ -38,7 +45,7 @@ export function mockReactSelectInputProps(): InputProps {
}
export function mockReactSelectControlProps<
- OptionType,
+ OptionType extends OptionTypeBase,
IsMulti extends boolean,
GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
>(): ControlProps<OptionType, IsMulti, GroupType> {
@@ -46,7 +53,7 @@ export function mockReactSelectControlProps<
}
export function mockReactSelectIndicatorProps<
- OptionType,
+ OptionType extends OptionTypeBase,
IsMulti extends boolean,
GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
>(_option: OptionType): IndicatorProps<OptionType, IsMulti, GroupType> {
diff --git a/server/sonar-web/src/main/js/helpers/query.ts b/server/sonar-web/src/main/js/helpers/query.ts
index 19eaf60e319..2cadbc21282 100644
--- a/server/sonar-web/src/main/js/helpers/query.ts
+++ b/server/sonar-web/src/main/js/helpers/query.ts
@@ -85,7 +85,7 @@ export function parseAsOptionalArray<T>(
}
export function serializeDate(value?: Date, serializer = toNotSoISOString): string | undefined {
- if (value != null && value.toISOString) {
+ if (value != null) {
return serializer(value);
}
return undefined;
diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock
index 6d63d13f093..542215bd883 100644
--- a/server/sonar-web/yarn.lock
+++ b/server/sonar-web/yarn.lock
@@ -2409,7 +2409,7 @@ __metadata:
remark-react: 7.0.1
remark-rehype: 6.0.0
testing-library-selector: 0.2.1
- typescript: 4.6.3
+ typescript: 4.8.4
unist-util-visit: 2.0.2
valid-url: 1.0.9
whatwg-fetch: 3.6.2
@@ -10766,23 +10766,23 @@ resolve@^1.3.2:
languageName: node
linkType: hard
-"typescript@npm:4.6.3":
- version: 4.6.3
- resolution: "typescript@npm:4.6.3"
+"typescript@npm:4.8.4":
+ version: 4.8.4
+ resolution: "typescript@npm:4.8.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
+ checksum: 3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0
languageName: node
linkType: hard
-"typescript@patch:typescript@4.6.3#~builtin<compat/typescript>":
- version: 4.6.3
- resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=701156"
+"typescript@patch:typescript@4.8.4#~builtin<compat/typescript>":
+ version: 4.8.4
+ resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
+ checksum: 301459fc3eb3b1a38fe91bf96d98eb55da88a9cb17b4ef80b4d105d620f4d547ba776cc27b44cc2ef58b66eda23fe0a74142feb5e79a6fb99f54fc018a696afa
languageName: node
linkType: hard