Skip to content

docs: correct #675 zero-install caveat (Bun runs latest, ignores package.json + bun.lock) #683

Description

@vivek7405

Problem

The #675 docs frame the Bun zero-install reproducibility tradeoff as range-level ("resolves on demand", "dev resolves on demand vs a pinned prod image"). That understates it. Verified on a fresh cache: bun --bun auto-install (the exact path bun run dev / start take via the webjs-bun.mjs bootstrap, with no node_modules) IGNORES both the package.json version AND a committed bun.lock, and fetches latest for any bare import not physically in node_modules.

Proof: a package.json pinning zod EXACTLY to 3.22.4 ran zod 4.4.3; keeping a bun.lock that pinned 3.22.4 (with node_modules deleted) STILL ran 4.4.3. Only bun install (which materializes node_modules) honors the manifest/lockfile. So a zero-install Bun app runs UNPINNED LATEST deps, which can silently pull a breaking major. The current docs do not say this; they imply the app's declared versions are used.

Design / approach

Correct every #675 doc surface to state the accurate caveat plainly, framed as a real limitation, not a reproducibility nicety: "Zero-install (bun run dev / start with no node_modules) resolves each dependency to its LATEST version, ignoring the package.json range and any bun.lock. Run bun install to pin: it materializes node_modules from the manifest/lockfile, which the auto-install run path then uses." Keep the recommendation: run bun install when you need pinned/reproducible versions (and for editor types).

Implementation notes (for the implementing agent)

Acceptance criteria

  • The runtime page, getting-started, agent-docs/runtime.md, and deployment all accurately state that Bun zero-install runs LATEST deps (ignoring package.json + bun.lock).
  • They state bun install is how to pin (it materializes node_modules, which the run path then uses).
  • No surface implies the declared versions are honored under zero-install.
  • Edited pages boot 200.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions