Context
Stacks is moving from a vendored framework (storage/framework/ consumed as workspace packages) to consuming it as published @stacksjs/* npm packages (the newer workflow; also enables buddy extension:* browser-extension builds).
Unlike the sibling apps bughq / ghostanalytics - which are already transitional (framework in node_modules, storage/framework/ excluded from tsconfig, near drop-in removal) - bench-review is on the pure original vendored model, so this is a larger, higher-risk migration.
Current state (assessed 2026-07-20)
- Not currently installed: no
node_modules(onlybun.lock+pantry/). There is no running baseline to diff a migration against. - Framework = vendored workspace:
workspaces: ['storage/framework/**', ...],stacks: "workspace:*", andstorage/framework/is ~101M (93 core packages +defaults/). - tsconfig inherits the vendored framework:
"extends": "./storage/framework/core/tsconfig.json"- the app's entire TS/build setup comes from the vendored tree. - No
config/crosswind.ts- so no crosswind content-glob repoint (unlike the sibling apps). - Direct deps:
stacks@workspace:*,@stacksjs/components@^0.2.82,@stacksjs/stx@^0.2.82,@stacksjs/ts-i18n@0.1.8. App version0.1.0.
Migration surface (bigger than the sibling apps)
package.json-stacks: "workspace:*"→ a published version (e.g.^0.70.77, matching bughq/ghostanalytics); remove theworkspaces: ['storage/framework/**', ...]block so the framework is no longer workspace-linked.tsconfig.json- replaceextends: "./storage/framework/core/tsconfig.json"with a self-contained config that resolves@stacksjs/*fromnode_modulesand excludesstorage/framework/(mirror bughq's / ghostanalytics's target tsconfig).bun install- pullstacks+@stacksjs/*from npm intonode_modules(currently none).- Delete
storage/framework/(~101M) after verification. Keepstorage/{logs,keys,app,cloud}(runtime data / deploy state).
Plan
- Establish a baseline first.
bun installon currentmain, confirmbuddy devruns (+/stacks-browseQA). Without a working "before", a migration regression is indistinguishable from a pre-existing break. (node_modules is currently absent.) - Branch
chore/adopt-framework-deps. package.json:stacks→ published version; remove thestorage/framework/**workspaces.tsconfig.json: swap the vendoredextendsfor a self-contained config (copy the sibling apps').bun install→ confirmnode_modules/@stacksjs/*+stackspopulate.mv storage/framework storage/framework.bak(do not delete yet).- Verify end-to-end:
buddy dev+/stacks-browsebrowser QA on the dashboard/UI,buddy build,buddy lint,buddy test. - Green →
rm -rf storage/framework.bak; clean up any stray vendored-path references. - Commit + PR.
Risks / watch-outs (higher than the sibling apps)
- No current baseline (uninstalled) - do step 0 first.
- Version compatibility: the app (v0.1.0) was built against the vendored framework; the published
stacks@0.70.xmeta-package may differ. Expect to reconcile API/version drift - this is not a near-drop-in like the sibling apps. - tsconfig replacement is load-bearing: the whole TS/build setup is inherited from the vendored tree; the self-contained replacement must be correct or the build breaks.
- Verify in the running app with
/stacks-browse, not isolatedrenderView(a recent framework sidebar change passed a headless render but was broken live - resolution + no hydration). - Sequence: pilot the near-drop-in apps (bughq/ghostanalytics) first; do bench-review last since it's the riskiest.
Rollback
Nothing destructive until step 7 - mv storage/framework.bak storage/framework + git checkout restores everything.