Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/itchy-trams-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bomb.sh/tools": minor
---

Update to TypeScript v7 stable. Also updated tsdown to the latest for compatibility with `typescript@7`.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you'd like to use this package for your own projects, please consider forking
- `bsh build` command, using [`tsdown`](https://tsdown.dev/) (ESM, unbundled, types by default) with [`publint`](https://publint.dev/) as a publish gate
- `bsh test` command, using [`vitest`](https://vitest.dev/)
- `bsh format` command, using [`oxfmt`](https://oxc.rs/docs/guide/usage/formatter)
- `bsh lint` command, using [`oxlint`](https://oxc.rs/docs/guide/usage/linter), [`knip`](https://knip.dev), [`tsgo`](https://npmx.dev/@typescript/native-preview)
- `bsh lint` command, using [`oxlint`](https://oxc.rs/docs/guide/usage/linter), [`knip`](https://knip.dev), and TypeScript
- `bsh publint` command, using [`publint`](https://publint.dev/) (also runs automatically as a publish gate in `bsh build`)
- `bsh sync` command, which links our shared [agent skills](#agent-skills) into your project
- shared `tsconfig.json` file
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@
"@bomb.sh/args": "^0.3.1",
"@humanfs/node": "^0.16.7",
"@humanfs/types": "^0.15.0",
"@typescript/native-preview": "7.0.0-dev.20260623.1",
"knip": "^6.9.0",
"oxfmt": "^0.47.0",
"oxlint": "^1.62.0",
"publint": "^0.3.18",
"tinyexec": "^1.1.1",
"tsdown": "^0.22.3",
"tsdown": "^0.23.1",
"typescript": "^7.0.2",
"vitest": "^5.0.5",
"vitest-ansi-serializer": "^0.3.1",
"yaml": "^2.9.1"
},
"devDependencies": {
"@changesets/cli": "^2.30.0",
"@types/node": "^22.19.15"
"@types/node": "^22.20.5"
},
"volta": {
"node": "22.14.0"
"node": "22.23.4"
},
"packageManager": "pnpm@10.34.3",
"pnpm": {}
Expand Down
787 changes: 475 additions & 312 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion skills/build/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pnpm run build
- **Sourcemaps:** enabled
- **Clean:** removes dist/ before building
- **Unbundled** by default (each source file produces one output file)
- **Types:** `.d.mts` declarations generated by default (via tsgo)
- **Types:** `.d.mts` declarations generated by default
- **Entry:** defaults to `src/**/*.ts`
- **Config:** explicitly disabled (`config: false`) — tsdown.config.ts is ignored

Expand Down
8 changes: 4 additions & 4 deletions skills/lifecycle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ All scripts proxy to `bsh <command>` via `package.json`. Never bypass them.
| `pnpm run build` | `bsh build` | Build with tsdown (ESM, sourcemaps, clean) |
| `pnpm run dev` | `bsh dev` | Watch mode with native Node TS transforms |
| `pnpm run format` | `bsh format` | Format with oxfmt |
| `pnpm run lint` | `bsh lint` | Parallel: oxlint + knip + tsgo |
| `pnpm run lint` | `bsh lint` | Parallel: oxlint + knip + tsc |
| `pnpm run test` | `bsh test` | Run tests with vitest (single run) |
| `pnpm run init` | `bsh init` | Scaffold new project from template |

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

### CRITICAL: Running underlying tools directly

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

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

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

### HIGH: Running tsc directly for type checking

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

### HIGH: Full autopilot PR creation

Expand Down
8 changes: 4 additions & 4 deletions skills/lint/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: lint
description: >
Multi-tool linting pipeline: oxlint, knip, and tsgo run in parallel via
Multi-tool linting pipeline: oxlint, knip, and tsc run in parallel via
pnpm run lint (publint gates pnpm run build instead). Covers Bombshell
conventions: URL over node:path, max 2 params with options bag, named
exports only, import type, prefer node builtins, no console.log, no
Expand All @@ -21,7 +21,7 @@ metadata:

# Lint

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

## Setup

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

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

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.
Expand All @@ -47,7 +47,7 @@ See [lifecycle/SKILL.md](../lifecycle/SKILL.md) for where lint fits in the devel
|------|---------------|-------------|
| **oxlint** | JS/TS linting via Rust-based engine with Bombshell config | Yes (`--fix`) |
| **knip** | Unused dependencies/devDependencies (always); unused exports, types, files (`--strict` only) | No |
| **tsgo** | TypeScript type errors (`--noEmit`, project mode) | No |
| **tsc** | TypeScript type errors (`--noEmit`, project mode) | No |

Results merge into a single report grouped by file. **Errors print in full;
warnings collapse to a per-rule count** (they never affect the exit code —
Expand Down
2 changes: 1 addition & 1 deletion skills/lint/references/lint-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ These apply in addition to individual rules:
| Tool | Where it runs | What It Catches |
|------|---------------|-----------------|
| **knip** | `bsh lint` | Unused dependencies/devDependencies (always); unused exports/types/files (`--strict` only) |
| **tsgo** | `bsh lint` | TypeScript type errors (`--noEmit`, project mode) |
| **tsc** | `bsh lint` | TypeScript type errors (`--noEmit`, project mode) |
| **publint** | `bsh build` (publish gate) and `bsh publint` | Incorrect `package.json` exports, missing types, invalid fields (strict mode) |

publint does not run in `bsh lint` — its file-existence checks need `dist/`,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function build(ctx: CommandContext) {
sourcemap: true,
clean: true,
unbundle: !args.bundle,
dts: args.dts === false ? false : { tsgo: true },
dts: args.dts !== false,
minify: args.minify,
});
} catch (error) {
Expand Down
8 changes: 4 additions & 4 deletions src/commands/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ export async function runKnip(options?: { strict?: boolean }): Promise<Violation

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

Expand Down
Loading