refactor(devframe)!: relocate json-render from devframe to devtools-kit#327
Merged
refactor(devframe)!: relocate json-render from devframe to devtools-kit#327
Conversation
JSON-render is a hub-layer concern: the spec is rendered by the
Vite DevTools component catalog, the renderer handle is only
consumable via a `DevToolsViewJsonRender` dock entry (kit type),
and every example pairs `createJsonRenderer` with
`ctx.docks.register({ type: 'json-render', ui })`. Move types,
factory, and `defineJsonRenderSpec` to `@vitejs/devtools-kit` so
the API lives in the package that owns the runtime contract;
`DevToolsNodeContext` is now framework-neutral as intended.
BREAKING: `ctx.createJsonRenderer` is no longer on
`DevToolsNodeContext`; use `KitNodeContext` (passed to
`Plugin.devtools.setup` and `createPluginFromDevframe`'s
`options.setup`). All in-repo consumers already run under kit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
JSON-render is a hub-layer concern: the spec is rendered by the Vite DevTools component catalog, the renderer handle is only consumable via a
DevToolsViewJsonRenderdock entry (a kit type), and every example pairscreateJsonRendererwithctx.docks.register({ type: 'json-render', ui }). This PR moves the types, thecreateJsonRendererfactory, anddefineJsonRenderSpecfromdevframeto@vitejs/devtools-kit, restoringDevToolsNodeContextto a framework-neutral, single-integration surface as documented inCLAUDE.md§"Dep Boundary".BREAKING:
ctx.createJsonRendereris no longer onDevToolsNodeContext. Consumers must useKitNodeContext(the type passed toPlugin.devtools.setupand tocreatePluginFromDevframe'soptions.setup). All in-repo consumers already run under kit.Linked Issues
Additional context
The shared-state key stays
devframe:json-render:${counter}for consistency with other kit-owned keys (devframe:docks,devframe:commands). Verified withpnpm lint && pnpm test && pnpm typecheck && pnpm build— 450/450 tests pass; tsnapi snapshots regenerated to drop the four names from devframe's public surface (kit's surface is unchanged, the names just resolve locally now).