diff --git a/.changeset/devtools-dependency-ranges.md b/.changeset/devtools-dependency-ranges.md new file mode 100644 index 0000000..b4aed11 --- /dev/null +++ b/.changeset/devtools-dependency-ranges.md @@ -0,0 +1,7 @@ +--- +"@typeonce/effect-machine-devtools": patch +--- + +Install the devtools CLI without pinning a second exact TypeScript or Vite. + +`@typeonce/effect-machine-devtools` now depends on `typescript` `>=5.9.0 <7.0.0` and `vite` `^8.1.5` instead of exact versions, so a package manager can reuse compatible versions your project already has. No setup changes are required: the CLI still works when your project uses neither, or uses TypeScript 7. diff --git a/packages/devtools/README.md b/packages/devtools/README.md index 68dd49b..9d8a760 100644 --- a/packages/devtools/README.md +++ b/packages/devtools/README.md @@ -17,6 +17,8 @@ When pinning a release instead of using `latest`, use the same explicit version The current release requires Node.js 22.19 or newer and stable Effect `^4.0.0`. +The CLI brings its own TypeScript parser and Vite server, so a project does not need to install either. They are regular dependencies with ranges (`typescript` `>=5.9.0 <7.0.0`, `vite` `^8.1.5`), so a package manager can reuse a compatible version the project already has. The project can use any TypeScript version, including TypeScript 7. Devtools only parses source files with the JavaScript compiler API, which TypeScript 7 does not ship, so it keeps its own 5.9–6.x copy in that case. + ## Run the visualizer Start it from the project that contains the machines: diff --git a/packages/devtools/package.json b/packages/devtools/package.json index fbcef5e..3eb0752 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -38,8 +38,8 @@ "@typeonce/effect-machine": "workspace:^", "chokidar": "4.0.3", "elkjs": "0.12.0", - "typescript": "6.0.3", - "vite": "8.1.5" + "typescript": ">=5.9.0 <7.0.0", + "vite": "^8.1.5" }, "peerDependencies": { "effect": "^4.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33ecbac..3c19022 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -74,10 +74,10 @@ importers: specifier: 0.12.0 version: 0.12.0 typescript: - specifier: 6.0.3 + specifier: '>=5.9.0 <7.0.0' version: 6.0.3 vite: - specifier: 8.1.5 + specifier: ^8.1.5 version: 8.1.5(@types/node@25.7.0)(esbuild@0.27.7)(tsx@4.21.0)(yaml@2.9.0) devDependencies: '@types/node':