Skip to content

feat: add bun dependency cache support#42

Merged
fengmk2 merged 3 commits intomainfrom
feat/bun-cache-support
Apr 3, 2026
Merged

feat: add bun dependency cache support#42
fengmk2 merged 3 commits intomainfrom
feat/bun-cache-support

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Apr 3, 2026

Summary

  • Add bun.lockb and bun.lock lock file detection for dependency caching
  • Add Bun variant to LockFileType enum and wire it through cache directory resolution
  • Add test-cache-bun CI job to verify bun caching in GitHub Actions

VP supports bun as a package manager since v0.1.15 — this aligns the action with that support.

Closes #41

Test plan

  • Unit tests pass (vp run test — 92 tests)
  • Lint/format clean (vp run check:fix)
  • Build up to date (vp run build)
  • CI test-cache-bun job passes on PR

Add detection for bun.lockb and bun.lock files so bun users get the
same dependency caching as npm/pnpm/yarn users. VP supports bun as a
package manager since v0.1.15.

Closes #41
@fengmk2 fengmk2 self-assigned this Apr 3, 2026
Copilot AI review requested due to automatic review settings April 3, 2026 11:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Bun lockfile support to the action’s dependency cache detection, aligning it with VP’s Bun package manager support.

Changes:

  • Detect bun.lockb and bun.lock and classify them as a new LockFileType.Bun.
  • Treat Bun as a cacheable lockfile type when resolving dependency cache directories.
  • Add unit tests for Bun lockfile detection and a CI job to exercise Bun caching.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils.ts Adds Bun lockfile patterns, infers Bun type, and includes Bun in cache directory resolution.
src/utils.test.ts Adds unit tests covering explicit and auto-detected Bun lockfiles and priority behavior.
src/types.ts Extends LockFileType with a Bun variant.
dist/index.mjs Updates built action artifact to include Bun lockfile and cache logic.
.github/workflows/test.yml Adds test-cache-bun workflow job to validate Bun caching behavior in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fengmk2 added 2 commits April 3, 2026 19:14
- Use startsWith("bun.") instead of includes("bun") in
  inferLockFileType to avoid false positives (e.g. ubuntu.lock)
- Add bun.lockb to CI test matrix alongside bun.lock
Copilot AI review requested due to automatic review settings April 3, 2026 11:30
@fengmk2 fengmk2 enabled auto-merge April 3, 2026 11:32
@fengmk2 fengmk2 merged commit 8ecb391 into main Apr 3, 2026
41 checks passed
@fengmk2 fengmk2 deleted the feat/bun-cache-support branch April 3, 2026 11:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Bun Dependency Cache

2 participants