feat(snapshot): scan bun global packages#128
Merged
fullstackjam merged 1 commit intoJun 6, 2026
mainopenbootdotdev/openboot:mainfrom
feat/snapshot-bun-globalsopenbootdotdev/openboot:feat/snapshot-bun-globalsCopy head branch name to clipboard
Merged
feat(snapshot): scan bun global packages#128fullstackjam merged 1 commit intomainopenbootdotdev/openboot:mainfrom feat/snapshot-bun-globalsopenbootdotdev/openboot:feat/snapshot-bun-globalsCopy head branch name to clipboard
fullstackjam merged 1 commit into
mainopenbootdotdev/openboot:mainfrom
feat/snapshot-bun-globalsopenbootdotdev/openboot:feat/snapshot-bun-globalsCopy head branch name to clipboard
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bun pm ls -gand records installed bun globals inPackageSnapshot.Bun.bunitself, dedupe duplicates. Regex^([@a-zA-Z0-9._/-]+)@[0-9vV]requires<name>@<version>so the path header never matches.PackageSnapshot.UnmarshalJSONaccepts bun across all three accepted JSON shapes: structured object, rich object array, typed{name,type}array.MarshalJSONround-trips bun unchanged.bun pm ls -gfailure orbunnot on PATH → returns empty slice (matchesCaptureNpmpattern, best-effort capture).Cross-repo
snapshot.packages.bunfrom this CLI and buckets bun globals into the persistedtype: 'npm'entries so they install vianpm install -gfrom the same registry. Raw bun array is also preserved in the snapshot blob for future UI work.Test plan
go test ./internal/snapshot/...— pass (newTestParseBunListcovers 6 cases incl. scoped names,bunexclusion, duplicates, malformed lines)go test ./internal/config/... ./internal/ui/tui/... ./internal/cli/... ./internal/installer/...— pass (downstream consumers ofPackageSnapshotstill green)go vet ./...— cleanopenboot snapshot --publishand confirm bun packages round-trip viaopenboot install <slug>on another machine.Out of scope (deferred)
bun install -ginstead of npm. Needs touchingRemoteConfig, install-script generator, alias endpoint, dashboard components, presets, contract schema. Will follow once there's a concrete need for bun-specific install semantics.