Skip to content

refactor(devframe): namespace adapters and invert client dep from kit#299

Merged
antfu merged 2 commits intoantfu/devframefrom
antfu/devframe-adapters
Apr 23, 2026
Merged

refactor(devframe): namespace adapters and invert client dep from kit#299
antfu merged 2 commits intoantfu/devframefrom
antfu/devframe-adapters

Conversation

@antfu
Copy link
Copy Markdown
Member

@antfu antfu commented Apr 23, 2026

Description

Namespace the six devframe adapters under devframe/adapters/* and move the framework-neutral RPC client surface out of @vitejs/devtools-kit/client into devframe/client, so devframe stops depending on any @vitejs/* package and is positioned to be extracted into its own repo.

  • Public subpath rename (no aliases): devframe/{cli,build,spa,vite,kit,embedded}devframe/adapters/{…}.
  • rpc, rpc-shared-state, rpc-static, rpc-ws, static-rpc, docks, context (+ test) move from packages/kit/src/client/ to packages/devframe/src/client/; connectDevtool stabilises as the public entry (alias of getDevToolsRpcClient). Kit's @vitejs/devtools-kit/client becomes export * from 'devframe/client' + the kit-only remote and client-script helpers.
  • AGENTS.md gets a new Dep Boundary section spelling out the rule; adapter table in skills/devframe/SKILL.md and the counter example import are updated; tsnapi snapshots regenerated under test/__snapshots__/tsnapi/devframe/adapters/*.

Linked Issues

Additional context

Verified with pnpm lint, pnpm typecheck, pnpm test, pnpm build, and runtime import smoke-checks for devframe/adapters/cli + devframe/client.

Move the six adapters (cli/build/spa/vite/kit/embedded) into
`devframe/adapters/*` so they're clearly grouped and no longer share the
top-level subpath namespace. Relocate the framework-neutral RPC client
surface from `@vitejs/devtools-kit/client` into `devframe/client`,
including `rpc`, `rpc-shared-state`, `rpc-static`, `rpc-ws`, `static-rpc`,
`docks`, and `context`. Kit now re-exports `devframe/client` plus its
kit-only `remote` + `client-script` helpers, establishing that devframe
must never depend on vite or any `@vitejs/*` package. Add a Dep Boundary
section to AGENTS.md documenting the rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codeinputmachine
Copy link
Copy Markdown

Hey @antfu, Code Input detected this PR has a merge conflict. The conflicts of this PR can be resolved with a semantic merge driver. Code Input can do that automatically: https://codeinput.com/r/3X89enMrIDY Let me know if you need more help with this conflict or how Code Input works.

…ame-adapters

# Conflicts:
#	packages/devframe/package.json
#	packages/devframe/tsdown.config.ts
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 23, 2026

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools@299

devframe

npm i https://pkg.pr.new/vitejs/devtools/devframe@299

@vitejs/devtools-kit

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-kit@299

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-rolldown@299

@vitejs/devtools-self-inspect

npm i https://pkg.pr.new/vitejs/devtools/@vitejs/devtools-self-inspect@299

commit: bf7b5a1

@antfu antfu merged commit 7e51b81 into antfu/devframe Apr 23, 2026
3 checks passed
@antfu antfu deleted the antfu/devframe-adapters branch April 23, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants