ReviewOS

stacks/analyticshq

[chore] package.json build:reset still cd's into the deleted storage/framework

#39
Closed glennmichael123 opened this 9 days ago ·
9 days ago

package.json:22:

"build:reset": "rm -rf node_modules pantry.lock && pantry install && ./buddy generate:types && ./buddy lint:fix && cd storage/framework && bun run build && cd ../../",

storage/framework/ is gitignored and framework-generated, and adopting framework-as-dependencies removed storage/framework/core entirely. The tail of this script assumes a vendored framework that is no longer there.

Same root cause as the one that had CI red — ./buddy pointed at storage/framework/scripts/pantry-install and every buddy-backed script died on a runner. Fixed in the shim; this line was left alone because of the standing "don't touch package.json" rule.

Fix

Drop && cd storage/framework && bun run build && cd ../../ — the framework is a dependency now and builds itself. Verify build:reset still does something useful afterwards, or delete the script if it does not.

Low urgency: nothing in CI runs it, so it fails only for whoever tries it by hand.

9 days ago

Fixed in 3c5b87c.

Measured rather than assumed — the tail did not just do nothing, it failed:

$ bun --filter='./core/*' run build
error: No packages matched the filter
error: script "build" exited with code 1

storage/framework/package.json still carries build: bun --filter='./core/*' run build, and core/ went with the framework-as-dependencies move. So build:reset exited non-zero every time — after having already deleted node_modules and pantry.lock, leaving whoever ran it mid-reset staring at an error about a directory that is supposed to be gone.

Dropped the tail; the remaining wipe → reinstall → generate types → lint fix is still worth having, and all three commands were verified to exist.

Not run end to end: it deletes pantry.lock, which had only just been cleaned up after a bad sync wrote a bun.sh entry that does not resolve on npm. Handing that file straight back to the tool that produced it seemed like the wrong move today.

9 days ago

Fixed in 3c5b87c. Measured rather than assumed — the tail did not just do nothing, it failed: bun --filter='./core/*' run build exits 1 with "No packages matched the filter", because storage/framework/package.json still filters on ./core/* and core/ went with the framework-as-dependencies move. So build:reset exited non-zero every time, after having already deleted node_modules and pantry.lock — leaving whoever ran it mid-reset. Dropped the tail; the remaining wipe → reinstall → generate types → lint fix is still worth having, and all three commands verified to exist. Not run end to end, because it deletes pantry.lock, which had only just been cleaned up after a bad sync wrote a bun.sh entry that does not resolve on npm.

Sign in to comment on this issue.