Skip to content

Replace yarn with npm@12 - #144

Draft
risantos wants to merge 2 commits into
masterfrom
support/npm
Draft

risantos wants to merge 2 commits into
masterfrom
support/npm

Conversation

@risantos

@risantos risantos commented Jul 28, 2026

Copy link
Copy Markdown
Member

Description

Transition the project from using yarn to NPM v12 as package manager.

  • Add devEngines.packageManager to package.json, which will also enable automatic dependency caching on CI via actions/setup-node.
  • Update workflows and scripts accordingly to ensure compatibility and maintain functionality, now pinned to their commit hashes.
  • Add a badge for CI test status in README.
  • Add @fastify/pre-commit to allowScripts.
  • Set the npm install-strategy to linked, as recommended on their docs.
    See https://docs.npmjs.com/cli/v12/commands/npm-install#install-strategy.

    We recommend that package authors use --install-strategy=linked during development to catch undeclared ("phantom") dependencies before publishing: the isolated layout only exposes a package's declared dependencies, so an import of a package that was never added to package.json can fail instead of resolving by accident and shipping broken. See Catching undeclared ("phantom") dependencies.

@risantos risantos added the release:skip #️⃣#️⃣#️⃣ Do not release changes label Jul 28, 2026
@risantos risantos self-assigned this Jul 28, 2026
Base automatically changed from support/update-eslint to master July 28, 2026 11:48
Signed-off-by: Rafael Santos <rafael.santos@uphold.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR transitions the repository’s tooling from Yarn to npm (targeting npm v12), updating CI workflows and project metadata to reflect the new package manager and adding a CI status badge to the README.

Changes:

  • Remove yarn.lock and update GitHub Actions workflows to use npm ci / npm run … instead of yarn …, while pinning actions to commit SHAs.
  • Add devEngines.packageManager (npm v12) and an allowScripts entry to package.json.
  • Add a CI tests status badge to README.md.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
yarn.lock Removed Yarn lockfile as part of the migration away from Yarn.
package.json Adds npm v12 package manager metadata and allowScripts configuration.
.github/workflows/tests.yaml Switch CI install/lint/test steps from Yarn to npm and pin GitHub Actions by SHA.
.github/workflows/release.yaml Switch release workflow dependency installation from Yarn to npm and pin GitHub Actions by SHA.
README.md Adds a CI test status badge.

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

Comment on lines 16 to 20
- name: Setup Node.js version
uses: actions/setup-node@v6
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
cache: 'yarn'

Comment on lines 33 to +40
- name: Set up Node.js version
uses: actions/setup-node@v6
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
registry-url: 'https://registry.npmjs.org/'

- name: Install dependencies
run: yarn install --frozen-lockfile
run: npm ci
Signed-off-by: Rafael Santos <rafael.santos@uphold.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants