Skip to content

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

Open
michaeljaltamirano wants to merge 11 commits into
mainfrom
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 11 commits into
mainfrom
feat/support-npm-and-pnpm

Conversation

@michaeljaltamirano

@michaeljaltamirano michaeljaltamirano commented Dec 26, 2025

Copy link
Copy Markdown

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

@tagoro9 tagoro9 left a comment

Copy link
Copy Markdown
Member

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

Comment thread install-dependencies/action.yaml Outdated
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
Copy Markdown
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

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

github-actions Bot commented Jan 13, 2026

Copy link
Copy Markdown

Release notes preview

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


7.7.0 (2026-08-25)

Miscellaneous

  • deps: update actions/checkout action to v7 (c1185ba)
  • deps: update dependency open-turo/renovate-config to v1.19.0 (b67f895)
  • deps: update dependency open-turo/renovate-config to v1.20.0 (c983e44)
  • deps: update dependency open-turo/renovate-config to v1.21.0 (06d9c2a)
  • deps: update dependency open-turo/renovate-config to v1.21.1 (84d0ed9)
  • deps: update everpcpc/actions-cache action to v3 (811ba7b)
  • deps: update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.25.0 (3680e02)
  • deps: update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.26.0 (9e8e814)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.2.1 (81fb01f)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.3.0 (c88b9c6)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.4.0 (b067d0d)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.4.1 (b95b0fd)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.5.0 (5f9d610)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.6.0 (79b995b)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.7.0 (a8634d7)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.8.0 (04cefe8)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.8.1 (4e0fb84)
  • deps: update pre-commit hook pre-commit/mirrors-eslint to v10.9.0 (1732e15)

Features

  • add pnpm and bun run steps to run-script (0ca0d8d)
  • add pnpm support, refine npm logic to not be yarn-dependent (f96dc37)
  • add Yarn Berry (v4) support via corepack detection (70e1e5e)
  • configure private registry auth centrally per PM in install-dependencies (b4f64f0)
  • enhance dependency installation process with postinstall scripts (8c16c7d)

Bug Fixes

  • prioritize packageManager field over lockfile for PM detection (182a819)
  • update run-script to use feat/support-npm-and-pnpm for install-dependencies (3b7453f)
  • write Berry auth to ~/.yarnrc.yml via node script (e085388)

Code Refactoring

  • maintain NPM fallback logic without explicit checks (4d496fa)

@OmarJaroudi
OmarJaroudi requested review from OmarJaroudi and removed request for OmarJaroudi April 14, 2026 21:48
@OmarJaroudi

Copy link
Copy Markdown
Contributor

@michaeljaltamirano shall we ship this? I may have a one-off repo that uses pnpm soon, would be cool to get to use open-turo actions!

@OmarJaroudi
OmarJaroudi force-pushed the feat/support-npm-and-pnpm branch from 0226a5a to 3b7453f Compare August 25, 2026 17:10
OmarJaroudi and others added 6 commits August 25, 2026 17:10
pnpm v8+ passes args to the script without needing --. The separator
was causing jest to receive -- --coverage --shard=N/M which it
interprets as file path patterns instead of flags, resulting in
No tests found.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.

4 participants