Files
redwoodjs__local-ci/packages/ts-runner/package.json
Peter Pistorius ab075d94be chore: require Node 24 and drop tsx (#351)
* chore: require Node 24 and drop tsx

Node 24 ships native TypeScript stripping as a stable feature. We no
longer need tsx to execute .ts files in development scripts.

Changes:

- `engines.node` bumped from `>=22` to `>=24` in each package.
- `tsx` removed from every workspace's devDependencies.
- Each `tsx foo.ts` invocation in package scripts becomes `node foo.ts`.
  Includes `scripts/agent-ci-dev.sh` (the dev wrapper) and the demo
  package.
- tsconfigs gain `allowImportingTsExtensions`, `rewriteRelativeImportExtensions`,
  and `verbatimModuleSyntax` so source uses `.ts` extensions while tsc
  still emits `.js` paths in dist.
- All relative imports rewritten from `from "./foo.js"` to `from "./foo.ts"`
  across 72 source files. Dynamic imports updated too.
- Type-only imports (`Job`, `Polka`, MessageResponse, …) converted to
  `import type` to satisfy `verbatimModuleSyntax`.
- The json-loader hook registration in workflow-parser.ts picks `.ts`
  when the source file exists (dev) and `.js` otherwise (compiled dist).
- Root `package.json` adds `"type": "module"` (no existing .js files
  affected) and `yaml` as a devDep (already used by scripts/diff-parse.ts;
  previously hoisted through cli's deps).
- `tests.yml` CI bumps from Node 22 to Node 24. Smoke fixtures that set
  `node-version: 22` are left alone — they exercise `actions/setup-node`
  with various versions deliberately.

Verified:
- pnpm check: clean
- Node 24 dev run: `node packages/cli/src/cli.ts --help` works
- Full smoke suite (`pnpm agent-ci-dev run --all`): 45/45 jobs pass

* fix(shutdown.test): use `node --input-type=module` instead of `npx tsx`

The shutdown integration test spawns a fresh process to sidestep
vitest's mock system. It was using `npx tsx`, but `tsx` is no longer
a dependency. Node 24 reads TypeScript files natively, so we ask Node
directly via `--input-type=module`.
2026-05-11 18:38:37 +02:00

43 lines
823 B
JSON

{
"name": "@redwoodjs/ts-runner",
"version": "0.7.0",
"private": true,
"description": "TypeScript GitHub Actions step runner — no Docker, no .NET binary.",
"keywords": [
"ci",
"github-actions",
"local-runner",
"runner",
"typescript"
],
"license": "FSL-1.1-MIT",
"author": "",
"repository": {
"type": "git",
"url": "https://github.com/redwoodjs/agent-ci.git",
"directory": "packages/ts-runner"
},
"bin": {
"ts-runner": "./dist/cli.js"
},
"files": [
"dist"
],
"type": "module",
"main": "./dist/index.js",
"exports": {
".": "./dist/index.js"
},
"scripts": {
"build": "tsgo",
"typecheck": "tsgo",
"ts-runner": "node src/cli.ts"
},
"devDependencies": {
"@types/node": "^22.10.2"
},
"engines": {
"node": ">=24"
}
}