feat(devframe): bundle deps into utils/* with stable minimal API#331
Merged
feat(devframe): bundle deps into utils/* with stable minimal API#331
Conversation
Bundle open, launch-editor, ohash, immer, ansis, and structured-clone-es
into devframe and expose them through stable utils/* subpaths with
minimal, swap-friendly wrappers. Audit the existing utils to wrap bare
re-exports (human-id, whenexpr) and stop leaking immer's Patch/Objectish
types from shared-state. Drop the now-unused utils/state.ts duplicate.
Migrate all internal call sites to the new util paths and drop the
now-transitive deps from packages/{core,kit,vite,rolldown}.
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Add a dedicated Utilities page listing every `devframe/utils/*` export (colors, open, launch-editor, hash, structured-clone, human-id, nanoid, promise, events, shared-state, streaming-channel, when), wired into the sidebar and the guide landing page. Drop install-separately language from the standalone-cli recipe (the `launch-editor` peer-dep note) and soften the immer references in shared-state.md, since both are now internal implementation details. Add a Bundled utilities section to the devframe agent skill so agents know which helpers ship in-box.
commit: |
# Conflicts: # devframe/packages/devframe/package.json # devframe/packages/devframe/src/adapters/dev.ts # packages/vite/package.json # pnpm-lock.yaml
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
Audit and consolidate the
devframe/utils/*public surface so the underlying libraries can be swapped without user-land breakage:utils/open,utils/launch-editor(accepts an optional preferred-editor arg),utils/hash,utils/colors, andutils/structured-clone.utils/human-idandutils/whennow wrap their re-exports (no more bare passthrough);utils/shared-statestops leaking immer'sPatch/Objectishtypes via a locally-definedSharedStatePatchand aT extends objectconstraint; the unusedutils/state.tsduplicate is deleted.open,launch-editor,ohash,immer,ansis, andstructured-clone-esare now bundled inside devframe (inlinedDependencies+ tsdownonlyBundle); the corresponding deps are dropped frompackages/{core,kit,vite,rolldown}and all internal call sites migrate to the newdevframe/utils/*paths.utils/serve-static(replaced bysirvdirectly in the Vite adapter), Nuxt adapter simplification, and a turbo^builddependency on@vitejs/devtools#buildso devframe builds before core (config-load no longer races the dist).Linked Issues
Additional context
The generated
.d.mtsfor the new and audited utils contain nofrom "immer"/from "whenexpr"/from "ohash"/from "ansis"/from "structured-clone-es"references — the implementations are devframe-internal. Allpnpm build,pnpm typecheck,pnpm test(458 / 49 files), andpnpm lintpass.