feat(provider): add bun.lock support#519
Merged
Merged
Conversation
Reviewer's GuideAdds a new Javascript_bun provider that parses bun.lock directly using jsonc-parser, wires it into provider selection and workspace detection, exposes the JS base provider lockfile-creation hook for reuse, and adds bun-specific fixtures and tests for isSupported, SBOM generation, and workspace behavior. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
Javascript_bun._buildDependencyTree, theparsecall onbun.lockassumes valid JSONC; consider handling parse errors or unexpectedlockDatashapes to avoid uncaught exceptions and to provide a clearer error when the lockfile is malformed or mismatched with the manifest. - Within
Javascript_bun._buildDependencyTree, you callthis._getManifest()multiple times formanifestPath,name, andversion; caching the manifest object in a local variable would simplify the code and avoid repeated method calls.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `Javascript_bun._buildDependencyTree`, the `parse` call on `bun.lock` assumes valid JSONC; consider handling parse errors or unexpected `lockData` shapes to avoid uncaught exceptions and to provide a clearer error when the lockfile is malformed or mismatched with the manifest.
- Within `Javascript_bun._buildDependencyTree`, you call `this._getManifest()` multiple times for `manifestPath`, `name`, and `version`; caching the manifest object in a local variable would simplify the code and avoid repeated method calls.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
ruromero
previously approved these changes
May 14, 2026
ruromero
left a comment
Collaborator
There was a problem hiding this comment.
only one minor comment from my side
Add a Javascript_bun provider that parses bun.lock directly using jsonc-parser, since bun does not implement `bun pm ls --json`. Expose base class _createLockFile so the bun provider can refresh the lock file via `bun install --lockfile-only` before parsing, matching the behavior of all other JS providers. Closes #887 Refs: TC-4412, TC-4409 Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
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
Javascript_bunprovider that parsesbun.lockdirectly usingjsonc-parser, since bun does not implementbun pm ls --json(oven-sh/bun#26222)_createLockFileso the bun provider can refresh the lock file viabun install --lockfile-onlybefore parsing, matching the behavior of all other JS providersdetectWorkspaceManifests) and provider matchingCloses fabric8-analytics/fabric8-analytics-vscode-extension#887
Refs: TC-4412, TC-4409
Test plan
🤖 Generated with Claude Code
Summary by Sourcery
Add a new Bun JavaScript provider that parses bun.lock files for dependency analysis and integrates it into workspace detection and provider matching.
New Features:
Enhancements:
Build:
Tests: