Skip to content

Switch from yarn to pnpm#45

Merged
trotzig merged 1 commit intomainfrom
pnpm
Jan 9, 2026
Merged

Switch from yarn to pnpm#45
trotzig merged 1 commit intomainfrom
pnpm

Conversation

@trotzig
Copy link
Copy Markdown
Contributor

@trotzig trotzig commented Dec 9, 2025

We've started using pnpm throughout all Happo repos, and we find that it's easier to use and faster.

Copy link
Copy Markdown

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

This PR migrates the project from yarn to pnpm as the package manager, aligning with the standardization effort across all Happo repositories. The migration is motivated by pnpm's improved ease of use and performance.

Key Changes:

  • Removed yarn.lock and added pnpm-lock.yaml for dependency resolution
  • Updated CircleCI configuration to install and use pnpm via corepack
  • Changed CI commands from yarn install/yarn test to pnpm install/pnpm test

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.

File Description
yarn.lock Removed entire yarn lockfile (2334 lines) as it's replaced by pnpm-lock.yaml
.circleci/config.yml Added pnpm installation via corepack and updated commands to use pnpm instead of yarn
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment thread .circleci/config.yml Outdated
command: |
npm install --global corepack@latest
corepack enable
corepack prepare pnpm@latest-10 --activate
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The version specifier pnpm@latest-10 appears to be invalid. According to pnpm documentation, valid version specifiers include:

  • Specific versions: pnpm@9.0.0
  • Version ranges: pnpm@9 or pnpm@^9.0.0
  • Latest: pnpm@latest

The syntax latest-10 is not a recognized pnpm version format. This should be changed to either:

  • pnpm@10 (for latest v10.x)
  • pnpm@latest (for the absolute latest version)
  • A specific version like pnpm@10.0.0

This will likely cause the CI build to fail with a version resolution error.

Suggested change
corepack prepare pnpm@latest-10 --activate
corepack prepare pnpm@10 --activate

Copilot uses AI. Check for mistakes.
Comment thread .circleci/config.yml
corepack prepare pnpm@latest --activate
- run:
name: Install Dependencies
command: pnpm install
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we should do this like we do in our other repos. Here's an example of the aliases we use:

https://github.com/happo/happo-view/blob/aeb65a80dba9881d92525e1bdc75216fdf659563/.circleci/config.yml#L3-L19

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will change the installation command to use npm as in the other repos. But I don't think it's worth the complexity of the caching so I'll leave that out.

Copy link
Copy Markdown
Collaborator

@lencioni lencioni left a comment

Choose a reason for hiding this comment

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

We should add the pnpm-workspace.yaml file in this PR, as well as mise.toml and .pnpmrc.

We've started using pnpm throughout all Happo repos, and we find that
it's easier to use and faster. This commit follows the pattern from our
other repos, but simplifies the CI config a little (no need for caching
at this time).
@trotzig trotzig merged commit 86a612b into main Jan 9, 2026
1 check passed
@trotzig trotzig deleted the pnpm branch January 9, 2026 09:58
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