refactor!: remove never-implemented SPA adapter remnants and other dead code - #234
Merged
Merged
Conversation
…ad code
The `spa` field, `setupBrowser`/`DevframeBrowserContext`, and the
`spa-loader.json` build output described a static SPA adapter that was
never implemented: no adapter ever read `setupBrowser`, and nothing ever
consumed `spa-loader.json`. Remove that whole chain, plus a sweep of
adjacent dead exports found alongside it:
- Drop `DevframeSpaOptions`, `DevframeBrowserContext`, `setupBrowser`,
`DevframeDefinition.spa`, and the `spa-loader.json` writer (with its
now-orphaned `base` build option).
- Remove unused exported API: `DevframeRuntime`,
`DevframeDiagnosticsDefinition`, `src/types/utils.ts`
(`Thenable`/`EntriesToObject`/`PartialWithoutId`, duplicated in
`rpc/types.ts`), and `DEVFRAME_DOCK_IMPORTS_VIRTUAL_ID`, along with the
matching hub type re-exports.
- Drop the dead `CreateH3DevframeHostOptions.app` field and simplify
`capabilities` to `{ dev?, build? }` (the `Record<string, boolean>` arm
was never consumed).
`capabilities.dev` is now actually enforced: `createDevServer` refuses a
definition with `capabilities.dev: false` (new `DF0058`) unless
`{ force: true }` is passed, mirroring `capabilities.build` / `DF0042`.
Update plugins, examples, docs, the devframe skill, and stale comments
(kit/vite-host references, "adapter lands" notes) accordingly, and
regenerate the tsnapi public-API snapshots.
Created with the help of an agent.
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Why
The
spafield,setupBrowser/DevframeBrowserContext, and thespa-loader.jsonbuild output described a static SPA adapter that was never implemented — no adapter ever invokedsetupBrowser, no client ever readspa-loader.json, and there is nosparuntime/subcommand. This removes that whole dead chain and does a sweep of the adjacent dead code found alongside it.What changed
Never-implemented SPA remnants
DevframeDefinition.spa,DevframeSpaOptions,setupBrowser,DevframeBrowserContext, thespa-loader.jsonwriter increateBuild, and its now-orphanedbasebuild option /--baseflag.spa: { loader }from all plugins/examples and thecreateJsonRenderDevframepreset; delete the invalidspa-devframe.tsskill template and the orphanedadapters/spasnapshot.Unused exported API (breaking surface reduction)
DevframeRuntime,DevframeDiagnosticsDefinition,src/types/utils.ts(Thenable/EntriesToObject/PartialWithoutId, duplicated inrpc/types.ts), andDEVFRAME_DOCK_IMPORTS_VIRTUAL_ID, plus the matching@devframes/hubtype re-exports.CreateH3DevframeHostOptions.appfield and simplifycapabilitiesto{ dev?, build? }(theRecord<string, boolean>arm was never consumed).capabilities.devis now actually enforcedcreateDevServerrefuses a definition declaringcapabilities.dev: false(new diagnosticDF0058) unless{ force: true }is passed — the exact mirror ofcapabilities.build/DF0042. Adds the diagnostic, aforceoption, thedocs/errors/DF0058.mdpage, and tests.Docs & stale comments
packages/kit/.../vite-host.ts, "adapter lands" notes). Regenerate the tsnapi public-API snapshots.Breaking changes
Removes exported types/fields from
devframeand@devframes/hub(DevframeRuntime,DevframeDiagnosticsDefinition,Thenable/EntriesToObject/PartialWithoutId,DevframeDefinition.spa,setupBrowser,DevframeBrowserContext,DevframeSpaOptions, thecapabilitiesRecordshape). No in-repo consumer used any of them.capabilities.dev: falsenow throws where it was previously ignored.Verification
pnpm typecheck·pnpm build·pnpm lint(0 errors) ·pnpm knip(clean) · devframe + hub suites (614 passed). tsnapi snapshots regenerated (intentional breaking public-API reduction).This PR was created with the help of an agent.