From a4db74ae9f719663c7b55c9a01b3352cd0eb09e1 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Sun, 5 Nov 2023 14:56:31 -0800 Subject: [PATCH 1/2] Support Node 21 --- README.md | 14 ++++++++++++++ bases/node21.json | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 bases/node21.json diff --git a/README.md b/README.md index 59f9894..db1ad15 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,20 @@ Add to your `tsconfig.json`: ```json "extends": "@tsconfig/node20/tsconfig.json" ``` +### Node 21 tsconfig.json + +Install: + +```sh +npm install --save-dev @tsconfig/node21 +yarn add --dev @tsconfig/node21 +``` + +Add to your `tsconfig.json`: + +```json +"extends": "@tsconfig/node21/tsconfig.json" +``` ### Nuxt tsconfig.json Install: diff --git a/bases/node21.json b/bases/node21.json new file mode 100644 index 0000000..58c464b --- /dev/null +++ b/bases/node21.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 21", + "_version": "21.0.0", + + "compilerOptions": { + "lib": ["es2023"], + "module": "node16", + "target": "es2023", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node16" + } +} From 6d8fe27677fd9e44b2a0088de294d92d9333bfd3 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Mon, 6 Nov 2023 02:17:01 -0800 Subject: [PATCH 2/2] Set `target` to `es2022` --- bases/node21.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bases/node21.json b/bases/node21.json index 58c464b..b36fe28 100644 --- a/bases/node21.json +++ b/bases/node21.json @@ -6,7 +6,7 @@ "compilerOptions": { "lib": ["es2023"], "module": "node16", - "target": "es2023", + "target": "es2022", "strict": true, "esModuleInterop": true,