Skip to content

Commit f567bc5

Browse files
committed
refactor(types): move @types/node to the tool that needs it
The root package.json carried @types/node solely so the root tsconfig could set `types: ["node"]`, and that tsconfig existed solely to cover `nix/**/*.ts`. With the last of those files now living under nix/tools/models-dev-gen, both belonged there rather than at the root: no `*.ts` file sits at the repository root, and apps/ccusage and docs each declare @types/node themselves. So the tool directory gets its own tsconfig, standalone like the other two in this repository, and pins @types/node next to the dependencies it already pins. gen.ts stays excluded for the same reason the oxlint config ignores it. The root package.json is left with no devDependencies at all. `just typecheck` still resolves node types for compact.test.ts, now out of nix/tools/models-dev-gen/node_modules, which `just gen-bun-nix` populates.
1 parent fa0548b commit f567bc5

6 files changed

Lines changed: 23 additions & 10 deletions

File tree

‎nix/tools/models-dev-gen/bun.lock‎

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎nix/tools/models-dev-gen/bun.nix‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@
1313
...
1414
}:
1515
{
16+
"@types/[email protected]" = fetchurl {
17+
url = "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz";
18+
hash = "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==";
19+
};
1620
"[email protected]" = fetchurl {
1721
url = "https://registry.npmjs.org/remeda/-/remeda-2.33.7.tgz";
1822
hash = "sha512-cXlyjevWx5AcslOUEETG4o8XYi9UkoCXcJmj7XhPFVbla+ITuOBxv6ijBrmbeg+ZhzmDThkNdO+iXKUfrJep1w==";
1923
};
24+
"[email protected]" = fetchurl {
25+
url = "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz";
26+
hash = "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==";
27+
};
2028
"[email protected]" = fetchurl {
2129
url = "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz";
2230
hash = "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==";

‎nix/tools/models-dev-gen/package.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
"dependencies": {
77
"remeda": "2.33.7",
88
"zod": "3.24.2"
9+
},
10+
"devDependencies": {
11+
"@types/node": "24.13.3"
912
}
1013
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"erasableSyntaxOnly": true,
2020
"skipLibCheck": true
2121
},
22-
"include": ["*.ts", "nix/**/*.ts"],
23-
"exclude": ["node_modules", "nix/tools/models-dev-gen/gen.ts"]
22+
"include": ["*.ts"],
23+
// gen.ts runs inside a copy of the upstream models.dev worktree and imports
24+
// `./packages/core/src/generate.ts` from there, so it cannot resolve here.
25+
"exclude": ["node_modules", "gen.ts"]
2426
}

‎package.json‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@
1212
"preinstall": "npx only-allow pnpm"
1313
},
1414
"dependencies": {},
15-
"devDependencies": {
16-
"@types/node": "catalog:types"
17-
},
1815
"packageManager": "[email protected]"
1916
}

‎pnpm-lock.yaml‎

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)