Skip to content

fix: issue where zip action won't work for bun setup#25

Open
pramodjodhani wants to merge 1 commit into
mainfrom
feature/allow-bun-setups
Open

fix: issue where zip action won't work for bun setup#25
pramodjodhani wants to merge 1 commit into
mainfrom
feature/allow-bun-setups

Conversation

@pramodjodhani

@pramodjodhani pramodjodhani commented Jul 6, 2026

Copy link
Copy Markdown
Member

Bun-only repos have no package-lock.json, which made setup-node's npm cache fail with "Dependencies lock file is not found" error.

Added a check for package-lock.json file, if this file doesn't exist then we skip the cache during the actions/setup-node@v4 step.

Bun-only repos have no package-lock.json, which made setup-node's
npm cache restore fail with "Dependencies lock file is not found."
@pramodjodhani pramodjodhani changed the title fix: only enable npm cache in setup-node when package-lock.json exists fix: issue where this action won't work for bun setup Jul 6, 2026
@pramodjodhani pramodjodhani changed the title fix: issue where this action won't work for bun setup fix: issue where zip action won't work for bun setup Jul 6, 2026
Comment thread .github/workflows/zip.yml
Comment on lines +101 to +108
- name: Check for npm lockfile
id: check-lockfile
run: |
if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ] || [ -f yarn.lock ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It could be worthwhile to add a short comment above this block explaining that it ensures actions/setup-node works as-expected in scenarios where a npm lockfile doesn't exist (such as when only bun is used).

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.

2 participants