Commit d1dddbf
authored
fix(ci): switch tsdown config-loader from tsx to unrun (#349)
* fix(ci): pin tsx to ~4.21.0 to avoid 4.22.0 node: builtin regression
tsx 4.22.0 upgraded its bundled esbuild to 0.28, which broke node:*
builtin resolution in tsx's loader hooks — specifiers like
`node:child_process?tsx-namespace=...` are now read as files and fail
with ENOENT. This breaks `packages/core`'s `tsdown --config-loader=tsx`
build because the config's `build:before`/`build:done` hooks dynamically
import `.ts` files that use Node builtins.
Add tsx to overrides so transitive peer-dep resolutions don't pull
4.22.0 back in via vite/vitepress/tsdown. Drop pin when tsx#756 ships.
Refs: privatenumber/tsx#750
* fix(ci): switch tsdown config-loader from tsx to unrun
The previous tsx pin to ~4.21.0 was a false fix. The bug exists in tsx
4.21.x too — it surfaces on Node 24.15.0 (CI's lts/*) but not 24.12.0.
tsx's loader hook appends `?tsx-namespace=<timestamp>` to specifiers and
Node 24.15.0 then attempts a readFileSync on `node:child_process?...`,
failing with ENOENT.
Switch tsdown's --config-loader from `tsx` to `unrun` in core and the
three example plugins. unrun handles the config and the build:before /
build:done hooks' dynamic `.ts` imports without going through tsx's
loader hook.
Revert the catalog tsx pin and override added in the previous commit
since they no longer carry weight.
* fix(ci): revert devframe to 0.2.2 to unblock typecheck
The 0.2.3 bump from `chore: update deps` (d8efd10) made the build fail
first via the tsx loader bug — once that was unblocked by switching to
the unrun config loader, 86 typecheck errors surfaced. Every `declare
module '@vitejs/devtools-kit'` augmentation in kit/core (registering
RPC server functions, client functions, and shared-state keys) stopped
merging into the re-exported `DevToolsRpc*` interfaces, leaving them as
the empty base from devframe/types.
Pin the catalog and submodule back to 0.2.2 to restore the green state
on commit 3085997. The devframe-side cause needs investigating
upstream; revisit when 0.2.4+ ships.1 parent d8efd10 commit d1dddbf
7 files changed
Lines changed: 20 additions & 19 deletions
File tree
- examples
- plugin-a11y-checker
- plugin-file-explorer
- plugin-git-ui
- packages/core
- alias.ts-1
- examples/files-inspector/package.json+1-1
- examples/streaming-chat/package.json+1-1
- package.json+1-1
- packages/devframe/package.json+1-2
- packages/devframe/scripts/check-client-dist.ts-114
- packages/devframe/src/rpc/dump/collect.ts-278
- packages/devframe/src/rpc/dump/index.ts+278-3
- packages/devframe/src/rpc/dump/static.ts+2-3
- packages/devframe/src/rpc/index.ts+3-50
- packages/devframe/tsdown.config.ts+92-133
- packages/nuxt/nuxt.d.ts+1-10
- packages/nuxt/package.json+3-6
- packages/nuxt/src/index.ts+5-9
- packages/nuxt/src/runtime/plugin.client.ts+2-1
- packages/nuxt/tsdown.config.ts+3-20
- tests/__snapshots__/tsnapi/@devframes/nuxt/index.snapshot.d.ts+16-3
- tests/__snapshots__/tsnapi/devframe/rpc.snapshot.js+8-38
- tests/__snapshots__/tsnapi/devframe/rpc/dump.snapshot.d.ts-18
- tests/__snapshots__/tsnapi/devframe/rpc/dump.snapshot.js-11
- tests/__snapshots__/tsnapi/devframe/rpc/transports/ws-client.snapshot.d.ts+3-13
- tsconfig.base.json-3
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
0 commit comments