Skip to content

feat: add bun and pnpm support, refine npm logic to not be yarn-dependent#173

Open
michaeljaltamirano wants to merge 2 commits intomainfrom
feat/support-npm-and-pnpm
Open

feat: add bun and pnpm support, refine npm logic to not be yarn-dependent#173
michaeljaltamirano wants to merge 2 commits intomainfrom
feat/support-npm-and-pnpm

Conversation

@michaeljaltamirano
Copy link

@michaeljaltamirano michaeljaltamirano commented Dec 26, 2025

The actions-node GHA is relatively brittle, expecting yarn as the package manager for repos that rely on it, though there is fallback logic to npm if no yarn artifacts are detected. This PR seeks to make the GHA compatible with two other tools: bun and pnpm. (deno was excluded to try not to add too much at once.) This will allow repos that rely on this GHA to use whichever tool best suits the needs for that given repo, without the restriction on yarn (classic) and npm.

@michaeljaltamirano michaeljaltamirano requested a review from a team as a code owner December 26, 2025 21:52
@michaeljaltamirano michaeljaltamirano changed the title feat: add pnpm support, refine npm logic to not be yarn-dependent feat: add bun and pnpm support, refine npm logic to not be yarn-dependent Dec 26, 2025
@michaeljaltamirano michaeljaltamirano force-pushed the feat/support-npm-and-pnpm branch 2 times, most recently from 0e23f25 to 9f765a0 Compare December 29, 2025 20:02
Copy link
Member

@tagoro9 tagoro9 left a comment

Choose a reason for hiding this comment

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

Just a question on still falling back to npm

package-manager:
description: The package manager used to install dependencies
value: ${{ steps.check_yarn_lock.outputs.files_exists == 'true' && 'yarn' || 'npm' }}
value: ${{ steps.check_bun_lock.outputs.files_exists == 'true' && 'bun' || (steps.check_pnpm_lock.outputs.files_exists == 'true' && 'pnpm' || (steps.check_yarn_lock.outputs.files_exists == 'true' && 'yarn') || (steps.check_npm_lock.outputs.files_exists == 'true' && 'npm')) }}
Copy link
Member

Choose a reason for hiding this comment

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

Should this still fallback to npm when there is no lockfile for any tool but there is just a package.json file? Right now if there is no package-lock.json this is going to return an empty string

chore(install-dependencies/action.yaml): update Compute lockfile hash to not be yarn-dependent

feat: add support for bun, too
@michaeljaltamirano michaeljaltamirano force-pushed the feat/support-npm-and-pnpm branch from 83c1453 to 13157df Compare January 13, 2026 23:16
@github-actions
Copy link

Release notes preview

Below is a preview of the release notes if your PR gets merged.


7.5.0 (2026-01-13)

Features

  • add pnpm support, refine npm logic to not be yarn-dependent (9923aa2)

Miscellaneous

  • deps: update actions/checkout action to v6 (c62dd90)
  • deps: update pre-commit hook rhysd/actionlint to v1.7.10 (dc2030b)
  • deps: update pre-commit hook rhysd/actionlint to v1.7.9 (e187f5d)

Code Refactoring

  • maintain NPM fallback logic without explicit checks (13157df)

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.

3 participants