Skip to content

Commit 697c6cb

Browse files
Let devtools reuse compatible TypeScript and Vite installs (#254)
The devtools CLI pinned typescript 6.0.3 and vite 8.1.5 exactly, so every consumer installed a second copy at exactly those versions. Depend on typescript >=5.9.0 <7.0.0 and vite ^8.1.5 instead. Both stay regular dependencies: the CLI must work with zero setup, and TypeScript 7 does not ship the JavaScript compiler API that project inspection parses with. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a5e80b3 commit 697c6cb

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@typeonce/effect-machine-devtools": patch
3+
---
4+
5+
Install the devtools CLI without pinning a second exact TypeScript or Vite.
6+
7+
`@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.

‎packages/devtools/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ When pinning a release instead of using `latest`, use the same explicit version
1717

1818
The current release requires Node.js 22.19 or newer and stable Effect `^4.0.0`.
1919

20+
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.
21+
2022
## Run the visualizer
2123

2224
Start it from the project that contains the machines:

‎packages/devtools/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"@typeonce/effect-machine": "workspace:^",
3939
"chokidar": "4.0.3",
4040
"elkjs": "0.12.0",
41-
"typescript": "6.0.3",
42-
"vite": "8.1.5"
41+
"typescript": ">=5.9.0 <7.0.0",
42+
"vite": "^8.1.5"
4343
},
4444
"peerDependencies": {
4545
"effect": "^4.0.0"

‎pnpm-lock.yaml‎

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

0 commit comments

Comments
 (0)