perf(deps): shrink the install footprint - #392
Conversation
- add devframe/utils/url, an in-house, browser-safe replacement for the
handful of ufo helpers (joinURL, withBase, withProtocol, slash helpers,
cleanDoubleSlashes); ufo is gone from every package and the catalog
- move the types-only @standard-schema/spec to devDependencies everywhere
and inline its declarations into each package's dts
- bundle the remaining tiny pure deps instead of installing them:
birpc, mrmime, nostics, pathe (devframe); pathe, perfect-debounce,
tinyexec (hub); pathe (agentic, vite kit, service-open, plugin-git);
image-meta, pathe, perfect-debounce, tinyglobby (plugin-assets)
- give the throwing root entries an explicit 'export {}' so dts emit
stops warning about them
devframe's runtime deps shrink to crossws + h3; hub's to destr + h3 +
zigpty; every dist stays self-contained (verified: no bundled-package
import specifiers survive in dist).
◈ PR Lens
Architecture 14 components touched across 8 lanes. Inside the changed components — 2 viewsComponent view — Devframe Core Utilities Internal modules of the devframe package providing zero-dep URL manipulation and debounced storage. Component view — Hub & Consumer Packages Hub orchestration and consumer plugins consuming the shared URL, debounce, and schema helpers. Data flow No data-flow sequence changed in this PR. View
Tip Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds. 🪧 More tips
Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ugin deps Reverts the bundling of nostics + pathe (devframe), pathe + tinyexec (hub), and pathe (agentic, vite kit, service-open) back to real dependencies. Fully reverts the plugin deps inlining: @devframes/plugin-assets (image-meta, pathe, perfect-debounce, tinyglobby) and @devframes/plugin-git (pathe) return to dependencies with no tsdown deps whitelist. Still bundled: birpc + mrmime (devframe), perfect-debounce (hub), and the types-only @standard-schema/spec declarations. json-render keeps nostics as a dts-only inlined type (matches main; no install-footprint impact).
…ounce New browser-safe util re-exports perfect-debounce's debounce (bundled into devframe's dist). @devframes/hub and @devframes/plugin-assets now import it through the devframe peer instead of declaring their own perfect-debounce dependency, so the bytes live once and integrations reuse it with no new install. perfect-debounce is now declared only by devframe.
… devframe peer tsdown's default deps/devDeps split already expresses bundle intent (dependencies external, devDependencies bundled), so the onlyBundle whitelists in devframe/hub/json-render are removed. devframe re-exports the Standard Schema contract type from devframe/utils/simple-schema and adds a DevframeDiagnostics helper type to devframe/utils/nostics. @devframes/json-render now names both through the devframe peer instead of inlining nostics or depending on @standard-schema/spec: its public dts references devframe/utils/simple-schema and devframe/utils/nostics, and @standard-schema/spec is dropped from its package.json. Any integration can reuse both the same way.
What
Trims what a consumer installs when pulling
devframe/@devframes/*packages, without bundling anything that should stay a shared or externally-resolved dependency. Bundle intent is expressed purely throughdependencies(external) vsdevDependencies(bundled) — no tsdownonlyBundlewhitelists.ufois goneNew in-house
devframe/utils/urlmodule (browser-safe, zero-dep) covers the handful of helpers we actually used —joinURL,withBase,withProtocol,withLeadingSlash/withoutLeadingSlash,withTrailingSlash/withoutTrailingSlash,cleanDoubleSlashes— with unit tests and a Utilities Reference entry.ufois removed from every package and the pnpm catalog.Shared types & utils via the
devframepeerIntegrations reuse these through the
devframepeer instead of taking their own dependency:devframe/utils/debounce— devframe bundlesperfect-debounceand re-exports it (browser-safe).@devframes/huband@devframes/plugin-assetsimport it here instead of declaring their ownperfect-debounce.devframe/utils/simple-schemare-exports theStandardSchemaV1contract type.@standard-schema/specstays a types-only devDependency inside devframe (declarations inlined into its.d.mts); consumers name the type through the peer.devframe/utils/nosticsre-exportsnosticsplus aDevframeDiagnosticshelper type.nosticsstays a real (external) devframe dependency — not inlined — so integrations reference diagnostics types through the peer.@devframes/json-rendernow names bothStandardSchemaV1andDevframeDiagnosticsthrough devframe, so its public.d.mtsreferencesdevframe/utils/simple-schema/devframe/utils/nostics(no inlinednostics, no@standard-schema/spec), and@standard-schema/specis dropped from itspackage.json.What's bundled vs external
devframebirpc,mrmime,perfect-debounce(also exposed asdevframe/utils/debounce),@standard-schema/spec(types only)nostics,pathe,tinyexec, andh3are not bundled — they stay real, externally-resolved dependencies — and the plugins (@devframes/plugin-assets,@devframes/plugin-git) keep all of their deps external.Runtime
dependenciesafter this change:devframecrossws,h3,nostics,pathe@devframes/hubdestr,h3,pathe,tinyexec,zigpty@devframes/agenticclient/server),h3,pathe@devframes/json-render@json-render/core,zodIncidental
The throwing root entries (
@devframes/agentic,@devframes/vite,@devframes/next,@devframes/nuxt) get an explicitexport {}so the dts emitter stops warning about script-mode files.mllyis dropped from@devframes/hub(unused after the 0.10 API removal onmain).Verification
pnpm lint && pnpm knip && pnpm typecheck && pnpm buildall pass (build 28/28); full vitest suite (1547 tests) passes, including the tsnapi API snapshots.pnpm test:runtimesmoke passes.dependenciesappear only as external import specifiers,devDependenciesare bundled with no specifier left behind;devframe/utils/{debounce,simple-schema,nostics}are bundled once in devframe and referenced externally by hub/json-render/plugin-assets.Created with the help of an agent.