Skip to content

Commit

Permalink
chore: upgrade typescript 5.6 (#9948)
Browse files Browse the repository at this point in the history
  • Loading branch information
pskelin authored Sep 27, 2024
1 parent b8b9a98 commit 08aabac
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 32 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"turbo": "^1.7.0",
"typescript": "^5.2.2",
"typescript": "^5.6.2",
"vite-plugin-checker": "0.6.2",
"vite-tsconfig-paths": "^4.2.1",
"wsrun": "^5.2.4",
Expand All @@ -97,4 +97,4 @@
"packages/website",
"packages/create-package"
]
}
}
3 changes: 1 addition & 2 deletions packages/ai/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"compilerOptions": {
"outDir": "dist",
"experimentalDecorators": true,
"importsNotUsedAsValues": "preserve",
"ignoreDeprecations": "5.0",
"verbatimModuleSyntax": true,
"paths": {
"@ui5/webcomponents-base/dist/*": [
"../base/src/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/decorators/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type UI5Element from "../UI5Element";
import type UI5Element from "../UI5Element.js";

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

Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/decorators/queryAll.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type UI5Element from "../UI5Element";
import type UI5Element from "../UI5Element.js";

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

Expand Down
3 changes: 1 addition & 2 deletions packages/compat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"compilerOptions": {
"outDir": "dist",
"experimentalDecorators": true,
"importsNotUsedAsValues": "preserve",
"ignoreDeprecations": "5.0",
"verbatimModuleSyntax": true,
"paths": {
"@ui5/webcomponents-base/dist/*": [
"../base/src/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/create-package/create-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const generateFilesContent = (packageName, componentName, skipSubfolder) => {
"devDependencies": {
"@ui5/webcomponents-tools": version,
"chromedriver": "*",
"typescript": "^5.2.2"
"typescript": "^5.6.2"
},
};

Expand Down
2 changes: 1 addition & 1 deletion packages/fiori/src/NotificationListGroupList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import List from "@ui5/webcomponents/dist/List.js";
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
import type ListItemBase from "@ui5/webcomponents/dist/ListItemBase";
import type ListItemBase from "@ui5/webcomponents/dist/ListItemBase.js";

/**
* @class
Expand Down
3 changes: 1 addition & 2 deletions packages/fiori/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"composite": true,
"rootDir": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"importsNotUsedAsValues": "preserve",
"ignoreDeprecations": "5.0",
"verbatimModuleSyntax": true,
"paths": {
"@ui5/webcomponents-base/dist/*": [
"../base/src/*"
Expand Down
1 change: 0 additions & 1 deletion packages/icons-business-suite/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
],
"compilerOptions": {
"outDir": "dist",
"module": "es2022",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"composite": true,
Expand Down
1 change: 0 additions & 1 deletion packages/icons-tnt/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
],
"compilerOptions": {
"outDir": "dist",
"module": "es2022",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"composite": true,
Expand Down
1 change: 0 additions & 1 deletion packages/icons/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
],
"compilerOptions": {
"outDir": "dist",
"module": "es2022",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"composite": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/Form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,6 @@ class Form extends UI5Element {
Form.define();

export default Form;
export {
export type {
IFormItem,
};
2 changes: 1 addition & 1 deletion packages/main/src/TableGrowing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class TableGrowing extends UI5Element implements ITableGrowing {

hasGrowingComponent(): boolean {
if (this._hasScrollToLoad()) {
return !(this._table && this._table._scrollContainer.scrollHeight > this._table._scrollContainer.clientHeight) ?? true;
return !(this._table && this._table._scrollContainer.scrollHeight > this._table._scrollContainer.clientHeight);
}

return this.type === TableGrowingMode.Button && !this.disabled;
Expand Down
4 changes: 2 additions & 2 deletions packages/main/src/TableUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type Table from "./Table";
import type TableRow from "./TableRow";
import type Table from "./Table.js";
import type TableRow from "./TableRow.js";

const isInstanceOfTable = (obj: any): obj is Table => {
return "isTable" in obj && !!obj.isTable;
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/Tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ class Tokenizer extends UI5Element {
this._handleCurrentItemAfterDeletion(nextToken);

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

_handleCurrentItemAfterDeletion(nextToken: Token) {
Expand Down
3 changes: 1 addition & 2 deletions packages/main/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"composite": true,
"rootDir": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo",
"importsNotUsedAsValues": "preserve",
"ignoreDeprecations": "5.0",
"verbatimModuleSyntax": true,
"paths": {
"@ui5/webcomponents-base/dist/*": [
"../base/src/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/lib/i18n/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const generate = async () => {
const texts = textKeys.map(prop => getTextInfo(prop, properties[prop], defaultLanguageProperties && defaultLanguageProperties[prop])).join('');

// tabs are intentionally mixed to have proper identation in the produced file
return `${tsMode ? `import { I18nText } from "@ui5/webcomponents-base/dist/i18nBundle.js";` : ""}
return `${tsMode ? `import type { I18nText } from "@ui5/webcomponents-base/dist/i18nBundle.js";` : ""}
${texts}
export {${textKeys.join()}};`;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"peerDependencies": {
"chromedriver": "*",
"typescript": "^5.2.2"
"typescript": "^5.6.2"
},
"peerDependenciesMeta": {
"typescript": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"module": "NodeNext",
"target": "ES2021",
"lib": [
"DOM",
Expand All @@ -11,6 +12,5 @@
"sourceMap": true,
"inlineSources": true,
"strict": true,
"moduleResolution": "node"
}
}
2 changes: 1 addition & 1 deletion packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@docusaurus/types": "3.1.1",
"copy-and-watch": "^0.1.5",
"dotenv-cli": "^7.4.1",
"typescript": "~5.2.2"
"typescript": "~5.6.2"
},
"browserslist": {
"production": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default `{
"preview": "vite preview"
},
"devDependencies": {
"typescript": "^5.2.2",
"typescript": "^5.6.2",
"vite": "^5.1.6"
},
"dependencies": {
Expand Down
13 changes: 13 additions & 0 deletions patches/vite-plugin-checker+0.8.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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
index 69463b2..a951687 100644
--- a/node_modules/vite-plugin-checker/dist/cjs/checkers/typescript/main.js
+++ b/node_modules/vite-plugin-checker/dist/cjs/checkers/typescript/main.js
@@ -125,7 +125,7 @@ const createDiagnostic = (pluginConfig) => {
void 0,
reportWatchStatusChanged
);
- import_typescript.default.createSolutionBuilderWithWatch(host, [configFile], {}).build();
+ import_typescript.default.createSolutionBuilderWithWatch(host, [configFile], {emitDeclarationOnly: true}).build();
} else {
const host = import_typescript.default.createWatchCompilerHost(
configFile,
15 changes: 10 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15604,7 +15604,7 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==

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:
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:
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
Expand All @@ -15618,6 +15618,11 @@ semver@^7.3.2:
dependencies:
lru-cache "^6.0.0"

semver@^7.5.0:
version "7.6.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==

send@0.19.0:
version "0.19.0"
resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8"
Expand Down Expand Up @@ -16979,10 +16984,10 @@ typescript@^4.4.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

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

typescript@~4.3.2:
version "4.3.5"
Expand Down

0 comments on commit 08aabac

Please sign in to comment.