You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#692 changed the scaffold to EXACT-pin @webjsdev/* and drizzle (drizzle-orm / drizzle-kit / pg) in generated apps. The stated reason (see packages/cli/lib/create.js:85-98, SCAFFOLD_DEP_VERSIONS) is that under Bun zero-install a ^ range resolved to absolute LATEST (ignoring the range), so an exact pin was the only way to get a predictable version and keep npm + bun identical.
PR #698 removes that reason: Bun zero-install now resolves an inline range the standard way (zod@^3.20.0 picks the highest 3.x), because webjs forwards the declared range into the inline specifier. So the scaffold can go back to idiomatic ^ ranges, which auto-pick patch/minor updates the way an npm user expects.
Design / approach
Once #698 is merged, revert the scaffold to ^ ranges for @webjsdev/* and the drizzle/pg deps. Two caveats to verify, not assume:
Drizzle "wrong major" concern (Make npm and bun scaffolds resolve consistent package versions (#682 follow-up) #692). drizzle's npm latest tag is a 0.x line while the scaffold targets the 1.0.0-rc.x relations-v2 line. Confirm that a RANGE like ^1.0.0-rc.3 resolves to the 1.x RC under Bun zero-install (a range is resolved by semver, not by the latest dist-tag, so it should pick the highest 1.x-rc, NOT the 0.x latest). If caret-with-prerelease behaves unexpectedly, use a comparator range (>=1.0.0-rc.3 <2) or keep drizzle exact while ranging the rest.
Where: packages/cli/lib/create.js (SCAFFOLD_DEP_VERSIONS at L94-98, and the @webjsdev/* version resolution around L60-95 that fs-reads each pkg's installed version); packages/cli/templates/ generated package.json shapes.
Tests: the test/scaffolds/ suite (a freshly scaffolded app passes webjs check + webjs test); add a Bun zero-install assertion that a scaffolded app resolves the intended major/minor for drizzle.
Acceptance criteria
Scaffold generates ^ ranges for @webjsdev/* and drizzle/pg (or a documented exception for drizzle if the RC range misbehaves).
A scaffolded Bun zero-install app resolves the correct drizzle 1.x-rc major (verified, not assumed).
Determinism decision recorded (commit bun.lock vs accept drift).
Problem
#692 changed the scaffold to EXACT-pin
@webjsdev/*and drizzle (drizzle-orm/drizzle-kit/pg) in generated apps. The stated reason (seepackages/cli/lib/create.js:85-98,SCAFFOLD_DEP_VERSIONS) is that under Bun zero-install a^range resolved to absolute LATEST (ignoring the range), so an exact pin was the only way to get a predictable version and keep npm + bun identical.PR #698 removes that reason: Bun zero-install now resolves an inline range the standard way (
zod@^3.20.0picks the highest3.x), because webjs forwards the declared range into the inline specifier. So the scaffold can go back to idiomatic^ranges, which auto-pick patch/minor updates the way an npm user expects.Design / approach
Once #698 is merged, revert the scaffold to
^ranges for@webjsdev/*and the drizzle/pg deps. Two caveats to verify, not assume:latesttag is a 0.x line while the scaffold targets the1.0.0-rc.xrelations-v2 line. Confirm that a RANGE like^1.0.0-rc.3resolves to the 1.x RC under Bun zero-install (a range is resolved by semver, not by thelatestdist-tag, so it should pick the highest 1.x-rc, NOT the 0.x latest). If caret-with-prerelease behaves unexpectedly, use a comparator range (>=1.0.0-rc.3 <2) or keep drizzle exact while ranging the rest.bun.lock(its exact pin then wins via the feat: forward inline-safe ranges in the bun zero-install pin rewrite #698 precedence) so a fresh app is still reproducible, or accept range drift as normal npm semantics.Implementation notes (for the implementing agent)
packages/cli/lib/create.js(SCAFFOLD_DEP_VERSIONSat L94-98, and the@webjsdev/*version resolution around L60-95 that fs-reads each pkg's installed version);packages/cli/templates/generatedpackage.jsonshapes.create.jsand the runtime docs (agent-docs/runtime.md,docs/app/docs/runtime/page.ts, root + scaffoldAGENTS.md) which currently say the scaffold pins exact for npm/bun consistency.test/scaffolds/suite (a freshly scaffolded app passeswebjs check+webjs test); add a Bun zero-install assertion that a scaffolded app resolves the intended major/minor for drizzle.Acceptance criteria
^ranges for@webjsdev/*and drizzle/pg (or a documented exception for drizzle if the RC range misbehaves).Depends on #698. Relates to #692, #697.