From 9c742b64cdf662266d96ab7581965bb3b13329a1 Mon Sep 17 00:00:00 2001 From: vglebovich-lmru <173266533+vglebovich-lmru@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:35:03 +0300 Subject: [PATCH] feat: add new config for node 20 --- README.md | 20 +++++++++++++++++++- package.json | 3 ++- tsconfig.app.node20.json | 9 +++++++++ tsconfig.node20.json | 26 ++++++++++++++++++++++++++ yarn.lock | 8 ++++++++ 5 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 tsconfig.app.node20.json create mode 100644 tsconfig.node20.json diff --git a/README.md b/README.md index 2099ccc..5a42240 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ yarn add -D @byndyusoft/tsconfig Add to your `tsconfig.json`: +### Node 16 + ```json { "extends": "@byndyusoft/tsconfig/tsconfig.node16.json" @@ -37,7 +39,7 @@ or } ``` -or +### Node 18 ```json { @@ -53,6 +55,22 @@ or } ``` +### Node 20 + +```json +{ + "extends": "@byndyusoft/tsconfig/tsconfig.node20.json" +} +``` + +or + +```json +{ + "extends": "@byndyusoft/tsconfig/tsconfig.app.node20.json" +} +``` + ## Maintainers - [@Byndyusoft/owners](https://github.com/orgs/Byndyusoft/teams/owners) <> diff --git a/package.json b/package.json index 3282170..cfe25eb 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ }, "dependencies": { "@tsconfig/node16": "^1.0.3", - "@tsconfig/node18": "^1.0.1" + "@tsconfig/node18": "^1.0.1", + "@tsconfig/node20": "^20.1.4" }, "devDependencies": { "@commitlint/cli": "17.4.2", diff --git a/tsconfig.app.node20.json b/tsconfig.app.node20.json new file mode 100644 index 0000000..186101c --- /dev/null +++ b/tsconfig.app.node20.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.node20.json", + "compilerOptions": { + // Emit + "declaration": false, + "declarationMap": false, + "removeComments": true + } +} diff --git a/tsconfig.node20.json b/tsconfig.node20.json new file mode 100644 index 0000000..631b3c1 --- /dev/null +++ b/tsconfig.node20.json @@ -0,0 +1,26 @@ +{ + "extends": "@tsconfig/node20/tsconfig.json", + "compilerOptions": { + // Type Checking + "allowUnreachableCode": false, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + // Modules + "module": "Node16", + "moduleResolution": "Node16", + // Emit + "declaration": true, + "declarationMap": true, + "importHelpers": true, + "newLine": "lf", + "preserveConstEnums": true, + "sourceMap": true, + // Language and Environment + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + // Projects + "incremental": true + } +} diff --git a/yarn.lock b/yarn.lock index 3669e92..5fa4561 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,6 +40,7 @@ __metadata: "@commitlint/config-conventional": "npm:17.4.2" "@tsconfig/node16": "npm:^1.0.3" "@tsconfig/node18": "npm:^1.0.1" + "@tsconfig/node20": "npm:^20.1.4" husky: "npm:8.0.3" lint-staged: "npm:13.1.0" markdownlint-cli: "npm:0.33.0" @@ -851,6 +852,13 @@ __metadata: languageName: node linkType: hard +"@tsconfig/node20@npm:^20.1.4": + version: 20.1.4 + resolution: "@tsconfig/node20@npm:20.1.4" + checksum: 8096e46d93e43a97811286fb154b36261f8a3a747eb73e8911b9ec0338dcf6236bf2a0e510b08649ca74b94153577da1c7e23c87903a95fcd5e567f21f28c501 + languageName: node + linkType: hard + "@types/minimist@npm:^1.2.0": version: 1.2.2 resolution: "@types/minimist@npm:1.2.2"