Skip to content

Commit 08aabac

Browse files
authored
chore: upgrade typescript 5.6 (#9948)
1 parent b8b9a98 commit 08aabac

23 files changed

+43
-32
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"patch-package": "^8.0.0",
7777
"postinstall-postinstall": "^2.1.0",
7878
"turbo": "^1.7.0",
79-
"typescript": "^5.2.2",
79+
"typescript": "^5.6.2",
8080
"vite-plugin-checker": "0.6.2",
8181
"vite-tsconfig-paths": "^4.2.1",
8282
"wsrun": "^5.2.4",
@@ -97,4 +97,4 @@
9797
"packages/website",
9898
"packages/create-package"
9999
]
100-
}
100+
}

packages/ai/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"compilerOptions": {
88
"outDir": "dist",
99
"experimentalDecorators": true,
10-
"importsNotUsedAsValues": "preserve",
11-
"ignoreDeprecations": "5.0",
10+
"verbatimModuleSyntax": true,
1211
"paths": {
1312
"@ui5/webcomponents-base/dist/*": [
1413
"../base/src/*"

packages/base/src/decorators/query.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type UI5Element from "../UI5Element";
1+
import type UI5Element from "../UI5Element.js";
22

33
type QueryDecorator = (target: UI5Element, propertyKey: string | symbol) => void;
44

packages/base/src/decorators/queryAll.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type UI5Element from "../UI5Element";
1+
import type UI5Element from "../UI5Element.js";
22

33
type QueryDecorator = (target: UI5Element, propertyKey: string | symbol) => void;
44

packages/compat/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"compilerOptions": {
88
"outDir": "dist",
99
"experimentalDecorators": true,
10-
"importsNotUsedAsValues": "preserve",
11-
"ignoreDeprecations": "5.0",
10+
"verbatimModuleSyntax": true,
1211
"paths": {
1312
"@ui5/webcomponents-base/dist/*": [
1413
"../base/src/*"

packages/create-package/create-package.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const generateFilesContent = (packageName, componentName, skipSubfolder) => {
132132
"devDependencies": {
133133
"@ui5/webcomponents-tools": version,
134134
"chromedriver": "*",
135-
"typescript": "^5.2.2"
135+
"typescript": "^5.6.2"
136136
},
137137
};
138138

packages/fiori/src/NotificationListGroupList.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import List from "@ui5/webcomponents/dist/List.js";
22
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
3-
import type ListItemBase from "@ui5/webcomponents/dist/ListItemBase";
3+
import type ListItemBase from "@ui5/webcomponents/dist/ListItemBase.js";
44

55
/**
66
* @class

packages/fiori/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"composite": true,
1111
"rootDir": "src",
1212
"tsBuildInfoFile": "dist/.tsbuildinfo",
13-
"importsNotUsedAsValues": "preserve",
14-
"ignoreDeprecations": "5.0",
13+
"verbatimModuleSyntax": true,
1514
"paths": {
1615
"@ui5/webcomponents-base/dist/*": [
1716
"../base/src/*"

packages/icons-business-suite/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
],
77
"compilerOptions": {
88
"outDir": "dist",
9-
"module": "es2022",
109
"resolveJsonModule": true,
1110
"allowSyntheticDefaultImports": true,
1211
"composite": true,

packages/icons-tnt/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
],
77
"compilerOptions": {
88
"outDir": "dist",
9-
"module": "es2022",
109
"resolveJsonModule": true,
1110
"allowSyntheticDefaultImports": true,
1211
"composite": true,

packages/icons/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
],
77
"compilerOptions": {
88
"outDir": "dist",
9-
"module": "es2022",
109
"resolveJsonModule": true,
1110
"allowSyntheticDefaultImports": true,
1211
"composite": true,

packages/main/src/Form.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,6 @@ class Form extends UI5Element {
465465
Form.define();
466466

467467
export default Form;
468-
export {
468+
export type {
469469
IFormItem,
470470
};

packages/main/src/TableGrowing.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class TableGrowing extends UI5Element implements ITableGrowing {
185185

186186
hasGrowingComponent(): boolean {
187187
if (this._hasScrollToLoad()) {
188-
return !(this._table && this._table._scrollContainer.scrollHeight > this._table._scrollContainer.clientHeight) ?? true;
188+
return !(this._table && this._table._scrollContainer.scrollHeight > this._table._scrollContainer.clientHeight);
189189
}
190190

191191
return this.type === TableGrowingMode.Button && !this.disabled;

packages/main/src/TableUtils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type Table from "./Table";
2-
import type TableRow from "./TableRow";
1+
import type Table from "./Table.js";
2+
import type TableRow from "./TableRow.js";
33

44
const isInstanceOfTable = (obj: any): obj is Table => {
55
return "isTable" in obj && !!obj.isTable;

packages/main/src/Tokenizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ class Tokenizer extends UI5Element {
460460
this._handleCurrentItemAfterDeletion(nextToken);
461461

462462
this._tokenDeleting = true;
463-
this.fireEvent<TokenizerTokenDeleteEventDetail>("token-delete", { tokens: [token] || [target] });
463+
this.fireEvent<TokenizerTokenDeleteEventDetail>("token-delete", { tokens: [token] });
464464
}
465465

466466
_handleCurrentItemAfterDeletion(nextToken: Token) {

packages/main/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"composite": true,
1111
"rootDir": "src",
1212
"tsBuildInfoFile": "dist/.tsbuildinfo",
13-
"importsNotUsedAsValues": "preserve",
14-
"ignoreDeprecations": "5.0",
13+
"verbatimModuleSyntax": true,
1514
"paths": {
1615
"@ui5/webcomponents-base/dist/*": [
1716
"../base/src/*"

packages/tools/lib/i18n/defaults.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const generate = async () => {
6969
const texts = textKeys.map(prop => getTextInfo(prop, properties[prop], defaultLanguageProperties && defaultLanguageProperties[prop])).join('');
7070

7171
// tabs are intentionally mixed to have proper identation in the produced file
72-
return `${tsMode ? `import { I18nText } from "@ui5/webcomponents-base/dist/i18nBundle.js";` : ""}
72+
return `${tsMode ? `import type { I18nText } from "@ui5/webcomponents-base/dist/i18nBundle.js";` : ""}
7373
${texts}
7474
export {${textKeys.join()}};`;
7575
};

packages/tools/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
},
7474
"peerDependencies": {
7575
"chromedriver": "*",
76-
"typescript": "^5.2.2"
76+
"typescript": "^5.6.2"
7777
},
7878
"peerDependenciesMeta": {
7979
"typescript": {

packages/tools/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"module": "NodeNext",
34
"target": "ES2021",
45
"lib": [
56
"DOM",
@@ -11,6 +12,5 @@
1112
"sourceMap": true,
1213
"inlineSources": true,
1314
"strict": true,
14-
"moduleResolution": "node"
1515
}
1616
}

packages/website/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@docusaurus/types": "3.1.1",
5050
"copy-and-watch": "^0.1.5",
5151
"dotenv-cli": "^7.4.1",
52-
"typescript": "~5.2.2"
52+
"typescript": "~5.6.2"
5353
},
5454
"browserslist": {
5555
"production": [

packages/website/src/components/Editor/sample/sample-package.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default `{
1010
"preview": "vite preview"
1111
},
1212
"devDependencies": {
13-
"typescript": "^5.2.2",
13+
"typescript": "^5.6.2",
1414
"vite": "^5.1.6"
1515
},
1616
"dependencies": {
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/node_modules/vite-plugin-checker/dist/cjs/checkers/typescript/main.js b/node_modules/vite-plugin-checker/dist/cjs/checkers/typescript/main.js
2+
index 69463b2..a951687 100644
3+
--- a/node_modules/vite-plugin-checker/dist/cjs/checkers/typescript/main.js
4+
+++ b/node_modules/vite-plugin-checker/dist/cjs/checkers/typescript/main.js
5+
@@ -125,7 +125,7 @@ const createDiagnostic = (pluginConfig) => {
6+
void 0,
7+
reportWatchStatusChanged
8+
);
9+
- import_typescript.default.createSolutionBuilderWithWatch(host, [configFile], {}).build();
10+
+ import_typescript.default.createSolutionBuilderWithWatch(host, [configFile], {emitDeclarationOnly: true}).build();
11+
} else {
12+
const host = import_typescript.default.createWatchCompilerHost(
13+
configFile,

yarn.lock

+10-5
Original file line numberDiff line numberDiff line change
@@ -15604,7 +15604,7 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1:
1560415604
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
1560515605
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
1560615606

15607-
semver@^7.0.0, semver@^7.1.1, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0, semver@^7.5.3, semver@^7.5.4:
15607+
semver@^7.0.0, semver@^7.1.1, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4:
1560815608
version "7.5.4"
1560915609
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
1561015610
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
@@ -15618,6 +15618,11 @@ semver@^7.3.2:
1561815618
dependencies:
1561915619
lru-cache "^6.0.0"
1562015620

15621+
semver@^7.5.0:
15622+
version "7.6.3"
15623+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
15624+
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
15625+
1562115626
1562215627
version "0.19.0"
1562315628
resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8"
@@ -16979,10 +16984,10 @@ typescript@^4.4.3:
1697916984
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
1698016985
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
1698116986

16982-
typescript@^5.2.2, typescript@~5.2.2:
16983-
version "5.2.2"
16984-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
16985-
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
16987+
typescript@^5.6.2, typescript@~5.6.2:
16988+
version "5.6.2"
16989+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
16990+
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==
1698616991

1698716992
typescript@~4.3.2:
1698816993
version "4.3.5"

0 commit comments

Comments
 (0)