diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..c6c8b36
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 54bfaf1..dad290a 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -9,23 +9,25 @@ jobs:
steps:
- name: Checkout tree
- uses: actions/checkout@v3
+ uses: actions/checkout@v6
- - name: Set-up Deno
- uses: denoland/setup-deno@v1
+ - name: Set-up Node.js
+ uses: actions/setup-node@v6
with:
- deno-version: v1.x
+ node-version: lts/*
+
+ - name: Set-up Deno
+ uses: denoland/setup-deno@v2
# Build all the packages
- name: Create packages for TSConfig JSONs
run: deno run --allow-read --allow-write --allow-net scripts/create-npm-packages.ts
- name: Test
- working-directory: test/
+ working-directory: test
run: |
- corepack enable
- pnpm install
- pnpm test
+ npm install
+ npm run test
- name: Update the README
run: deno run --allow-read --allow-write --allow-net scripts/update-markdown-readme.ts
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 09ea14d..6761cf5 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -18,18 +18,16 @@ jobs:
steps:
- name: Checkout tree
- uses: actions/checkout@v3
+ uses: actions/checkout@v6
- name: Set-up Node.js
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v6
with:
node-version: lts/*
registry-url: https://registry.npmjs.org
- name: Set-up Deno
- uses: denoland/setup-deno@v1
- with:
- deno-version: v1.x
+ uses: denoland/setup-deno@v2
# Build all the packages
- name: Create packages for TSConfig JSONs
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index 74baffc..09cf720 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,3 +1,5 @@
{
- "recommendations": ["denoland.vscode-deno"]
+ "recommendations": [
+ "denoland.vscode-deno"
+ ]
}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 90342a9..e7c6cb6 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,7 +1,11 @@
{
- "cSpell.words": ["Deno"],
- "deno.enable": true,
+ "[json][jsonc]": {
+ "editor.defaultFormatter": "vscode.json-language-features"
+ },
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
- }
+ },
+ "cSpell.words": [
+ "Deno"
+ ]
}
diff --git a/README.md b/README.md
index 65fcd9a..8175dec 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@ We target the latest stable version of TypeScript, note that because we want to
### Available TSConfigs
-### Recommended tsconfig.json
+### Recommended tsconfig.json
Install:
@@ -60,7 +60,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/recommended/tsconfig.json"
```
-### Bun tsconfig.json
+### Bun tsconfig.json
Install:
@@ -75,7 +75,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/bun/tsconfig.json"
```
-### Create React App tsconfig.json
+### Create React App tsconfig.json
Install:
@@ -90,7 +90,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/create-react-app/tsconfig.json"
```
-### Cypress tsconfig.json
+### Cypress tsconfig.json
Install:
@@ -105,7 +105,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/cypress/tsconfig.json"
```
-### Deno tsconfig.json
+### Deno tsconfig.json
Install:
@@ -120,7 +120,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/deno/tsconfig.json"
```
-### Docusaurus v2 tsconfig.json
+### Docusaurus v2 tsconfig.json
Install:
@@ -137,9 +137,9 @@ Add to your `tsconfig.json`:
-> **NOTE**: You may need to add `"baseUrl": "."` to your `tsconfig.json` to support proper file resolution.
+> **NOTE**: TypeScript 7 removes `baseUrl`. If you previously added `"baseUrl": "."` for module resolution, use `paths` instead (for example: `"paths": { "*": ["./*"] }`).
-### Ember tsconfig.json
+### Ember tsconfig.json
Install:
@@ -156,9 +156,9 @@ Add to your `tsconfig.json`:
-> **NOTE**: You may need to add `"baseUrl": "."` to your `tsconfig.json` to support proper file resolution.
+> **NOTE**: TypeScript 7 removes `baseUrl`. If you previously added `"baseUrl": "."` for module resolution, use `paths` instead (for example: `"paths": { "*": ["./*"] }`).
-### Next.js tsconfig.json
+### Next.js tsconfig.json
Install:
@@ -173,7 +173,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/next/tsconfig.json"
```
-### Node LTS (24) tsconfig.json
+### Node LTS (24) tsconfig.json
Install:
@@ -188,7 +188,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node-lts/tsconfig.json"
```
-### Node with TypeScript (TS >=5.8 ONLY) tsconfig.json
+### Node with TypeScript (TS >=5.8 ONLY) tsconfig.json
Install:
@@ -204,11 +204,14 @@ This file is meant to be used in conjunction with other Node.js configurations,
```json
{
- "extends": ["@tsconfig/node22/tsconfig.json", "@tsconfig/node-ts/tsconfig.json"]
+ "extends": [
+ "@tsconfig/node22/tsconfig.json",
+ "@tsconfig/node-ts/tsconfig.json"
+ ]
}
```
-### Node 10 tsconfig.json
+### Node 10 tsconfig.json
Install:
@@ -223,7 +226,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node10/tsconfig.json"
```
-### Node 12 tsconfig.json
+### Node 12 tsconfig.json
Install:
@@ -238,7 +241,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node12/tsconfig.json"
```
-### Node 14 tsconfig.json
+### Node 14 tsconfig.json
Install:
@@ -253,7 +256,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node14/tsconfig.json"
```
-### Node 16 tsconfig.json
+### Node 16 tsconfig.json
Install:
@@ -268,7 +271,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node16/tsconfig.json"
```
-### Node 17 tsconfig.json
+### Node 17 tsconfig.json
Install:
@@ -283,7 +286,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node17/tsconfig.json"
```
-### Node 18 tsconfig.json
+### Node 18 tsconfig.json
Install:
@@ -298,7 +301,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node18/tsconfig.json"
```
-### Node 19 tsconfig.json
+### Node 19 tsconfig.json
Install:
@@ -313,7 +316,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node19/tsconfig.json"
```
-### Node 20 tsconfig.json
+### Node 20 tsconfig.json
Install:
@@ -328,7 +331,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node20/tsconfig.json"
```
-### Node 21 tsconfig.json
+### Node 21 tsconfig.json
Install:
@@ -343,7 +346,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node21/tsconfig.json"
```
-### Node 22 tsconfig.json
+### Node 22 tsconfig.json
Install:
@@ -358,7 +361,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node22/tsconfig.json"
```
-### Node 23 tsconfig.json
+### Node 23 tsconfig.json
Install:
@@ -373,7 +376,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node23/tsconfig.json"
```
-### Node 24 tsconfig.json
+### Node 24 tsconfig.json
Install:
@@ -388,7 +391,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/node24/tsconfig.json"
```
-### Nuxt tsconfig.json
+### Nuxt tsconfig.json
Install:
@@ -405,9 +408,9 @@ Add to your `tsconfig.json`:
-> **NOTE**: You may need to add `"baseUrl": "."` to your `tsconfig.json` to support proper file resolution.
+> **NOTE**: TypeScript 7 removes `baseUrl`. If you previously added `"baseUrl": "."` for module resolution, use `paths` instead (for example: `"paths": { "*": ["./*"] }`).
-### QJSEngine tsconfig.json
+### QJSEngine tsconfig.json
Install:
@@ -422,7 +425,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/qjsengine/tsconfig.json"
```
-### React Native tsconfig.json
+### React Native tsconfig.json
Install:
@@ -437,7 +440,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/react-native/tsconfig.json"
```
-### Remix tsconfig.json
+### Remix tsconfig.json
Install:
@@ -454,9 +457,9 @@ Add to your `tsconfig.json`:
-> **NOTE**: You may need to add `"baseUrl": "."` to your `tsconfig.json` to support proper file resolution.
+> **NOTE**: TypeScript 7 removes `baseUrl`. If you previously added `"baseUrl": "."` for module resolution, use `paths` instead (for example: `"paths": { "*": ["./*"] }`).
-### Strictest tsconfig.json
+### Strictest tsconfig.json
Install:
@@ -471,7 +474,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/strictest/tsconfig.json"
```
-### Svelte tsconfig.json
+### Svelte tsconfig.json
Install:
@@ -490,7 +493,7 @@ Add to your `tsconfig.json`:
> **NOTE**: After `@tsconfig/svelte@2.0.0`, you should add `/// ` to a `d.ts` or a `index.ts`(entry) file to prevent typescript error.
-### Taro tsconfig.json
+### Taro tsconfig.json
Install:
@@ -505,7 +508,7 @@ Add to your `tsconfig.json`:
"extends": "@tsconfig/taro/tsconfig.json"
```
-### Vite React tsconfig.json
+### Vite React tsconfig.json
Install:
diff --git a/bases/bun.json b/bases/bun.jsonc
similarity index 96%
rename from bases/bun.json
rename to bases/bun.jsonc
index ec7d09a..0eddf00 100644
--- a/bases/bun.json
+++ b/bases/bun.jsonc
@@ -3,29 +3,27 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Bun",
"docs": "https://bun.com/docs/typescript",
-
"compilerOptions": {
// Environment setup & latest features
- "lib": ["ESNext"],
+ "lib": [
+ "ESNext"
+ ],
"target": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
-
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
-
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
-
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
diff --git a/bases/create-react-app.json b/bases/create-react-app.jsonc
similarity index 87%
rename from bases/create-react-app.json
rename to bases/create-react-app.jsonc
index 8879567..5c2890e 100644
--- a/bases/create-react-app.json
+++ b/bases/create-react-app.jsonc
@@ -2,13 +2,15 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Create React App",
"_version": "2.0.0",
-
"compilerOptions": {
- "lib": ["dom", "dom.iterable", "esnext"],
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "esnext"
+ ],
"module": "esnext",
"moduleResolution": "bundler",
"target": "es2015",
-
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
diff --git a/bases/cypress.json b/bases/cypress.jsonc
similarity index 61%
rename from bases/cypress.json
rename to bases/cypress.jsonc
index 223fc97..be2868d 100644
--- a/bases/cypress.json
+++ b/bases/cypress.jsonc
@@ -3,7 +3,12 @@
"display": "Cypress",
"compilerOptions": {
"target": "es5",
- "lib": ["es5", "dom"],
- "types": ["cypress"]
+ "lib": [
+ "es5",
+ "dom"
+ ],
+ "types": [
+ "cypress"
+ ]
}
}
diff --git a/bases/deno.json b/bases/deno.jsonc
similarity index 99%
rename from bases/deno.json
rename to bases/deno.jsonc
index 79eca85..3a0d4b2 100644
--- a/bases/deno.json
+++ b/bases/deno.jsonc
@@ -1,10 +1,8 @@
{
// This is based on https://deno.land/manual/getting_started/typescript#custom-typescript-compiler-options
// then the defaults are removed.
-
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Deno",
-
"compilerOptions": {
"jsx": "react",
"lib": [],
diff --git a/bases/docusaurus.json b/bases/docusaurus.jsonc
similarity index 68%
rename from bases/docusaurus.json
rename to bases/docusaurus.jsonc
index 7fcee4d..03fcf1c 100644
--- a/bases/docusaurus.json
+++ b/bases/docusaurus.jsonc
@@ -3,19 +3,25 @@
"display": "Docusaurus v2",
"docs": "https://v2.docusaurus.io/docs/typescript-support",
"_version": "2.0.0",
-
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"jsx": "react",
- "lib": ["dom"],
+ "lib": [
+ "dom"
+ ],
"module": "esnext",
"moduleResolution": "bundler",
"noEmit": true,
- "types": ["node", "@docusaurus/module-type-aliases", "@docusaurus/theme-classic"],
- "baseUrl": ".",
+ "types": [
+ "node",
+ "@docusaurus/module-type-aliases",
+ "@docusaurus/theme-classic"
+ ],
"paths": {
- "@site/*": ["./*"]
+ "@site/*": [
+ "./*"
+ ]
},
"skipLibCheck": true
}
diff --git a/bases/ember.json b/bases/ember.jsonc
similarity index 95%
rename from bases/ember.json
rename to bases/ember.jsonc
index 497cf30..1558d7d 100644
--- a/bases/ember.json
+++ b/bases/ember.jsonc
@@ -3,20 +3,18 @@
"display": "Ember",
"docs": "https://guides.emberjs.com/release/typescript/",
"_version": "3.0.0",
- "_deprecated": true,
-
+ "_deprecated": true,
// This is the base config used by Ember apps and addons. When actually used
// via Ember CLI (e.g. ember-cli-typescript's blueprint), it additionally has
- // `compilerOptions.baseUrl`, `compilerOptions.paths`, and `include` set.
+ // `compilerOptions.paths` and `include` set.
+ // Note: `baseUrl` was removed in TypeScript 7.0. Use `paths` instead.
"compilerOptions": {
"target": "es2023",
"module": "esnext",
"moduleResolution": "bundler",
-
// We don't want to include types dependencies in our compiled output, so tell TypeScript
// to enforce using `import type` instead of `import` for Types.
"verbatimModuleSyntax": true,
-
// Trying to check Ember apps and addons with `allowJs: true` is a recipe
// for many unresolveable type errors, because with *considerable* extra
// configuration it ends up including many files which are *not* valid and
@@ -24,20 +22,17 @@
// valid Node-resolveable locations and may not have TS-ready types. This
// will likely improve over time
"allowJs": false,
-
// Practically, it is *nearly* impossible to have every type-checked
// package in your dependency graph to have compatible types.
- // Good stewards of the ecosystem may opt to set this to false and try to
+ // Good stewards of the ecosystem may opt to set this to false and try to
// fix packages with failures, but for most people, the error information
// is inactionable noise.
"skipLibCheck": true,
-
// --- TS for SemVer Types compatibility
// Strictness settings -- you should *not* change these: Ember code is not
// guaranteed to type check with these set to looser values.
"strict": true,
"noUncheckedIndexedAccess": true,
-
// Interop: this is viral and will require anyone downstream of your package
// to *also* set them to true. However, this represents the way that
// bundlers actually work, and is future-compatible with the closest module
@@ -47,14 +42,11 @@
// intentionally leave `esModuleInterop` unset, so that it gets whatever TS
// provides as the default for the currently-specified `module` mode.
"allowSyntheticDefaultImports": true,
-
// --- Lint-style rules
-
// TypeScript also supplies some lint-style checks; nearly all of them are
// better handled by ESLint with the `@typescript-eslint`. This one is more
// like a safety check, though, so we leave it on.
"noPropertyAccessFromIndexSignature": true,
-
// --- Compilation/integration settings
// Setting `noEmitOnError` here allows tools trying to respect the tsconfig
// to still emit code without breaking on errors.
@@ -63,29 +55,25 @@
// This helps hasten development by allowing devs to prototype before coming
// to a decision on what they want their types to be.
"noEmitOnError": false,
-
// We use Babel for emitting runtime code, because it's very important that
// we always and only use the same transpiler for non-stable features, in
// particular decorators. If you were to change this to `true`, it could
// lead to accidentally generating code with `tsc` instead of Babel, and
// could thereby result in broken code at runtime.
"noEmit": true,
-
// Ember makes heavy use of decorators; TS does not support them at all
// without this flag.
"experimentalDecorators": true,
-
// We don't use TS for compilation, so we can disable these.
// Library authors should set declaration and declarationMap to true, however
"declaration": false,
"declarationMap": false,
"inlineSourceMap": false,
"inlineSources": false,
-
// Don't implicitly pull in declarations from `@types` packages unless we
// actually import from them AND the package in question doesn't bring its
- // own types.
- //
+ // own types.
+ //
// You may wish to override this e.g. with `"types": ["ember-source/types"]`
"types": []
}
diff --git a/bases/next.json b/bases/next.jsonc
similarity index 69%
rename from bases/next.json
rename to bases/next.jsonc
index ec09451..824f072 100644
--- a/bases/next.json
+++ b/bases/next.jsonc
@@ -2,9 +2,12 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Next.js",
"_version": "2.0.0",
-
"compilerOptions": {
- "lib": ["dom", "dom.iterable", "esnext"],
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "esnext"
+ ],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
@@ -22,6 +25,13 @@
}
]
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
- "exclude": ["node_modules"]
+ "include": [
+ "next-env.d.ts",
+ "**/*.ts",
+ "**/*.tsx",
+ ".next/types/**/*.ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ]
}
diff --git a/bases/node-lts.json b/bases/node-lts.jsonc
similarity index 100%
rename from bases/node-lts.json
rename to bases/node-lts.jsonc
diff --git a/bases/node-ts.json b/bases/node-ts.jsonc
similarity index 100%
rename from bases/node-ts.json
rename to bases/node-ts.jsonc
diff --git a/bases/node10.json b/bases/node10.jsonc
similarity index 88%
rename from bases/node10.json
rename to bases/node10.jsonc
index 09fdb40..6b904ae 100644
--- a/bases/node10.json
+++ b/bases/node10.jsonc
@@ -1,12 +1,12 @@
{
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 10",
-
"compilerOptions": {
- "lib": ["es2018"],
+ "lib": [
+ "es2018"
+ ],
"module": "commonjs",
"target": "es2018",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node12.json b/bases/node12.jsonc
similarity index 73%
rename from bases/node12.json
rename to bases/node12.jsonc
index 0f9848d..283b4ae 100644
--- a/bases/node12.json
+++ b/bases/node12.jsonc
@@ -2,12 +2,15 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 12",
"_version": "12.1.0",
-
"compilerOptions": {
- "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
+ "lib": [
+ "es2019",
+ "es2020.promise",
+ "es2020.bigint",
+ "es2020.string"
+ ],
"module": "node16",
"target": "es2019",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node14.json b/bases/node14.jsonc
similarity index 89%
rename from bases/node14.json
rename to bases/node14.jsonc
index d096fc6..fd61e06 100644
--- a/bases/node14.json
+++ b/bases/node14.jsonc
@@ -2,12 +2,12 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 14",
"_version": "14.1.0",
-
"compilerOptions": {
- "lib": ["es2020"],
+ "lib": [
+ "es2020"
+ ],
"module": "node16",
"target": "es2020",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node16.json b/bases/node16.jsonc
similarity index 89%
rename from bases/node16.json
rename to bases/node16.jsonc
index 3fcb84e..eea09c9 100644
--- a/bases/node16.json
+++ b/bases/node16.jsonc
@@ -2,12 +2,12 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 16",
"_version": "16.1.0",
-
"compilerOptions": {
- "lib": ["es2021"],
+ "lib": [
+ "es2021"
+ ],
"module": "node16",
"target": "es2021",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node17.json b/bases/node17.jsonc
similarity index 90%
rename from bases/node17.json
rename to bases/node17.jsonc
index df6358b..b8f692d 100644
--- a/bases/node17.json
+++ b/bases/node17.jsonc
@@ -3,10 +3,11 @@
"display": "Node 17",
"_version": "17.1.0",
"compilerOptions": {
- "lib": ["es2022"],
+ "lib": [
+ "es2022"
+ ],
"module": "node16",
"target": "es2022",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node18.json b/bases/node18.jsonc
similarity index 89%
rename from bases/node18.json
rename to bases/node18.jsonc
index 987b10f..fc72f6f 100644
--- a/bases/node18.json
+++ b/bases/node18.jsonc
@@ -1,14 +1,13 @@
{
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 18",
-
"_version": "18.2.0",
-
"compilerOptions": {
- "lib": ["es2023"],
+ "lib": [
+ "es2023"
+ ],
"module": "node16",
"target": "es2022",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node19.json b/bases/node19.jsonc
similarity index 89%
rename from bases/node19.json
rename to bases/node19.jsonc
index d80f479..5917651 100644
--- a/bases/node19.json
+++ b/bases/node19.jsonc
@@ -1,14 +1,13 @@
{
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 19",
-
"_version": "19.1.0",
-
"compilerOptions": {
- "lib": ["es2023"],
+ "lib": [
+ "es2023"
+ ],
"module": "node16",
"target": "es2022",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node20.json b/bases/node20.jsonc
similarity index 89%
rename from bases/node20.json
rename to bases/node20.jsonc
index 8ca9d26..6584e00 100644
--- a/bases/node20.json
+++ b/bases/node20.jsonc
@@ -2,12 +2,12 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 20",
"_version": "20.1.0",
-
"compilerOptions": {
- "lib": ["es2023"],
+ "lib": [
+ "es2023"
+ ],
"module": "nodenext",
"target": "es2022",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node21.json b/bases/node21.jsonc
similarity index 89%
rename from bases/node21.json
rename to bases/node21.jsonc
index 02c94a9..231bee7 100644
--- a/bases/node21.json
+++ b/bases/node21.jsonc
@@ -2,12 +2,12 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 21",
"_version": "21.0.0",
-
"compilerOptions": {
- "lib": ["es2023"],
+ "lib": [
+ "es2023"
+ ],
"module": "nodenext",
"target": "es2022",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node22.json b/bases/node22.jsonc
similarity index 72%
rename from bases/node22.json
rename to bases/node22.jsonc
index 11b642f..ee3d2be 100644
--- a/bases/node22.json
+++ b/bases/node22.jsonc
@@ -2,12 +2,15 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 22",
"_version": "22.0.0",
-
"compilerOptions": {
- "lib": ["es2024", "ESNext.Array", "ESNext.Collection", "ESNext.Iterator"],
+ "lib": [
+ "es2024",
+ "ESNext.Array",
+ "ESNext.Collection",
+ "ESNext.Iterator"
+ ],
"module": "nodenext",
"target": "es2022",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node23.json b/bases/node23.jsonc
similarity index 68%
rename from bases/node23.json
rename to bases/node23.jsonc
index cf5377d..4932c8d 100644
--- a/bases/node23.json
+++ b/bases/node23.jsonc
@@ -2,12 +2,16 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 23",
"_version": "23.0.0",
-
"compilerOptions": {
- "lib": ["es2024", "ESNext.Array", "ESNext.Collection", "ESNext.Iterator", "ESNext.Promise"],
+ "lib": [
+ "es2024",
+ "ESNext.Array",
+ "ESNext.Collection",
+ "ESNext.Iterator",
+ "ESNext.Promise"
+ ],
"module": "nodenext",
"target": "es2024",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/node24.json b/bases/node24.jsonc
similarity index 99%
rename from bases/node24.json
rename to bases/node24.jsonc
index f386a38..ea192e4 100644
--- a/bases/node24.json
+++ b/bases/node24.jsonc
@@ -2,7 +2,6 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Node 24",
"_version": "24.0.0",
-
"compilerOptions": {
"lib": [
"es2024",
@@ -13,7 +12,6 @@
],
"module": "nodenext",
"target": "es2024",
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
diff --git a/bases/nuxt.json b/bases/nuxt.jsonc
similarity index 94%
rename from bases/nuxt.json
rename to bases/nuxt.jsonc
index 876fcf8..17d61f9 100644
--- a/bases/nuxt.json
+++ b/bases/nuxt.jsonc
@@ -2,7 +2,6 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Nuxt",
"_version": "2.0.0",
-
"compilerOptions": {
"target": "esnext",
"module": "esnext",
@@ -17,7 +16,6 @@
"sourceMap": true,
"strict": true,
"noEmit": true,
- "baseUrl": ".",
"paths": {
"~/*": [
"./*"
@@ -33,7 +31,7 @@
},
"exclude": [
"node_modules",
- ".nuxt",
+ ".nuxt",
"dist"
]
}
diff --git a/bases/qjsengine.json b/bases/qjsengine.jsonc
similarity index 85%
rename from bases/qjsengine.json
rename to bases/qjsengine.jsonc
index 1e26fcd..4140165 100644
--- a/bases/qjsengine.json
+++ b/bases/qjsengine.jsonc
@@ -1,15 +1,16 @@
{
- // https://doc.qt.io/qt-5/qjsengine.html
+ // https://doc.qt.io/qt-5/qjsengine.html
"$schema": "https://www.schemastore.org/tsconfig",
"display": "QJSEngine",
-
"compilerOptions": {
// Technically QTJSEngine supportes ES2016, however there are issues with
// arrow functions where in certain contexts "this" does not exist.
// Targeting ES5 instead fixes these issues by binding this to a variable
// and closing over that instead.
"target": "ES5",
- "lib": ["ES2016"],
+ "lib": [
+ "ES2016"
+ ],
"module": "none",
"esModuleInterop": false,
"strict": true
diff --git a/bases/react-native.json b/bases/react-native.jsonc
similarity index 93%
rename from bases/react-native.json
rename to bases/react-native.jsonc
index cec059c..a534d36 100644
--- a/bases/react-native.json
+++ b/bases/react-native.jsonc
@@ -5,7 +5,10 @@
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
- "types": ["react-native", "jest"],
+ "types": [
+ "react-native",
+ "jest"
+ ],
"lib": [
"es2019",
"es2020.bigint",
diff --git a/bases/recommended.json b/bases/recommended.json
deleted file mode 100644
index 3e3fac6..0000000
--- a/bases/recommended.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "compilerOptions": {
- "target": "es2016",
- "module": "commonjs",
- "esModuleInterop": true,
- "forceConsistentCasingInFileNames": true,
- "strict": true,
- "skipLibCheck": true
- },
- "display": "Recommended",
- "$schema": "https://www.schemastore.org/tsconfig"
-}
diff --git a/bases/recommended.jsonc b/bases/recommended.jsonc
new file mode 100644
index 0000000..f3c9a14
--- /dev/null
+++ b/bases/recommended.jsonc
@@ -0,0 +1,22 @@
+{
+ "$schema": "https://www.schemastore.org/tsconfig",
+ "display": "Recommended",
+ "_version": "2.0.0",
+ "compilerOptions": {
+ "module": "nodenext",
+ "target": "esnext",
+ "types": [],
+ "sourceMap": true,
+ "declaration": true,
+ "declarationMap": true,
+ "noUncheckedIndexedAccess": true,
+ "exactOptionalPropertyTypes": true,
+ "strict": true,
+ "jsx": "react-jsx",
+ "verbatimModuleSyntax": true,
+ "isolatedModules": true,
+ "noUncheckedSideEffectImports": true,
+ "moduleDetection": "force",
+ "skipLibCheck": true
+ }
+}
diff --git a/bases/remix.json b/bases/remix.jsonc
similarity index 80%
rename from bases/remix.json
rename to bases/remix.jsonc
index 3d0e74e..4c96f17 100644
--- a/bases/remix.json
+++ b/bases/remix.jsonc
@@ -2,9 +2,12 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Remix",
"_version": "2.0.0",
-
"compilerOptions": {
- "lib": ["dom", "dom.iterable", "es2019"],
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "es2019"
+ ],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
@@ -14,11 +17,11 @@
"target": "es2019",
"strict": true,
"allowJs": true,
- "baseUrl": ".",
"paths": {
- "~/*": ["./app/*"]
+ "~/*": [
+ "./app/*"
+ ]
},
-
// Remix takes care of building everything in `remix build`.
"noEmit": true
}
diff --git a/bases/strictest.json b/bases/strictest.jsonc
similarity index 99%
rename from bases/strictest.json
rename to bases/strictest.jsonc
index 090c390..2704006 100644
--- a/bases/strictest.json
+++ b/bases/strictest.jsonc
@@ -11,9 +11,7 @@
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
-
"isolatedModules": true,
-
"esModuleInterop": true,
"skipLibCheck": true
},
diff --git a/bases/svelte.json b/bases/svelte.jsonc
similarity index 99%
rename from bases/svelte.json
rename to bases/svelte.jsonc
index 2f9c578..2e74d1b 100644
--- a/bases/svelte.json
+++ b/bases/svelte.jsonc
@@ -2,7 +2,6 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Svelte",
"_version": "5.0.0",
-
"compilerOptions": {
"module": "esnext",
"moduleResolution": "bundler",
@@ -17,7 +16,6 @@
enable source maps by default.
*/
"sourceMap": true,
-
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
diff --git a/bases/taro.json b/bases/taro.jsonc
similarity index 100%
rename from bases/taro.json
rename to bases/taro.jsonc
diff --git a/bases/vite-react.json b/bases/vite-react.jsonc
similarity index 91%
rename from bases/vite-react.json
rename to bases/vite-react.jsonc
index c5a3997..08583e8 100644
--- a/bases/vite-react.json
+++ b/bases/vite-react.jsonc
@@ -2,15 +2,17 @@
"$schema": "https://www.schemastore.org/tsconfig",
"display": "Vite React",
"_version": "7.0.0",
-
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2022",
"useDefineForClassFields": true,
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "lib": [
+ "ES2022",
+ "DOM",
+ "DOM.Iterable"
+ ],
"module": "ESNext",
"skipLibCheck": true,
-
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
@@ -18,7 +20,6 @@
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
-
/* Linting */
"strict": true,
"noUnusedLocals": true,
diff --git a/deno.json b/deno.json
new file mode 100644
index 0000000..994ecf2
--- /dev/null
+++ b/deno.json
@@ -0,0 +1,8 @@
+{
+ "imports": {
+ "@std/collections": "jsr:@std/collections",
+ "@std/jsonc": "jsr:@std/jsonc",
+ "@std/path": "jsr:@std/path",
+ "@std/semver": "jsr:@std/semver"
+ }
+}
diff --git a/deno.lock b/deno.lock
new file mode 100644
index 0000000..7b05934
--- /dev/null
+++ b/deno.lock
@@ -0,0 +1,45 @@
+{
+ "version": "5",
+ "specifiers": {
+ "jsr:@std/collections@*": "1.1.3",
+ "jsr:@std/internal@^1.0.12": "1.0.12",
+ "jsr:@std/json@^1.0.2": "1.0.2",
+ "jsr:@std/jsonc@*": "1.0.2",
+ "jsr:@std/path@*": "1.1.4",
+ "jsr:@std/semver@*": "1.0.7"
+ },
+ "jsr": {
+ "@std/collections@1.1.3": {
+ "integrity": "bf8b0818886df6a32b64c7d3b037a425111f28278d69fd0995aeb62777c986b0"
+ },
+ "@std/internal@1.0.12": {
+ "integrity": "972a634fd5bc34b242024402972cd5143eac68d8dffaca5eaa4dba30ce17b027"
+ },
+ "@std/json@1.0.2": {
+ "integrity": "d9e5497801c15fb679f55a2c01c7794ad7a5dfda4dd1bebab5e409cb5e0d34d4"
+ },
+ "@std/jsonc@1.0.2": {
+ "integrity": "909605dae3af22bd75b1cbda8d64a32cf1fd2cf6efa3f9e224aba6d22c0f44c7",
+ "dependencies": [
+ "jsr:@std/json"
+ ]
+ },
+ "@std/path@1.1.4": {
+ "integrity": "1d2d43f39efb1b42f0b1882a25486647cb851481862dc7313390b2bb044314b5",
+ "dependencies": [
+ "jsr:@std/internal"
+ ]
+ },
+ "@std/semver@1.0.7": {
+ "integrity": "7d5f65391762dc4358abde80fc3354086ddb40101f140295e60f290c138887d0"
+ }
+ },
+ "workspace": {
+ "dependencies": [
+ "jsr:@std/collections@*",
+ "jsr:@std/jsonc@*",
+ "jsr:@std/path@*",
+ "jsr:@std/semver@*"
+ ]
+ }
+}
diff --git a/readme-extras/docusaurus.md b/readme-extras/docusaurus.md
index a566513..dbdad56 100644
--- a/readme-extras/docusaurus.md
+++ b/readme-extras/docusaurus.md
@@ -1 +1 @@
-> **NOTE**: You may need to add `"baseUrl": "."` to your `tsconfig.json` to support proper file resolution.
+> **NOTE**: TypeScript 7 removes `baseUrl`. If you previously added `"baseUrl": "."` for module resolution, use `paths` instead (for example: `"paths": { "*": ["./*"] }`).
diff --git a/readme-extras/ember.md b/readme-extras/ember.md
index a566513..dbdad56 100644
--- a/readme-extras/ember.md
+++ b/readme-extras/ember.md
@@ -1 +1 @@
-> **NOTE**: You may need to add `"baseUrl": "."` to your `tsconfig.json` to support proper file resolution.
+> **NOTE**: TypeScript 7 removes `baseUrl`. If you previously added `"baseUrl": "."` for module resolution, use `paths` instead (for example: `"paths": { "*": ["./*"] }`).
diff --git a/readme-extras/node-ts.md b/readme-extras/node-ts.md
index 993508c..40e6880 100644
--- a/readme-extras/node-ts.md
+++ b/readme-extras/node-ts.md
@@ -4,6 +4,9 @@ This file is meant to be used in conjunction with other Node.js configurations,
```json
{
- "extends": ["@tsconfig/node22/tsconfig.json", "@tsconfig/node-ts/tsconfig.json"]
+ "extends": [
+ "@tsconfig/node22/tsconfig.json",
+ "@tsconfig/node-ts/tsconfig.json"
+ ]
}
```
diff --git a/readme-extras/nuxt.md b/readme-extras/nuxt.md
index a566513..dbdad56 100644
--- a/readme-extras/nuxt.md
+++ b/readme-extras/nuxt.md
@@ -1 +1 @@
-> **NOTE**: You may need to add `"baseUrl": "."` to your `tsconfig.json` to support proper file resolution.
+> **NOTE**: TypeScript 7 removes `baseUrl`. If you previously added `"baseUrl": "."` for module resolution, use `paths` instead (for example: `"paths": { "*": ["./*"] }`).
diff --git a/readme-extras/remix.md b/readme-extras/remix.md
index a566513..dbdad56 100644
--- a/readme-extras/remix.md
+++ b/readme-extras/remix.md
@@ -1 +1 @@
-> **NOTE**: You may need to add `"baseUrl": "."` to your `tsconfig.json` to support proper file resolution.
+> **NOTE**: TypeScript 7 removes `baseUrl`. If you previously added `"baseUrl": "."` for module resolution, use `paths` instead (for example: `"paths": { "*": ["./*"] }`).
diff --git a/scripts/create-npm-packages.ts b/scripts/create-npm-packages.ts
index 20aac43..ae7baa6 100644
--- a/scripts/create-npm-packages.ts
+++ b/scripts/create-npm-packages.ts
@@ -1,221 +1,277 @@
-import * as path from "https://deno.land/std/path/mod.ts";
-import stripJsonComments from "https://esm.sh/strip-json-comments";
+import { parse as parseJsonc } from "@std/jsonc";
+import * as path from "@std/path";
for await (const tsconfigEntry of Deno.readDir("bases")) {
- if (!tsconfigEntry.isFile) continue
-
- const tsconfigFilePath = path.join("bases", tsconfigEntry.name)
- const name = path.basename(tsconfigEntry.name).replace(".json", "")
+ if (!tsconfigEntry.isFile) continue;
+
+ const tsconfigFilePath = path.join("bases", tsconfigEntry.name);
+ const { name } = path.parse(tsconfigEntry.name);
// Make the folder
- const packagePath = path.join("packages", name)
- Deno.mkdirSync(packagePath, { recursive: true })
+ const packagePath = path.join("packages", name);
+ await Deno.mkdir(packagePath, { recursive: true });
// Copy over the template files
- const templateDir = "./template"
+ const templateDir = "./template";
for await (const templateFile of Deno.readDir(templateDir)) {
- if (!templateFile.isFile) continue
- if (templateFile.name === "README-combined.md") continue // README-combined.md is only for the combined bases
- const templatedFile = path.join(templateDir, templateFile.name)
- Deno.copyFileSync(templatedFile, path.join(packagePath, templateFile.name))
+ if (!templateFile.isFile) continue;
+ if (templateFile.name === "README-combined.md") continue; // README-combined.md is only for the combined bases
+ const templatedFile = path.join(templateDir, templateFile.name);
+ await Deno.copyFile(
+ templatedFile,
+ path.join(packagePath, templateFile.name),
+ );
}
-
+
// Copy the create a tsconfig.json from the base json
- const newPackageTSConfigPath = path.join(packagePath, "tsconfig.json")
- Deno.copyFileSync(tsconfigFilePath, newPackageTSConfigPath)
-
- const tsconfigText = await Deno.readTextFile(newPackageTSConfigPath)
- const tsconfigJSON = JSON.parse(stripJsonComments(tsconfigText))
+ const newPackageTSConfigPath = path.join(packagePath, "tsconfig.json");
+ await Deno.copyFile(tsconfigFilePath, newPackageTSConfigPath);
-// Drop `display` field in tsconfig.json for npm package
- await Deno.writeTextFile(newPackageTSConfigPath, tsconfigText.replace(/\s*"display.*/,''))
+ const tsconfigText = await Deno.readTextFile(newPackageTSConfigPath);
+ const tsconfigJSON = parseJsonc(tsconfigText) as {
+ display: string;
+ _version?: string;
+ };
+
+ // Drop `display` field in tsconfig.json for npm package
+ await Deno.writeTextFile(
+ newPackageTSConfigPath,
+ tsconfigText.replace(/\s*"display.*/, ""),
+ );
// Edit the package.json
- const packageText = await Deno.readTextFile(path.join(packagePath, "package.json"))
- const packageJSON = JSON.parse(packageText)
- packageJSON.name = `@tsconfig/${name}`
- packageJSON.description = `A base TSConfig for working with ${tsconfigJSON.display}.`
- packageJSON.keywords = ["tsconfig", name]
+ const packageText = await Deno.readTextFile(
+ path.join(packagePath, "package.json"),
+ );
+ const packageJSON = JSON.parse(packageText);
+ packageJSON.name = `@tsconfig/${name}`;
+ packageJSON.description =
+ `A base TSConfig for working with ${tsconfigJSON.display}.`;
+ packageJSON.keywords = ["tsconfig", name];
// Do some string replacements in the other templated files
- const replaceTextIn = ["README.md"]
+ const replaceTextIn = ["README.md"];
for (const filenameToEdit of replaceTextIn) {
- const fileToEdit = path.join(packagePath, filenameToEdit)
-
- const defaultTitle = `A base TSConfig for working with ${tsconfigJSON.display}`
- const title = name !== "recommended" ? defaultTitle : "The recommended base for a TSConfig"
-
- let packageText = await Deno.readTextFile(fileToEdit)
- packageText = packageText.replace(/\[filename\]/g, name)
- .replace(/\[display_title\]/g, title)
- .replace(/\[tsconfig\]/g, Deno.readTextFileSync(newPackageTSConfigPath))
-
+ const fileToEdit = path.join(packagePath, filenameToEdit);
+
+ const defaultTitle =
+ `A base TSConfig for working with ${tsconfigJSON.display}`;
+ const title = name !== "recommended"
+ ? defaultTitle
+ : "The recommended base for a TSConfig";
+
+ let packageText = await Deno.readTextFile(fileToEdit);
+ packageText = packageText
+ .replace(/\[filename\]/g, name)
+ .replace(/\[display_title\]/g, title)
+ .replace(
+ /\[tsconfig\]/g,
+ await Deno.readTextFile(newPackageTSConfigPath),
+ );
+
// Inject readme-extra if any
try {
- const readmeExtra = (await Deno.readTextFile(path.join("readme-extras", `${name}.md`))).trim()
-
- if (readmeExtra)
- packageText = packageText.replace(/\[readme-extra\]/g, `\n${readmeExtra}\n`)
- } catch (error) {
- // NOOP, there is no extra readme
+ const readmeExtra = (
+ await Deno.readTextFile(path.join("readme-extras", `${name}.md`))
+ ).trim();
+
+ if (readmeExtra) {
+ packageText = packageText.replace(
+ /\[readme-extra\]/g,
+ `\n${readmeExtra}\n`,
+ );
+ }
+ } catch (_error) {
+ // NOOP, there is no extra readme
// console.log(error)
}
-
+
// Remove readme-extra placeholders if any
- packageText = packageText.replace(/\[readme-extra\]/g, '')
+ packageText = packageText.replace(/\[readme-extra\]/g, "");
- await Deno.writeTextFile(fileToEdit, packageText)
- };
+ await Deno.writeTextFile(fileToEdit, packageText);
+ }
// Bump the last version of the number from npm,
// or use the _version in tsconfig if it's higher,
// or default to 1.0.0
- let version = tsconfigJSON._version || "1.0.0"
+ let version = tsconfigJSON._version || "1.0.0";
try {
- const npmResponse = await fetch(`https://registry.npmjs.org/${packageJSON.name}`)
- const npmPackage = await npmResponse.json()
+ const npmResponse = await fetch(
+ `https://registry.npmjs.org/${packageJSON.name}`,
+ );
+ const npmPackage = await npmResponse.json();
const semverMarkers = npmPackage["dist-tags"].latest.split(".");
- const bumpedVersion = `${semverMarkers[0]}.${semverMarkers[1]}.${Number(semverMarkers[2]) + 1}`;
+ const bumpedVersion = `${semverMarkers[0]}.${semverMarkers[1]}.${
+ Number(semverMarkers[2]) + 1
+ }`;
if (isBumpedVersionHigher(version, bumpedVersion)) {
version = bumpedVersion;
}
- } catch (error) {
- // NOOP, this is for the first deploy
+ } catch (_error) {
+ // NOOP, this is for the first deploy
// console.log(error)
}
-
- packageJSON.version = version
- await Deno.writeTextFile(path.join(packagePath, "package.json"), JSON.stringify(packageJSON, null, " "))
+
+ packageJSON.version = version;
+ await Deno.writeTextFile(
+ path.join(packagePath, "package.json"),
+ JSON.stringify(packageJSON, null, " "),
+ );
console.log("Built:", tsconfigEntry.name);
}
-await buildTsconfigBases()
+await buildTsconfigBases();
-function isBumpedVersionHigher (packageJSONVersion: string, bumpedVersion: string) {
- const semverMarkersPackageJSON = packageJSONVersion.split('.')
- const semverMarkersBumped = bumpedVersion.split('.')
+function isBumpedVersionHigher(
+ packageJSONVersion: string,
+ bumpedVersion: string,
+) {
+ const semverMarkersPackageJSON = packageJSONVersion.split(".");
+ const semverMarkersBumped = bumpedVersion.split(".");
for (let i = 0; i < 3; i++) {
if (Number(semverMarkersPackageJSON[i]) > Number(semverMarkersBumped[i])) {
- return false
+ return false;
}
}
- return true
+ return true;
}
// build @tsconfig/bases catch all package
async function buildTsconfigBases() {
- const name = "bases"
+ const name = "bases";
// Make the folder
- const packagePath = path.join("packages", name)
- Deno.mkdirSync(packagePath, { recursive: true })
+ const packagePath = path.join("packages", name);
+ await Deno.mkdir(packagePath, { recursive: true });
// Copy over the template files
- const templateDir = "./template"
+ const templateDir = "./template";
for await (const templateFile of Deno.readDir(templateDir)) {
- if (!templateFile.isFile) continue
- if (templateFile.name === "README.md") continue
- const templatedFile = path.join(templateDir, templateFile.name)
- Deno.copyFileSync(
+ if (!templateFile.isFile) continue;
+ if (templateFile.name === "README.md") continue;
+ const templatedFile = path.join(templateDir, templateFile.name);
+ await Deno.copyFile(
templatedFile,
path.join(
packagePath,
- templateFile.name === "README-combined.md" ? "README.md" : templateFile.name,
+ templateFile.name === "README-combined.md"
+ ? "README.md"
+ : templateFile.name,
),
- )
+ );
}
- const exportsOverride = {}
+ const exportsOverride: Record<`./${string}`, string> = {};
// Copy the tsconfig.json files from all bases
for await (const tsconfigEntry of Deno.readDir("bases")) {
- if (!tsconfigEntry.isFile) continue
+ if (!tsconfigEntry.isFile) continue;
// remove extension
- const name = tsconfigEntry.name.replace(/\.json$/, "")
+ const { name } = path.parse(tsconfigEntry.name);
- const finalTsconfigFile = `${name}.tsconfig.json`
+ const finalTsconfigFile = `${name}.tsconfig.json`;
// add entry to package.json exports
- exportsOverride[`./${name}`] = `./${finalTsconfigFile}`
+ exportsOverride[`./${name}`] = `./${finalTsconfigFile}`;
- const tsconfigFilePath = path.join("bases", tsconfigEntry.name)
+ const tsconfigFilePath = path.join("bases", tsconfigEntry.name);
- const newPackageTSConfigPath = path.join(packagePath, finalTsconfigFile)
+ const newPackageTSConfigPath = path.join(packagePath, finalTsconfigFile);
- Deno.copyFileSync(tsconfigFilePath, newPackageTSConfigPath)
+ await Deno.copyFile(tsconfigFilePath, newPackageTSConfigPath);
- const tsconfigText = await Deno.readTextFile(newPackageTSConfigPath)
+ const tsconfigText = await Deno.readTextFile(newPackageTSConfigPath);
// Drop `display` field in tsconfig.json for npm package
- await Deno.writeTextFile(newPackageTSConfigPath, tsconfigText.replace(/\s*"display.*/, ""))
+ await Deno.writeTextFile(
+ newPackageTSConfigPath,
+ tsconfigText.replace(/\s*"display.*/, ""),
+ );
}
- const tsconfigJSON = { display: "Bases" }
+ const tsconfigJSON: { display: string; _version?: string } = {
+ display: "Bases",
+ };
// Edit the package.json
- const packageText = await Deno.readTextFile(path.join(packagePath, "package.json"))
- const packageJSON = JSON.parse(packageText)
- packageJSON.name = `@tsconfig/${name}`
- packageJSON.description = `Combined tsconfig bases.`
- packageJSON.keywords = ["tsconfig", name, "combined"]
- packageJSON.exports = exportsOverride
+ const packageText = await Deno.readTextFile(
+ path.join(packagePath, "package.json"),
+ );
+ const packageJSON = JSON.parse(packageText);
+ packageJSON.name = `@tsconfig/${name}`;
+ packageJSON.description = `Combined tsconfig bases.`;
+ packageJSON.keywords = ["tsconfig", name, "combined"];
+ packageJSON.exports = exportsOverride;
// Do some string replacements in the other templated files
- const replaceTextIn = ["README.md"]
+ const replaceTextIn = ["README.md"];
for (const filenameToEdit of replaceTextIn) {
- const fileToEdit = path.join(packagePath, filenameToEdit)
+ const fileToEdit = path.join(packagePath, filenameToEdit);
- const defaultTitle = `A base TSConfig for working with ${tsconfigJSON.display}`
- const title = name !== "recommended" ? defaultTitle : "The recommended base for a TSConfig"
+ const defaultTitle =
+ `A base TSConfig for working with ${tsconfigJSON.display}`;
+ const title = defaultTitle;
- let packageText = await Deno.readTextFile(fileToEdit)
- packageText = packageText.replace(/\[filename\]/g, name).replace(/\[display_title\]/g, title)
+ let packageText = await Deno.readTextFile(fileToEdit);
+ packageText = packageText
+ .replace(/\[filename\]/g, name)
+ .replace(/\[display_title\]/g, title);
// Inject readme-extra if any
try {
- const readmeExtra = (await Deno.readTextFile(path.join("readme-extras", `${name}.md`))).trim()
+ const readmeExtra = (
+ await Deno.readTextFile(path.join("readme-extras", `${name}.md`))
+ ).trim();
if (readmeExtra) {
- packageText = packageText.replace(/\[readme-extra\]/g, `\n${readmeExtra}\n`)
+ packageText = packageText.replace(
+ /\[readme-extra\]/g,
+ `\n${readmeExtra}\n`,
+ );
}
- } catch (error) {
+ } catch (_error) {
// NOOP, there is no extra readme
// console.log(error)
}
// Remove readme-extra placeholders if any
- packageText = packageText.replace(/\[readme-extra\]/g, "")
+ packageText = packageText.replace(/\[readme-extra\]/g, "");
- await Deno.writeTextFile(fileToEdit, packageText)
+ await Deno.writeTextFile(fileToEdit, packageText);
}
// Bump the last version of the number from npm,
// or use the _version in tsconfig if it's higher,
// or default to 1.0.0
- let version = tsconfigJSON._version || "1.0.0"
+ let version = tsconfigJSON._version || "1.0.0";
try {
- const npmResponse = await fetch(`https://registry.npmjs.org/${packageJSON.name}`)
- const npmPackage = await npmResponse.json()
+ const npmResponse = await fetch(
+ `https://registry.npmjs.org/${packageJSON.name}`,
+ );
+ const npmPackage = await npmResponse.json();
- const semverMarkers = npmPackage["dist-tags"].latest.split(".")
- const bumpedVersion = `${semverMarkers[0]}.${semverMarkers[1]}.${Number(semverMarkers[2]) + 1}`
+ const semverMarkers = npmPackage["dist-tags"].latest.split(".");
+ const bumpedVersion = `${semverMarkers[0]}.${semverMarkers[1]}.${
+ Number(semverMarkers[2]) + 1
+ }`;
if (isBumpedVersionHigher(version, bumpedVersion)) {
- version = bumpedVersion
+ version = bumpedVersion;
}
- } catch (error) {
+ } catch (_error) {
// NOOP, this is for the first deploy
// console.log(error)
}
- packageJSON.version = version
+ packageJSON.version = version;
await Deno.writeTextFile(
path.join(packagePath, "package.json"),
JSON.stringify(packageJSON, null, " "),
- )
+ );
- console.log("Built:", "bases")
+ console.log("Built:", "bases");
}
diff --git a/scripts/deploy-changed-npm-packages.ts b/scripts/deploy-changed-npm-packages.ts
index 22166ca..5048bfa 100644
--- a/scripts/deploy-changed-npm-packages.ts
+++ b/scripts/deploy-changed-npm-packages.ts
@@ -1,57 +1,78 @@
-import * as path from "https://deno.land/std@0.164.0/path/mod.ts";
-import * as bufio from "https://deno.land/std@0.164.0/io/buffer.ts";
+import * as path from "@std/path";
// Loop through generated packages, deploying versions for anything which has a different tsconfig
-const uploaded = []
+const uploaded = [];
-for (const dirEntry of Deno.readDirSync("packages")) {
- if (dirEntry.name === 'bases') continue // @tsconfig/bases package is special, it doesn't have a single tsconfig entry, it will be deployed separately
+for await (const dirEntry of Deno.readDir("packages")) {
+ if (dirEntry.name === "bases") continue; // @tsconfig/bases package is special, it doesn't have a single tsconfig entry, it will be deployed separately
- const localTsconfigPath = path.join("packages", dirEntry.name, "tsconfig.json");
- const newTSConfig = Deno.readTextFileSync(localTsconfigPath);
+ const localTsconfigPath = path.join(
+ "packages",
+ dirEntry.name,
+ "tsconfig.json",
+ );
+ const newTSConfig = await Deno.readTextFile(localTsconfigPath);
let upload = false;
try {
- const unpkgURL = `https://unpkg.com/@tsconfig/${dirEntry.name}/tsconfig.json`;
+ const unpkgURL =
+ `https://unpkg.com/@tsconfig/${dirEntry.name}/tsconfig.json`;
const currentJSONReq = await fetch(unpkgURL);
const currentJSONTxt = await currentJSONReq.text();
upload = currentJSONTxt !== newTSConfig;
- } catch (error) {
+ } catch (_error) {
// Not here, definitely needs to be uploaded
upload = true;
}
if (upload) {
- const process = Deno.run({
- cmd: ["npm", "publish", "--provenance", "--access", "public"],
+ const token = Deno.env.get("NODE_AUTH_TOKEN");
+ if (!token) throw new Error("NODE_AUTH_TOKEN is required");
+
+ const cmd = new Deno.Command("npm", {
+ args: ["publish", "--provenance", "--access", "public"],
stdout: "piped",
+ stderr: "piped",
cwd: path.join("packages", dirEntry.name),
- env: { NODE_AUTH_TOKEN: Deno.env.get("NODE_AUTH_TOKEN")! },
+ env: { NODE_AUTH_TOKEN: token },
});
- for await (const line of bufio.readLines(process.stdout!)) {
- console.warn(line);
+ const output = await cmd.output();
+ const stdoutText = new TextDecoder().decode(output.stdout);
+ const stderrText = new TextDecoder().decode(output.stderr);
+ if (stdoutText.trim()) console.warn(stdoutText.trimEnd());
+ if (stderrText.trim()) console.warn(stderrText.trimEnd());
+ if (!output.success) {
+ throw new Error(`npm publish failed for ${dirEntry.name}`);
}
- uploaded.push(dirEntry.name)
+ uploaded.push(dirEntry.name);
}
}
if (uploaded.length) {
// If there's any uploads, we need to update the combined package too
- const process = Deno.run({
- cmd: ["npm", "publish", "--provenance", "--access", "public"],
- stdout: "piped",
- cwd: path.join("packages", "bases"),
- env: { NODE_AUTH_TOKEN: Deno.env.get("NODE_AUTH_TOKEN")! },
- });
+ const token = Deno.env.get("NODE_AUTH_TOKEN");
+ if (!token) throw new Error("NODE_AUTH_TOKEN is required");
- for await (const line of bufio.readLines(process.stdout!)) {
- console.warn(line);
- }
+ const cmd = new Deno.Command("npm", {
+ args: ["publish", "--provenance", "--access", "public"],
+ stdout: "piped",
+ stderr: "piped",
+ cwd: path.join("packages", "bases"),
+ env: { NODE_AUTH_TOKEN: token },
+ });
+ const output = await cmd.output();
+ const stdoutText = new TextDecoder().decode(output.stdout);
+ const stderrText = new TextDecoder().decode(output.stderr);
+ if (stdoutText.trim()) console.warn(stdoutText.trimEnd());
+ if (stderrText.trim()) console.warn(stderrText.trimEnd());
+ if (!output.success) {
+ throw new Error("npm publish failed for bases");
+ }
- console.log("Uploaded: ", uploaded.join(", "))
+ console.log("Uploaded: ", uploaded.join(", "));
} else {
- console.log("No uploads")
+ console.log("No uploads");
}
diff --git a/scripts/generate-lts.ts b/scripts/generate-lts.ts
index 228430b..26622bf 100644
--- a/scripts/generate-lts.ts
+++ b/scripts/generate-lts.ts
@@ -1,8 +1,10 @@
// deno run --allow-read --allow-write --allow-net scripts/generate-lts.ts
//
-import { gt } from "https://deno.land/std@0.192.0/semver/gt.ts";
-import { parse } from "https://deno.land/std@0.192.0/semver/parse.ts";
+import { deepMerge } from "@std/collections";
+import { parse as parseJsonc } from "@std/jsonc";
+import * as path from "@std/path";
+import { greaterThan, parse } from "@std/semver";
interface NodeReleaseMetadata {
version: string;
@@ -18,45 +20,47 @@ interface NodeReleaseMetadata {
security: boolean;
}
-type Tsconfig = Record;
+type Tsconfig = Record;
const versionRegex = /v(\d+)\.(\d+)\.(\d+)/;
-const releasesResponse = await fetch("https://nodejs.org/download/release/index.json");
+const releasesResponse = await fetch(
+ "https://nodejs.org/download/release/index.json",
+);
const releasesJson = (await releasesResponse.json()) as NodeReleaseMetadata[];
const lts = releasesJson
.filter((r) => r.lts)
.reduce(
- (prevValue, currValue) => (gt(parse(currValue.version), parse(prevValue.version)) ? currValue : prevValue),
+ (prevValue, currValue) =>
+ greaterThan(parse(currValue.version), parse(prevValue.version))
+ ? currValue
+ : prevValue,
{
- version: "v0.0.0"
- }
+ version: "v0.0.0",
+ },
);
const baseMajorVersion = (lts.version.match(versionRegex) || [])[1];
const base = `node${baseMajorVersion}`;
const versioned = {
$schema: "https://www.schemastore.org/tsconfig",
display: `Node LTS (${baseMajorVersion})`,
- _version: lts.version.substring(lts.version.indexOf("v") + 1)
+ _version: lts.version.substring(lts.version.indexOf("v") + 1),
};
-import * as path from "https://deno.land/std/path/mod.ts";
-import stripJsonComments from "https://esm.sh/strip-json-comments";
-import { deepMerge } from "https://deno.land/std/collections/deep_merge.ts";
+const packageText = await Deno.readTextFile(
+ path.join(Deno.cwd(), "bases", `${base}.jsonc`),
+);
-const packageText = await Deno.readTextFile(path.join(Deno.cwd(), "bases", `${base}.json`));
-
-const parsed = JSON.parse(stripJsonComments(packageText)) as Tsconfig;
+const parsed = parseJsonc(packageText) as Tsconfig;
// This is to get the _version property to show up directly under the display property
const parsedAndOrdered = deepMerge(versioned, parsed);
parsedAndOrdered.display = versioned.display;
-const serializedConfig =
- "// This file was autogenerated by a script\n" +
+const serializedConfig = "// This file was autogenerated by a script\n" +
`// Equivalent to a config of: ${base}\n` +
JSON.stringify(parsedAndOrdered, null, " ") +
"\n";
-const filePath = path.join(Deno.cwd(), "bases/node-lts.json");
+const filePath = path.join(Deno.cwd(), "bases/node-lts.jsonc");
Deno.writeTextFile(filePath, serializedConfig);
diff --git a/scripts/generate-recommend.ts b/scripts/generate-recommend.ts
index c89cb49..1c61143 100644
--- a/scripts/generate-recommend.ts
+++ b/scripts/generate-recommend.ts
@@ -1,28 +1,53 @@
-import stripJsonComments from "https://esm.sh/strip-json-comments";
-import * as bufio from "https://deno.land/std@0.164.0/io/buffer.ts";
-import * as path from "https://deno.land/std/path/mod.ts";
+import { deepMerge } from "@std/collections";
+import { parse as parseJsonc } from "@std/jsonc";
+import * as path from "@std/path";
const tsconfigStorage = await Deno.makeTempDir({ prefix: "tsconfig" });
// Generate a tsconfig
-const p = await Deno.run({ cmd: ["npx", "-p", "typescript", "tsc", "--init"], stdout: "piped", cwd: tsconfigStorage });
-for await (const line of bufio.readLines(p.stdout!)) {
- console.warn(line);
+const cmd = new Deno.Command("npx", {
+ args: ["-p", "typescript", "tsc", "--init"],
+ stdout: "piped",
+ stderr: "piped",
+ cwd: tsconfigStorage,
+});
+
+const output = await cmd.output();
+const stdoutText = new TextDecoder().decode(output.stdout);
+const stderrText = new TextDecoder().decode(output.stderr);
+
+for (const line of stdoutText.split("\n")) {
+ if (line) console.warn(line);
+}
+for (const line of stderrText.split("\n")) {
+ if (line) console.warn(line);
}
+if (!output.success) {
+ throw new Error("Failed to generate tsconfig via npx tsc --init");
+}
+
+const packageText = await Deno.readTextFile(
+ path.join(tsconfigStorage, "tsconfig.json"),
+);
+const parsed = parseJsonc(packageText) as Record;
-let packageText = await Deno.readTextFile(path.join(tsconfigStorage, "tsconfig.json"));
-// This will strip comments
-const parsed = JSON.parse(stripJsonComments(packageText));
+const versioned = {
+ $schema: "https://www.schemastore.org/tsconfig",
+ display: "Recommended",
+ _version: "2.0.0",
+};
-// `display` field will be dropped at generating npm package, so prevent the order from being last in the JSON file
-parsed.display = "Recommended";
-parsed["$schema"] = "https://www.schemastore.org/tsconfig";
+// This is to get the _version property to show up directly under the display property
+const parsedAndOrdered = deepMerge(versioned, parsed);
+parsedAndOrdered.display = versioned.display;
-const result = JSON.stringify(parsed, null, " ");
+const result = JSON.stringify(parsedAndOrdered, null, 2);
-const npmResponse = await fetch(`https://unpkg.com/@tsconfig/svelte/tsconfig.json`);
+const npmResponse = await fetch(
+ `https://unpkg.com/@tsconfig/svelte/tsconfig.json`,
+);
const npmPackage = await npmResponse.text();
if (npmPackage !== result) {
- Deno.writeTextFile("bases/recommended.json", result);
+ await Deno.writeTextFile("bases/recommended.jsonc", `${result}\n`);
}
diff --git a/scripts/update-markdown-readme.ts b/scripts/update-markdown-readme.ts
index 64c2eae..c38bf84 100644
--- a/scripts/update-markdown-readme.ts
+++ b/scripts/update-markdown-readme.ts
@@ -1,28 +1,32 @@
// deno run --allow-read --allow-write scripts/update-markdown-readme.ts
//
-import * as path from "https://deno.land/std/path/mod.ts";
-import stripJsonComments from "https://esm.sh/strip-json-comments";
-const readme = await Deno.readTextFileSync("./README.md")
-let center = ""
+import { parse as parseJsonc } from "@std/jsonc";
+import * as path from "@std/path";
-const paths = []
+const readme = await Deno.readTextFile("./README.md");
+let center = "";
+
+const paths = [];
for await (const tsconfigEntry of Deno.readDir("bases")) {
- if (!tsconfigEntry.isFile) continue
- paths.push(tsconfigEntry.name)
+ if (!tsconfigEntry.isFile) continue;
+ paths.push(tsconfigEntry.name);
}
-const sortedPaths = paths.sort((l, r) => l.localeCompare(r)).filter(r => !r.includes("recommended"))
-const basePaths = ["recommended.json", ...sortedPaths]
+const sortedPaths = paths
+ .sort((l, r) => l.localeCompare(r))
+ .filter((r) => !r.includes("recommended"));
+const basePaths = ["recommended.jsonc", ...sortedPaths];
for (const base of basePaths) {
- if (base === "esm.json") continue
- const tsconfigFilePath = path.join("bases", base)
- const name = path.basename(base).replace(".json", "")
-
- const tsconfigText = await Deno.readTextFile(tsconfigFilePath)
- const tsconfigJSON = JSON.parse(stripJsonComments(tsconfigText))
+ if (base === "esm.jsonc") continue;
+ const tsconfigFilePath = path.join("bases", base);
+ const { name } = path.parse(base);
+
+ const tsconfigText = await Deno.readTextFile(tsconfigFilePath);
+ const tsconfigJSON = parseJsonc(tsconfigText) as { display: string };
- center += `### ${tsconfigJSON.display} tsconfig.json\n`
+ center +=
+ `### ${tsconfigJSON.display} tsconfig.json\n`;
center += `
Install:
@@ -32,10 +36,14 @@ npm install --save-dev @tsconfig/${name}
yarn add --dev @tsconfig/${name}
\`\`\`
-`
+`;
- const hasReadmeExtra = await Deno.stat(`./readme-extras/${name}.md`).then(() => true).catch(() => false)
- const readmeExtra = hasReadmeExtra ? (await Deno.readTextFile(`./readme-extras/${name}.md`)).trim() : ""
+ const hasReadmeExtra = await Deno.stat(`./readme-extras/${name}.md`)
+ .then(() => true)
+ .catch(() => false);
+ const readmeExtra = hasReadmeExtra
+ ? (await Deno.readTextFile(`./readme-extras/${name}.md`)).trim()
+ : "";
const defaultInstructions = `Add to your \`tsconfig.json\`:
@@ -43,24 +51,23 @@ yarn add --dev @tsconfig/${name}
"extends": "@tsconfig/${name}/tsconfig.json"
\`\`\`
-`
-
- if (readmeExtra) {
- if (!readmeExtra.includes("extends")) {
- center += defaultInstructions + "\n"
- }
+`;
- center += `\n${readmeExtra}\n\n`
-
- } else {
- center += defaultInstructions
+ if (readmeExtra) {
+ if (!readmeExtra.includes("extends")) {
+ center += `${defaultInstructions}\n`;
}
-};
-const startMarker =""
-const start = readme.split(startMarker)[0]
-const endMarker =""
-const end = readme.split(endMarker)[1]
-const newREADME = start + startMarker + "\n" + center + "\n" + endMarker + end
+ center += `\n${readmeExtra}\n\n`;
+ } else {
+ center += defaultInstructions;
+ }
+}
+
+const startMarker = "";
+const start = readme.split(startMarker)[0];
+const endMarker = "";
+const end = readme.split(endMarker)[1];
+const newREADME = `${start}${startMarker}\n${center}\n${endMarker}${end}`;
-await Deno.writeTextFileSync("./README.md", newREADME)
+await Deno.writeTextFile("./README.md", newREADME);
diff --git a/template/README.md b/template/README.md
index ea42fae..b1dc6d3 100644
--- a/template/README.md
+++ b/template/README.md
@@ -12,10 +12,10 @@ Add to your `tsconfig.json`:
```json
"extends": "@tsconfig/[filename]/tsconfig.json"
```
-[readme-extra]
----
-The `tsconfig.json`:
+## [readme-extra]
+
+The `tsconfig.json`:
```jsonc
[tsconfig]
diff --git a/test/index.ts b/test/index.ts
index eb171b6..accefce 100644
--- a/test/index.ts
+++ b/test/index.ts
@@ -1 +1 @@
-console.log("Hello World")
+console.log("Hello World");
diff --git a/test/package-lock.json b/test/package-lock.json
new file mode 100644
index 0000000..8f247b2
--- /dev/null
+++ b/test/package-lock.json
@@ -0,0 +1,56 @@
+{
+ "name": "test-bases",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "test-bases",
+ "devDependencies": {
+ "@tsconfig/bases": "file:../packages/bases",
+ "@types/node": "^24.2.1",
+ "typescript": "^5.9.2"
+ }
+ },
+ "../packages/bases": {
+ "name": "@tsconfig/bases",
+ "version": "1.0.17",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@tsconfig/bases": {
+ "resolved": "../packages/bases",
+ "link": true
+ },
+ "node_modules/@types/node": {
+ "version": "24.10.4",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.4.tgz",
+ "integrity": "sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~7.16.0"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.9.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
+ "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
+ "dev": true,
+ "license": "MIT"
+ }
+ }
+}
diff --git a/test/package.json b/test/package.json
index 52ef9fe..e6909ab 100644
--- a/test/package.json
+++ b/test/package.json
@@ -3,9 +3,8 @@
"scripts": {
"test": "tsc --noEmit"
},
- "packageManager": "pnpm@10.12.4",
"devDependencies": {
- "@tsconfig/bases": "link:../packages/bases",
+ "@tsconfig/bases": "file:../packages/bases",
"@types/node": "^24.2.1",
"typescript": "^5.9.2"
}
diff --git a/test/pnpm-lock.yaml b/test/pnpm-lock.yaml
deleted file mode 100644
index cdcec73..0000000
--- a/test/pnpm-lock.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
-lockfileVersion: '9.0'
-
-settings:
- autoInstallPeers: true
- excludeLinksFromLockfile: false
-
-importers:
-
- .:
- devDependencies:
- '@tsconfig/bases':
- specifier: link:../packages/bases
- version: link:../packages/bases
- '@types/node':
- specifier: ^24.2.1
- version: 24.2.1
- typescript:
- specifier: ^5.9.2
- version: 5.9.2
-
-packages:
-
- '@types/node@24.2.1':
- resolution: {integrity: sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==}
-
- typescript@5.9.2:
- resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==}
- engines: {node: '>=14.17'}
- hasBin: true
-
- undici-types@7.10.0:
- resolution: {integrity: sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==}
-
-snapshots:
-
- '@types/node@24.2.1':
- dependencies:
- undici-types: 7.10.0
-
- typescript@5.9.2: {}
-
- undici-types@7.10.0: {}
diff --git a/test/tsconfig.json b/test/tsconfig.json
index 5ba4af4..69f1ddc 100644
--- a/test/tsconfig.json
+++ b/test/tsconfig.json
@@ -1,3 +1,5 @@
{
- "extends": ["@tsconfig/bases/node-lts"]
+ "extends": [
+ "@tsconfig/bases/node-lts"
+ ]
}