Skip to content

Commit 54b0168

Browse files
authored
TS7 stable with tsdown latest to match (#73)
1 parent 4a89802 commit 54b0168

10 files changed

Lines changed: 500 additions & 332 deletions

File tree

‎.changeset/itchy-trams-wait.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bomb.sh/tools": minor
3+
---
4+
5+
Update to TypeScript v7 stable. Also updated tsdown to the latest for compatibility with `typescript@7`.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ If you'd like to use this package for your own projects, please consider forking
99
- `bsh build` command, using [`tsdown`](https://tsdown.dev/) (ESM, unbundled, types by default) with [`publint`](https://publint.dev/) as a publish gate
1010
- `bsh test` command, using [`vitest`](https://vitest.dev/)
1111
- `bsh format` command, using [`oxfmt`](https://oxc.rs/docs/guide/usage/formatter)
12-
- `bsh lint` command, using [`oxlint`](https://oxc.rs/docs/guide/usage/linter), [`knip`](https://knip.dev), [`tsgo`](https://npmx.dev/@typescript/native-preview)
12+
- `bsh lint` command, using [`oxlint`](https://oxc.rs/docs/guide/usage/linter), [`knip`](https://knip.dev), and TypeScript
1313
- `bsh publint` command, using [`publint`](https://publint.dev/) (also runs automatically as a publish gate in `bsh build`)
1414
- `bsh sync` command, which links our shared [agent skills](#agent-skills) into your project
1515
- shared `tsconfig.json` file

‎package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@
6363
"@bomb.sh/args": "^0.3.1",
6464
"@humanfs/node": "^0.16.7",
6565
"@humanfs/types": "^0.15.0",
66-
"@typescript/native-preview": "7.0.0-dev.20260623.1",
6766
"knip": "^6.9.0",
6867
"oxfmt": "^0.74.0",
6968
"oxlint": "^1.89.0",
7069
"publint": "^0.3.18",
7170
"tinyexec": "^1.1.1",
72-
"tsdown": "^0.22.3",
71+
"tsdown": "^0.23.1",
72+
"typescript": "^7.0.2",
7373
"vitest": "^5.0.5",
7474
"vitest-ansi-serializer": "^0.3.1",
7575
"yaml": "^2.9.1"
7676
},
7777
"devDependencies": {
7878
"@changesets/cli": "^2.30.0",
79-
"@types/node": "^22.19.15"
79+
"@types/node": "^22.20.5"
8080
},
8181
"volta": {
82-
"node": "22.14.0"
82+
"node": "22.23.4"
8383
},
8484
"packageManager": "pnpm@10.34.3",
8585
"pnpm": {}

‎pnpm-lock.yaml‎

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

‎skills/build/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pnpm run build
3232
- **Sourcemaps:** enabled
3333
- **Clean:** removes dist/ before building
3434
- **Unbundled** by default (each source file produces one output file)
35-
- **Types:** `.d.mts` declarations generated by default (via tsgo)
35+
- **Types:** `.d.mts` declarations generated by default
3636
- **Entry:** defaults to `src/**/*.ts`
3737
- **Config:** explicitly disabled (`config: false`) — tsdown.config.ts is ignored
3838

‎skills/lifecycle/SKILL.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ All scripts proxy to `bsh <command>` via `package.json`. Never bypass them.
2727
| `pnpm run build` | `bsh build` | Build with tsdown (ESM, sourcemaps, clean) |
2828
| `pnpm run dev` | `bsh dev` | Watch mode with native Node TS transforms |
2929
| `pnpm run format` | `bsh format` | Format with oxfmt |
30-
| `pnpm run lint` | `bsh lint` | Parallel: oxlint + knip + tsgo |
30+
| `pnpm run lint` | `bsh lint` | Parallel: oxlint + knip + tsc |
3131
| `pnpm run test` | `bsh test` | Run tests with vitest (single run) |
3232
| `pnpm run init` | `bsh init` | Scaffold new project from template |
3333

@@ -156,7 +156,7 @@ These are hard rules. Violating any of them is a failed task.
156156
| `npx oxfmt` / `pnpm exec oxfmt` | `pnpm run format` |
157157
| `npx tsdown` / `pnpm exec tsdown` | `pnpm run build` |
158158
| `npx knip` / `pnpm exec knip` | `pnpm run lint` |
159-
| `npx tsc` / `tsgo` directly | `pnpm run lint` (includes type checking) |
159+
| `npx tsc` directly | `pnpm run lint` (includes type checking) |
160160
| `require()`, `module.exports` | ESM `import` / `export` |
161161
| Implement before writing tests | Write tests first (RED→GREEN) |
162162
| Claim "tests pass" without running them | Always run `pnpm run test` |
@@ -170,7 +170,7 @@ Agents default to `npx`. Bombshell projects always use `pnpm run` for local scri
170170

171171
### CRITICAL: Running underlying tools directly
172172

173-
Never call `tsdown`, `vitest`, `oxlint`, `knip`, `oxfmt`, or `tsgo` directly. The `bsh` wrapper configures flags, paths, and parallelism. Bypassing it produces wrong behavior.
173+
Never call `tsdown`, `vitest`, `oxlint`, `knip`, `oxfmt`, or `tsc` directly. The `bsh` wrapper configures flags, paths, and parallelism. Bypassing it produces wrong behavior.
174174

175175
### CRITICAL: Using npm, yarn, or bun
176176

@@ -182,7 +182,7 @@ Always write or update tests before implementation. The RED→GREEN cycle is not
182182

183183
### HIGH: Running tsc directly for type checking
184184

185-
`pnpm run lint` runs `tsgo --noEmit` as part of its parallel pipeline. Do not run `tsc` or `tsgo` separately — the lint command handles it.
185+
`pnpm run lint` runs `tsc --noEmit` as part of its parallel pipeline. Do not run `tsc` separately — the lint command handles it.
186186

187187
### HIGH: Full autopilot PR creation
188188

‎skills/lint/SKILL.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: lint
33
description: >
4-
Multi-tool linting pipeline: oxlint, knip, and tsgo run in parallel via
4+
Multi-tool linting pipeline: oxlint, knip, and tsc run in parallel via
55
pnpm run lint (publint gates pnpm run build instead). Covers Bombshell
66
conventions: URL over node:path, max 2 params with options bag, named
77
exports only, import type, prefer node builtins, no console.log, no
@@ -21,7 +21,7 @@ metadata:
2121

2222
# Lint
2323

24-
Multi-tool linting pipeline. oxlint, knip, and tsgo run in parallel with unified output.
24+
Multi-tool linting pipeline. oxlint, knip, and tsc run in parallel with unified output.
2525

2626
## Setup
2727

@@ -34,7 +34,7 @@ pnpm run lint -- src/foo.ts # Target specific files (default: whole proje
3434
pnpm -s run lint -- --format json # Machine-readable report for agents/CI
3535
```
3636

37-
Do not run oxlint, knip, or tsgo directly. Always use `pnpm run lint`.
37+
Do not run oxlint, knip, or tsc directly. Always use `pnpm run lint`.
3838
(`--format json` needs `pnpm -s` to keep pnpm's banner out of stdout.)
3939

4040
See [lifecycle/SKILL.md](../lifecycle/SKILL.md) for where lint fits in the development workflow (step 3: after tests pass, before format). Run `--strict` at PR handoff, not during the TDD loop.
@@ -47,7 +47,7 @@ See [lifecycle/SKILL.md](../lifecycle/SKILL.md) for where lint fits in the devel
4747
|------|---------------|-------------|
4848
| **oxlint** | JS/TS linting via Rust-based engine with Bombshell config | Yes (`--fix`) |
4949
| **knip** | Unused dependencies/devDependencies (always); unused exports, types, files (`--strict` only) | No |
50-
| **tsgo** | TypeScript type errors (`--noEmit`, project mode) | No |
50+
| **tsc** | TypeScript type errors (`--noEmit`, project mode) | No |
5151

5252
Results merge into a single report grouped by file. **Errors print in full;
5353
warnings collapse to a per-rule count** (they never affect the exit code —

‎skills/lint/references/lint-rules.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ These apply in addition to individual rules:
5959
| Tool | Where it runs | What It Catches |
6060
|------|---------------|-----------------|
6161
| **knip** | `bsh lint` | Unused dependencies/devDependencies (always); unused exports/types/files (`--strict` only) |
62-
| **tsgo** | `bsh lint` | TypeScript type errors (`--noEmit`, project mode) |
62+
| **tsc** | `bsh lint` | TypeScript type errors (`--noEmit`, project mode) |
6363
| **publint** | `bsh build` (publish gate) and `bsh publint` | Incorrect `package.json` exports, missing types, invalid fields (strict mode) |
6464

6565
publint does not run in `bsh lint` — its file-existence checks need `dist/`,

‎src/commands/build.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function build(ctx: CommandContext) {
1919
sourcemap: true,
2020
clean: true,
2121
unbundle: !args.bundle,
22-
dts: args.dts === false ? false : { tsgo: true },
22+
dts: args.dts !== false,
2323
minify: args.minify,
2424
});
2525
} catch (error) {

‎src/commands/lint.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,15 @@ export async function runKnip(options?: { strict?: boolean }): Promise<Violation
207207

208208
async function runTypeScript(targets: string[]): Promise<Violation[]> {
209209
// Always run in project mode: passing files on the command line makes
210-
// tsgo skip the tsconfig (TS5112). Explicit targets filter the report
211-
// after the fact instead.
212-
const result = await x(local('tsgo'), ['--noEmit', '--pretty', 'false'], {
210+
// tsc skip the tsconfig (TS5112), so explicit targets
211+
// filter the report after the fact instead.
212+
const result = await x(local('tsc'), ['--noEmit', '--pretty', 'false'], {
213213
throwOnError: false,
214214
});
215215
const output = result.stdout + result.stderr;
216216
if (!output.trim()) {
217217
if (result.exitCode !== 0)
218-
throw new ToolsError(`tsgo exited with code ${result.exitCode}`, 'tsgo-exit');
218+
throw new ToolsError(`tsc exited with code ${result.exitCode}`, 'tsc-exit');
219219
return [];
220220
}
221221

0 commit comments

Comments
 (0)