From d3bc636edf678e9df7ad60953269a14d26584a7f Mon Sep 17 00:00:00 2001 From: David Julian Albers Date: Sat, 1 Aug 2026 17:02:15 +0200 Subject: [PATCH] feat: add tsconfig-cli --- .changeset/tidy-moons-tap.md | 5 +++++ packages/config/package.json | 2 ++ packages/config/tsconfig-cli.json | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 .changeset/tidy-moons-tap.md create mode 100644 packages/config/tsconfig-cli.json diff --git a/.changeset/tidy-moons-tap.md b/.changeset/tidy-moons-tap.md new file mode 100644 index 0000000..d2d4bb2 --- /dev/null +++ b/.changeset/tidy-moons-tap.md @@ -0,0 +1,5 @@ +--- +"@plexus-ms/config": minor +--- + +Add the `tsconfig-cli` subpath export: the shared TypeScript compiler options for Node CLI and library packages that build to `dist` — `"extends": "@plexus-ms/config/tsconfig-cli"`. It emits (`declaration`, `declarationMap`, `sourceMap`) under `NodeNext` resolution, so source must use explicit `.js` import specifiers. `outDir`/`rootDir` and `include`/`exclude` stay in the extending package, since TypeScript resolves those paths relative to the file that declares them. Requires `@types/node`, which the config pins via `"types": ["node"]`. diff --git a/packages/config/package.json b/packages/config/package.json index 69d8e4c..36eef2a 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -5,10 +5,12 @@ "license": "GPL-3.0-or-later", "files": [ "biome.json", + "tsconfig-cli.json", "tsconfig-next.json" ], "exports": { "./biome": "./biome.json", + "./tsconfig-cli": "./tsconfig-cli.json", "./tsconfig-next": "./tsconfig-next.json" }, "repository": { diff --git a/packages/config/tsconfig-cli.json b/packages/config/tsconfig-cli.json new file mode 100644 index 0000000..934d2d9 --- /dev/null +++ b/packages/config/tsconfig-cli.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2023", + "lib": ["ES2023"], + "module": "NodeNext", + "moduleResolution": "NodeNext", + "types": ["node"], + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "strict": true, + "noUncheckedIndexedAccess": true, + "verbatimModuleSyntax": true, + "isolatedModules": true, + "skipLibCheck": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "incremental": true + } +}