From b67799ad3ff8715ba9b5be6b7a9ec7a604d2564a Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Fri, 25 Nov 2022 02:06:23 -0500 Subject: [PATCH] BREAKING: Remove support for Node 16.x and upgrade to TypeScript 4.9 Now that Node 18 is the new LTS version of Node, it should be safe to support ES2022 features. The install docs have already been updated to recommend Node 18.x in 41a710854e27cada8fe40fbde443e66569ad8830. This will break support on Node 16.x and earlier. Also update TypeScript to 4.9 which contains various typechecking improvements: https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/ Ref: https://akkoma.dev/FoundKeyGang/FoundKey/issues/238 Changelog: Changed --- .node-version | 2 +- package.json | 2 +- packages/backend/package.json | 2 +- packages/backend/tsconfig.json | 6 +++--- packages/client/package.json | 2 +- packages/foundkey-js/package.json | 2 +- yarn.lock | 24 ++++++++++++------------ 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.node-version b/.node-version index 7fd023741..e44a38e08 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -v16.15.0 +v18.12.1 diff --git a/package.json b/package.json index abaae5624..c229e0659 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "cross-env": "7.0.3", "cypress": "10.3.0", "start-server-and-test": "1.14.0", - "typescript": "4.8.3" + "typescript": "^4.9.3" }, "packageManager": "yarn@3.3.0" } diff --git a/packages/backend/package.json b/packages/backend/package.json index 863aa4ac9..2b983f1ac 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -175,6 +175,6 @@ "execa": "6.1.0", "form-data": "^4.0.0", "sinon": "^14.0.2", - "typescript": "^4.8.3" + "typescript": "^4.9.3" } } diff --git a/packages/backend/tsconfig.json b/packages/backend/tsconfig.json index 20b8f56a4..193d1a1c2 100644 --- a/packages/backend/tsconfig.json +++ b/packages/backend/tsconfig.json @@ -10,8 +10,8 @@ "noFallthroughCasesInSwitch": true, "declaration": false, "sourceMap": false, - "target": "ES2021", - "module": "esnext", + "target": "ES2022", + "module": "ES2022", "moduleResolution": "Node16", "allowSyntheticDefaultImports": true, "removeComments": false, @@ -39,7 +39,7 @@ "./src/@types" ], "lib": [ - "esnext" + "ES2022" ] }, "compileOnSave": false, diff --git a/packages/client/package.json b/packages/client/package.json index 8e2c3ff80..0a2a3440f 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -66,7 +66,7 @@ "tsc-alias": "1.7.0", "tsconfig-paths": "4.1.0", "twemoji-parser": "14.0.0", - "typescript": "4.8.3", + "typescript": "^4.9.3", "uuid": "8.3.2", "v-debounce": "0.1.2", "vanilla-tilt": "1.7.2", diff --git a/packages/foundkey-js/package.json b/packages/foundkey-js/package.json index 3ec572400..e31391665 100644 --- a/packages/foundkey-js/package.json +++ b/packages/foundkey-js/package.json @@ -30,7 +30,7 @@ "ts-jest": "^27.1.5", "ts-node": "10.9.1", "tsd": "^0.23.0", - "typescript": "4.8.3" + "typescript": "^4.9.3" }, "files": [ "built" diff --git a/yarn.lock b/yarn.lock index 0fe53dabe..dcc85c2a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3806,7 +3806,7 @@ __metadata: tsconfig-paths: 4.1.0 twemoji-parser: 14.0.0 typeorm: 0.3.7 - typescript: ^4.8.3 + typescript: ^4.9.3 unzipper: 0.10.11 uuid: 8.3.2 web-push: 3.5.0 @@ -4788,7 +4788,7 @@ __metadata: tsc-alias: 1.7.0 tsconfig-paths: 4.1.0 twemoji-parser: 14.0.0 - typescript: 4.8.3 + typescript: ^4.9.3 uuid: 8.3.2 v-debounce: 0.1.2 vanilla-tilt: 1.7.2 @@ -7900,7 +7900,7 @@ __metadata: ts-jest: ^27.1.5 ts-node: 10.9.1 tsd: ^0.23.0 - typescript: 4.8.3 + typescript: ^4.9.3 languageName: unknown linkType: soft @@ -7921,7 +7921,7 @@ __metadata: gulp-terser: 2.1.0 js-yaml: 4.1.0 start-server-and-test: 1.14.0 - typescript: 4.8.3 + typescript: ^4.9.3 languageName: unknown linkType: soft @@ -17032,13 +17032,13 @@ __metadata: languageName: node linkType: hard -"typescript@npm:4.8.3, typescript@npm:^4.8.3": - version: 4.8.3 - resolution: "typescript@npm:4.8.3" +"typescript@npm:^4.9.3": + version: 4.9.3 + resolution: "typescript@npm:4.9.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 8286a5edcaf3d68e65c451aa1e7150ad1cf53ee0813c07ec35b7abdfdb10f355ecaa13c6a226a694ae7a67785fd7eeebf89f845da0b4f7e4a35561ddc459aba0 + checksum: 17b8f816050b412403e38d48eef0e893deb6be522d6dc7caf105e54a72e34daf6835c447735fd2b28b66784e72bfbf87f627abb4818a8e43d1fa8106396128dc languageName: node linkType: hard @@ -17052,13 +17052,13 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@4.8.3#~builtin, typescript@patch:typescript@^4.8.3#~builtin": - version: 4.8.3 - resolution: "typescript@patch:typescript@npm%3A4.8.3#~builtin::version=4.8.3&hash=aae4e6" +"typescript@patch:typescript@^4.9.3#~builtin": + version: 4.9.3 + resolution: "typescript@patch:typescript@npm%3A4.9.3#~builtin::version=4.9.3&hash=d73830" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 2222d2382fb3146089b1d27ce2b55e9d1f99cc64118f1aba75809b693b856c5d3c324f052f60c75b577947fc538bc1c27bad0eb76cbdba9a63a253489504ba7e + checksum: 67ca21a387c0572f1c04936e638dde7782c5aa520c3754aadc7cc9b7c915da9ebc3e27c601bfff4ccb7d7264e82dce6d277ada82ec09dc75024349e0ef64926d languageName: node linkType: hard