Skip to content

feat(devframe): bundle deps into utils/* with stable minimal API - #331

Merged
antfu merged 3 commits into
mainfrom
antfu/utils-colors
May 11, 2026
Merged

feat(devframe): bundle deps into utils/* with stable minimal API#331
antfu merged 3 commits into
mainfrom
antfu/utils-colors

Conversation

@antfu

@antfu antfu commented May 11, 2026

Copy link
Copy Markdown
Member

Description

Audit and consolidate the devframe/utils/* public surface so the underlying libraries can be swapped without user-land breakage:

  • New utils that bundle their dependencies and expose minimal wrappers: utils/open, utils/launch-editor (accepts an optional preferred-editor arg), utils/hash, utils/colors, and utils/structured-clone.
  • Existing utils audited: utils/human-id and utils/when now wrap their re-exports (no more bare passthrough); utils/shared-state stops leaking immer's Patch/Objectish types via a locally-defined SharedStatePatch and a T extends object constraint; the unused utils/state.ts duplicate is deleted.
  • open, launch-editor, ohash, immer, ansis, and structured-clone-es are now bundled inside devframe (