From 08c522429bc57b63f4ae22d56ae1b957ccbbb232 Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Sat, 6 Jul 2024 00:25:54 +0100 Subject: [PATCH] Implemented configDir for outDir --- CHANGELOG.md | 1 + package.json | 6 +++--- packages/controller/package.json | 2 +- packages/controller/tsconfig.browser.json | 1 - packages/controller/tsconfig.node.json | 3 --- packages/create/templates/plugin-ts/tsconfig.browser.json | 3 --- packages/create/templates/plugin-ts/tsconfig.node.json | 3 --- packages/ctl/package.json | 2 +- packages/ctl/tsconfig.node.json | 3 --- packages/host/package.json | 2 +- packages/host/tsconfig.node.json | 3 --- packages/lib/package.json | 2 +- packages/lib/tsconfig.browser.json | 1 - packages/lib/tsconfig.node.json | 1 - packages/web_ui/package.json | 2 +- packages/web_ui/tsconfig.browser.json | 3 --- plugins/global_chat/package.json | 2 +- plugins/global_chat/tsconfig.browser.json | 3 --- plugins/global_chat/tsconfig.node.json | 3 --- plugins/inventory_sync/package.json | 2 +- plugins/inventory_sync/tsconfig.browser.json | 3 --- plugins/inventory_sync/tsconfig.node.json | 3 --- plugins/player_auth/package.json | 2 +- plugins/player_auth/tsconfig.browser.json | 3 --- plugins/player_auth/tsconfig.node.json | 3 --- plugins/research_sync/package.json | 2 +- plugins/research_sync/tsconfig.browser.json | 3 --- plugins/research_sync/tsconfig.node.json | 3 --- plugins/statistics_exporter/package.json | 2 +- plugins/statistics_exporter/tsconfig.browser.json | 3 --- plugins/statistics_exporter/tsconfig.node.json | 3 --- plugins/subspace_storage/package.json | 2 +- plugins/subspace_storage/tsconfig.browser.json | 3 --- plugins/subspace_storage/tsconfig.node.json | 3 --- tsconfig.browser.json | 1 + tsconfig.node.json | 1 + 36 files changed, 17 insertions(+), 71 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 099eb639..66319a98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Many thanks to the following for contributing to this release: - Fixed IPC errors reporting undefined when no stack trace was present [#624](https://github.com/clusterio/clusterio/pull/624). - Fixed loopback routing for instances reporting the wrong error message [#625](https://github.com/clusterio/clusterio/pull/625). +- Bumped Typescript version to 5.5 and implemented `${configDir}` in base configs for "outDir" [#648](https://github.com/clusterio/clusterio/pull/648). ### Breaking Changes diff --git a/package.json b/package.json index 280d5e3c..985bbc79 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "@clusterio/controller": "workspace:*", "@clusterio/ctl": "workspace:*", "@clusterio/host": "workspace:*", - "@clusterio/web_ui": "workspace:*", "@clusterio/lib": "workspace:*", + "@clusterio/web_ui": "workspace:*", "@swc/core": "^1.4.0", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", @@ -51,8 +51,8 @@ "mocha": "^10.2.0", "nyc": "^15.1.0", "phin": "^3.7.0", - "typedoc": "^0.24.8", - "typescript": "^5.1.6", + "typedoc": "^0.26.3", + "typescript": "^5.5.3", "yargs": "^17.7.2" } } diff --git a/packages/controller/package.json b/packages/controller/package.json index 98251fd8..d83a87b8 100644 --- a/packages/controller/package.json +++ b/packages/controller/package.json @@ -51,7 +51,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.4.14", - "typescript": "^5.1.6", + "typescript": "^5.5.3", "webpack": "^5.88.2", "webpack-dev-middleware": "^6.1.1", "webpack-merge": "^5.9.0" diff --git a/packages/controller/tsconfig.browser.json b/packages/controller/tsconfig.browser.json index 154bd176..01b8e68f 100644 --- a/packages/controller/tsconfig.browser.json +++ b/packages/controller/tsconfig.browser.json @@ -7,6 +7,5 @@ "include": [ "web/**/*.tsx", "web/**/*.ts", "package.json" ], "compilerOptions": { "rootDir": "..", - "outDir": "dist/browser", } } diff --git a/packages/controller/tsconfig.node.json b/packages/controller/tsconfig.node.json index 9dcc91db..52b0c217 100644 --- a/packages/controller/tsconfig.node.json +++ b/packages/controller/tsconfig.node.json @@ -4,7 +4,4 @@ { "path": "../lib/tsconfig.node.json" }, ], "include": ["index.ts", "controller.ts", "package.json", "src/**/*.ts"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/packages/create/templates/plugin-ts/tsconfig.browser.json b/packages/create/templates/plugin-ts/tsconfig.browser.json index e1b39d0f..325fd71d 100644 --- a/packages/create/templates/plugin-ts/tsconfig.browser.json +++ b/packages/create/templates/plugin-ts/tsconfig.browser.json @@ -5,7 +5,4 @@ { "path": "../../packages/web_ui/tsconfig.browser.json" }, ], "include": [ "web/**/*.tsx", "web/**/*.ts", "messages.ts", "package.json" ], - "compilerOptions": { - "outDir": "dist/browser", - } } diff --git a/packages/create/templates/plugin-ts/tsconfig.node.json b/packages/create/templates/plugin-ts/tsconfig.node.json index b6197500..ce0e013f 100644 --- a/packages/create/templates/plugin-ts/tsconfig.node.json +++ b/packages/create/templates/plugin-ts/tsconfig.node.json @@ -5,7 +5,4 @@ ], "include": ["./**/*.ts"], "exclude": ["test/*", "./dist/*"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/packages/ctl/package.json b/packages/ctl/package.json index de6a89da..385d4eae 100644 --- a/packages/ctl/package.json +++ b/packages/ctl/package.json @@ -35,6 +35,6 @@ "@types/node": "^20.4.5", "@types/set-blocking": "^2.0.0", "@types/yargs": "^17.0.24", - "typescript": "^5.1.6" + "typescript": "^5.5.3" } } diff --git a/packages/ctl/tsconfig.node.json b/packages/ctl/tsconfig.node.json index 3a0fb105..40446ef9 100644 --- a/packages/ctl/tsconfig.node.json +++ b/packages/ctl/tsconfig.node.json @@ -4,7 +4,4 @@ { "path": "../lib/tsconfig.node.json" }, ], "include": ["index.ts", "package.json", "ctl.ts", "src/**/*.ts"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/packages/host/package.json b/packages/host/package.json index 73384900..22fc8306 100644 --- a/packages/host/package.json +++ b/packages/host/package.json @@ -43,6 +43,6 @@ "@types/semver": "^7.5.0", "@types/set-blocking": "^2.0.0", "@types/yargs": "^17.0.24", - "typescript": "^5.1.6" + "typescript": "^5.5.3" } } diff --git a/packages/host/tsconfig.node.json b/packages/host/tsconfig.node.json index e7a488be..689d80e5 100644 --- a/packages/host/tsconfig.node.json +++ b/packages/host/tsconfig.node.json @@ -4,7 +4,4 @@ { "path": "../lib/tsconfig.node.json" }, ], "include": ["index.ts", "host.ts", "package.json", "src/**/*.ts", "src/**/*.js"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/packages/lib/package.json b/packages/lib/package.json index bf27858b..f45d13d8 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -41,6 +41,6 @@ "@types/triple-beam": "^1.3.2", "@types/ws": "^8.5.5", "@types/yargs": "^17.0.24", - "typescript": "^5.1.6" + "typescript": "^5.5.3" } } diff --git a/packages/lib/tsconfig.browser.json b/packages/lib/tsconfig.browser.json index e3c20c4e..0eeb49e4 100644 --- a/packages/lib/tsconfig.browser.json +++ b/packages/lib/tsconfig.browser.json @@ -26,6 +26,5 @@ ], "compilerOptions": { "rootDir": ".", - "outDir": "dist/browser", } } diff --git a/packages/lib/tsconfig.node.json b/packages/lib/tsconfig.node.json index d3dab4e1..a963c8a0 100644 --- a/packages/lib/tsconfig.node.json +++ b/packages/lib/tsconfig.node.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.node.json", "include": ["index.ts", "browser.ts", "build_mod.js", "src/**/*.ts", "src/**/*.js"], "compilerOptions": { - "outDir": "dist/node", "allowJs": true, }, } diff --git a/packages/web_ui/package.json b/packages/web_ui/package.json index 658e4611..f61a632f 100644 --- a/packages/web_ui/package.json +++ b/packages/web_ui/package.json @@ -40,7 +40,7 @@ "style-loader": "^3.3.3", "swc-loader": "^0.2.6", "terser-webpack-plugin": "^5.3.9", - "typescript": "^5.1.6", + "typescript": "^5.5.3", "util": "^0.12.5", "webpack": "^5.88.2", "webpack-cli": "^5.1.4", diff --git a/packages/web_ui/tsconfig.browser.json b/packages/web_ui/tsconfig.browser.json index 62dbe09d..4c6a3729 100644 --- a/packages/web_ui/tsconfig.browser.json +++ b/packages/web_ui/tsconfig.browser.json @@ -4,7 +4,4 @@ { "path": "../lib/tsconfig.browser.json" }, ], "include": [ "src/**/*.tsx", "src/**/*.ts", "package.json", "global.d.ts" ], - "compilerOptions": { - "outDir": "dist/browser", - } } diff --git a/plugins/global_chat/package.json b/plugins/global_chat/package.json index 5b644083..b8d97aa2 100644 --- a/plugins/global_chat/package.json +++ b/plugins/global_chat/package.json @@ -25,7 +25,7 @@ "@clusterio/web_ui": "workspace:*", "@types/node": "^20.4.5", "@types/react": "^18.2.21", - "typescript": "^5.1.6", + "typescript": "^5.5.3", "webpack": "^5.88.2", "webpack-cli": "^5.1.4", "webpack-merge": "^5.9.0" diff --git a/plugins/global_chat/tsconfig.browser.json b/plugins/global_chat/tsconfig.browser.json index e1b39d0f..325fd71d 100644 --- a/plugins/global_chat/tsconfig.browser.json +++ b/plugins/global_chat/tsconfig.browser.json @@ -5,7 +5,4 @@ { "path": "../../packages/web_ui/tsconfig.browser.json" }, ], "include": [ "web/**/*.tsx", "web/**/*.ts", "messages.ts", "package.json" ], - "compilerOptions": { - "outDir": "dist/browser", - } } diff --git a/plugins/global_chat/tsconfig.node.json b/plugins/global_chat/tsconfig.node.json index b6197500..ce0e013f 100644 --- a/plugins/global_chat/tsconfig.node.json +++ b/plugins/global_chat/tsconfig.node.json @@ -5,7 +5,4 @@ ], "include": ["./**/*.ts"], "exclude": ["test/*", "./dist/*"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/plugins/inventory_sync/package.json b/plugins/inventory_sync/package.json index ea3cc927..e184e734 100644 --- a/plugins/inventory_sync/package.json +++ b/plugins/inventory_sync/package.json @@ -33,7 +33,7 @@ "antd": "^5.13.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "typescript": "^5.1.6", + "typescript": "^5.5.3", "webpack": "^5.88.2", "webpack-cli": "^5.1.4", "webpack-merge": "^5.9.0" diff --git a/plugins/inventory_sync/tsconfig.browser.json b/plugins/inventory_sync/tsconfig.browser.json index e1b39d0f..325fd71d 100644 --- a/plugins/inventory_sync/tsconfig.browser.json +++ b/plugins/inventory_sync/tsconfig.browser.json @@ -5,7 +5,4 @@ { "path": "../../packages/web_ui/tsconfig.browser.json" }, ], "include": [ "web/**/*.tsx", "web/**/*.ts", "messages.ts", "package.json" ], - "compilerOptions": { - "outDir": "dist/browser", - } } diff --git a/plugins/inventory_sync/tsconfig.node.json b/plugins/inventory_sync/tsconfig.node.json index b6197500..ce0e013f 100644 --- a/plugins/inventory_sync/tsconfig.node.json +++ b/plugins/inventory_sync/tsconfig.node.json @@ -5,7 +5,4 @@ ], "include": ["./**/*.ts"], "exclude": ["test/*", "./dist/*"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/plugins/player_auth/package.json b/plugins/player_auth/package.json index 17cbe97c..a7c40a5b 100644 --- a/plugins/player_auth/package.json +++ b/plugins/player_auth/package.json @@ -36,7 +36,7 @@ "phin": "^3.7.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "typescript": "^5.1.6", + "typescript": "^5.5.3", "webpack": "^5.88.2", "webpack-cli": "^5.1.4", "webpack-merge": "^5.9.0" diff --git a/plugins/player_auth/tsconfig.browser.json b/plugins/player_auth/tsconfig.browser.json index e1b39d0f..325fd71d 100644 --- a/plugins/player_auth/tsconfig.browser.json +++ b/plugins/player_auth/tsconfig.browser.json @@ -5,7 +5,4 @@ { "path": "../../packages/web_ui/tsconfig.browser.json" }, ], "include": [ "web/**/*.tsx", "web/**/*.ts", "messages.ts", "package.json" ], - "compilerOptions": { - "outDir": "dist/browser", - } } diff --git a/plugins/player_auth/tsconfig.node.json b/plugins/player_auth/tsconfig.node.json index b6197500..ce0e013f 100644 --- a/plugins/player_auth/tsconfig.node.json +++ b/plugins/player_auth/tsconfig.node.json @@ -5,7 +5,4 @@ ], "include": ["./**/*.ts"], "exclude": ["test/*", "./dist/*"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/plugins/research_sync/package.json b/plugins/research_sync/package.json index 5cf31dc2..955874ae 100644 --- a/plugins/research_sync/package.json +++ b/plugins/research_sync/package.json @@ -30,7 +30,7 @@ "@types/fs-extra": "^11.0.1", "@types/node": "^20.4.5", "@types/react": "^18.2.21", - "typescript": "^5.1.6", + "typescript": "^5.5.3", "webpack": "^5.88.2", "webpack-cli": "^5.1.4", "webpack-merge": "^5.9.0" diff --git a/plugins/research_sync/tsconfig.browser.json b/plugins/research_sync/tsconfig.browser.json index e1b39d0f..325fd71d 100644 --- a/plugins/research_sync/tsconfig.browser.json +++ b/plugins/research_sync/tsconfig.browser.json @@ -5,7 +5,4 @@ { "path": "../../packages/web_ui/tsconfig.browser.json" }, ], "include": [ "web/**/*.tsx", "web/**/*.ts", "messages.ts", "package.json" ], - "compilerOptions": { - "outDir": "dist/browser", - } } diff --git a/plugins/research_sync/tsconfig.node.json b/plugins/research_sync/tsconfig.node.json index b6197500..ce0e013f 100644 --- a/plugins/research_sync/tsconfig.node.json +++ b/plugins/research_sync/tsconfig.node.json @@ -5,7 +5,4 @@ ], "include": ["./**/*.ts"], "exclude": ["test/*", "./dist/*"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/plugins/statistics_exporter/package.json b/plugins/statistics_exporter/package.json index 09d09f0a..cb4e9d0c 100644 --- a/plugins/statistics_exporter/package.json +++ b/plugins/statistics_exporter/package.json @@ -25,7 +25,7 @@ "@clusterio/web_ui": "workspace:*", "@types/node": "^20.4.5", "@types/react": "^18.2.21", - "typescript": "^5.1.6", + "typescript": "^5.5.3", "webpack": "^5.88.2", "webpack-cli": "^5.1.4", "webpack-merge": "^5.9.0" diff --git a/plugins/statistics_exporter/tsconfig.browser.json b/plugins/statistics_exporter/tsconfig.browser.json index f2dc36da..ff89a801 100644 --- a/plugins/statistics_exporter/tsconfig.browser.json +++ b/plugins/statistics_exporter/tsconfig.browser.json @@ -5,7 +5,4 @@ { "path": "../../packages/web_ui/tsconfig.browser.json" }, ], "include": [ "web/**/*.tsx", "web/**/*.ts", "package.json" ], - "compilerOptions": { - "outDir": "dist/browser", - } } diff --git a/plugins/statistics_exporter/tsconfig.node.json b/plugins/statistics_exporter/tsconfig.node.json index b6197500..ce0e013f 100644 --- a/plugins/statistics_exporter/tsconfig.node.json +++ b/plugins/statistics_exporter/tsconfig.node.json @@ -5,7 +5,4 @@ ], "include": ["./**/*.ts"], "exclude": ["test/*", "./dist/*"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/plugins/subspace_storage/package.json b/plugins/subspace_storage/package.json index 26fa03e8..e6de5b57 100644 --- a/plugins/subspace_storage/package.json +++ b/plugins/subspace_storage/package.json @@ -34,7 +34,7 @@ "antd": "^5.13.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "typescript": "^5.1.6", + "typescript": "^5.5.3", "webpack": "^5.88.2", "webpack-cli": "^5.1.4", "webpack-merge": "^5.9.0" diff --git a/plugins/subspace_storage/tsconfig.browser.json b/plugins/subspace_storage/tsconfig.browser.json index e1b39d0f..325fd71d 100644 --- a/plugins/subspace_storage/tsconfig.browser.json +++ b/plugins/subspace_storage/tsconfig.browser.json @@ -5,7 +5,4 @@ { "path": "../../packages/web_ui/tsconfig.browser.json" }, ], "include": [ "web/**/*.tsx", "web/**/*.ts", "messages.ts", "package.json" ], - "compilerOptions": { - "outDir": "dist/browser", - } } diff --git a/plugins/subspace_storage/tsconfig.node.json b/plugins/subspace_storage/tsconfig.node.json index b6197500..ce0e013f 100644 --- a/plugins/subspace_storage/tsconfig.node.json +++ b/plugins/subspace_storage/tsconfig.node.json @@ -5,7 +5,4 @@ ], "include": ["./**/*.ts"], "exclude": ["test/*", "./dist/*"], - "compilerOptions": { - "outDir": "dist/node", - }, } diff --git a/tsconfig.browser.json b/tsconfig.browser.json index 605c2c61..b5d82db1 100644 --- a/tsconfig.browser.json +++ b/tsconfig.browser.json @@ -7,5 +7,6 @@ "target": "es2022", "jsx": "react-jsx", "noEmitOnError": true, + "outDir": "${configDir}/dist/browser", }, } diff --git a/tsconfig.node.json b/tsconfig.node.json index 700d02da..dd436f25 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -6,5 +6,6 @@ "moduleResolution": "node16", "target": "es2022", "forceConsistentCasingInFileNames": true, + "outDir": "${configDir}/dist/node", }, }