fix(hub): restore ctx.createJsonRenderer as a working 0.7 deprecation, remove in 0.8#125
Merged
Merged
Conversation
…, remove in 0.8 0.7 hard-removed ctx.createJsonRenderer instead of deprecating it, breaking existing call sites without a migration window. Restore it against hub's own pre-0.7 shared-state implementation (not @devframes/json-render, which would create a circular workspace dependency since json-render already depends on hub) so it keeps working through the 0.7 series. Mark it, and the related defineJsonRenderSpec/JsonRenderSpec/JsonRenderElement/JsonRenderer aliases, as removed in 0.8 instead of an unspecified future release.
✅ 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
0.7 removed
ctx.createJsonRendereroutright (docs/guide/migration-0.7.md), while #122 only restoreddefineJsonRenderSpecand the associated types as deprecated compatibility shims —ctx.createJsonRendereritself was left broken with no deprecation window. A 0.7 minor shouldn't hard-break a public method; that's what 0.8 is for.What
ctx.createJsonRendereronDevframeHubContext, reimplemented against its exact pre-0.7 logic (auto-incrementingdevframe:json-render:<n>shared-state key,updateSpec/updateState/_stateKey).context.rpc.sharedStaterather than delegating to@devframes/json-render'screateJsonRenderView, so@devframes/hubstill carries zero dependency — direct or peer — on that opt-in package. (@devframes/json-renderalready peer-depends on@devframes/hubfor its dock-type augmentation; wiring the reverse direction would create a real circular workspace build dependency, sinceturbo.jsonalready orders@devframes/json-render#buildafter@devframes/hub#build.)context.ts,define.ts,types/json-render.ts,types/docks.ts, and the migration guide: everything in this compatibility surface (ctx.createJsonRenderer,defineJsonRenderSpec,JsonRenderSpec/JsonRenderElement/JsonRenderer) is now consistently documented as "removed in 0.8" instead of an unspecified future release.context.test.tsfor the spec/state round-trip and per-renderer state-key uniqueness.Verified
pnpm --filter @devframes/hub typecheck/lintcleanpnpm buildfordevframe,@devframes/hub,@devframes/json-render,@devframes/json-render-ui— no circular-dependency issues@devframes/hubvitest suite (85 tests) passes@devframes/hubtsnapi export snapshots (10 tests) pass unchangedCreated with the help of an agent.