Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(snapshot): accept bun globals from CLI publish payload#14

Merged
fullstackjam merged 1 commit into
mainopenbootdotdev/openboot.dev:mainfrom
feat/snapshot-bun-globalsopenbootdotdev/openboot.dev:feat/snapshot-bun-globalsCopy head branch name to clipboard
Jun 6, 2026
Merged

feat(snapshot): accept bun globals from CLI publish payload#14
fullstackjam merged 1 commit into
mainopenbootdotdev/openboot.dev:mainfrom
feat/snapshot-bun-globalsopenbootdotdev/openboot.dev:feat/snapshot-bun-globalsCopy head branch name to clipboard

Conversation

@fullstackjam
Copy link
Copy Markdown
Contributor

Summary

  • Accept snapshot.packages.bun from openboot snapshot --publish uploads.
  • Bucket bun globals as type: 'npm' in the persisted packages array. The downstream alias/install endpoints only special-case npm and cask — every other type falls into the brew formulae array, which would misroute bun globals to brew install. Bucketing as npm lets them install via npm install -g from the same registry.
  • Dedupe against existing npm entries so a package present in both lists is stored once.
  • Raw snapshot.packages.bun array is preserved in the snapshot blob for future UI work that wants to render bun separately.

Cross-repo

  • Paired with [openbootdotdev/openboot]: scans bun globals in internal/snapshot/CaptureBun() and ships them in Packages.Bun. Merge this PR first — once the CLI starts sending the field, the server needs to know how to handle it (otherwise bun globals get dropped from the typed packages array).

Test plan

  • npm test — 181/181 pass (validation + from-snapshot path)
  • npm run check — 0 errors
  • After deploy: publish a snapshot containing a bun global from a real CLI, then GET /<user>/<slug>/config and verify the bun package appears as a type: 'npm' entry in the returned packages array.

- Read `snapshot.packages.bun` from the upload body
- Bucket bun globals as `type: 'npm'` in the typed packages array so
  the downstream alias/install endpoints (which only special-case
  `npm` and `cask`) install them via `npm install -g` from the same
  registry, rather than misrouting them to `brew install`
- Dedupe against existing npm entries
- Bun provenance preserved in the raw `snapshot.packages.bun` blob
  for future UI work
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullstackjam fullstackjam merged commit 07d5b23 into main Jun 6, 2026
7 checks passed
@fullstackjam fullstackjam deleted the feat/snapshot-bun-globals branch June 6, 2026 08:29
fullstackjam added a commit to openbootdotdev/openboot that referenced this pull request Jun 6, 2026
Add a new capture step "Bun Global Packages" that runs `bun pm ls -g`
and records installed bun globals in PackageSnapshot.Bun. The parser
strips tree-drawing characters and ignores the path header line; bun
itself and duplicates are filtered out.

PackageSnapshot.UnmarshalJSON handles bun across all three accepted
JSON shapes (structured object, rich object array, typed array), so
snapshots produced or consumed by other tools round-trip cleanly.

The server side (openbootdotdev/openboot.dev#14) accepts the new
`packages.bun` field and buckets bun globals into the existing npm
slot so the alias install endpoint installs them via `npm install -g`
from the same registry — no downstream changes required yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.