Skip to content

Switch to pnpm#205

Open
wojtekmaj wants to merge 1 commit intostyled-components:masterfrom
wojtekmaj:pnpm
Open

Switch to pnpm#205
wojtekmaj wants to merge 1 commit intostyled-components:masterfrom
wojtekmaj:pnpm

Conversation

@wojtekmaj
Copy link
Contributor

@wojtekmaj wojtekmaj commented Mar 20, 2026

Yarn v1 is unmaintained, deprecated and full of bugs. styled-components main repo uses pnpm. So there we go!

Note: There's an alternative PR, #204, that just upgrades Yarn to the latest version.

Note: Clean migration from yarn.lock lockfile was not possible and it had to be recreated. Therefore, this PR comes with minor dependency differences. As a result, minor formatting changes were also introduced to make lint pass.
0d265fe

Copy link

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 repository from Yarn v1 to pnpm and updates repo metadata/docs/CI accordingly.

Changes:

  • Remove yarn.lock and declare pnpm via packageManager in package.json.
  • Update GitHub Actions CI to install dependencies and run scripts with pnpm.
  • Add a basic CONTRIBUTING.md and expand .gitignore to cover common generated artifacts.

Reviewed changes

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

Show a summary per file
File Description
yarn.lock Removed Yarn v1 lockfile as part of the migration.
package.json Pins the package manager to pnpm via packageManager.
CONTRIBUTING.md Adds prerequisites (Node/Corepack) for contributors.
.gitignore Expands ignored caches/artifacts; normalizes node_modules ignore.
.github/workflows/ci.yml Switches CI install/lint/test/build steps from Yarn to pnpm.

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

Copy link
Contributor

@jacobp100 jacobp100 left a comment

Choose a reason for hiding this comment

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

I think this one makes more sense because it's what's used in the styled-components repo. It's hard for me to judge because in industry, I see yarn v1 90%+ of the time, then the remainder is npm. Which do you think is best?

@jacobp100
Copy link
Contributor

Also don't forget to remove the yarn.lock!

Yarn v1 is unmaintained, deprecated and full of bugs. styled-components main repo uses pnpm. So there we go!

Note: There's an alternative PR, styled-components#204, that just upgrades Yarn to the latest version.

Note: Clean migration from yarn.lock lockfile was not possible and it had to be recreated. Therefore, this PR comes with minor dependency differences. As a result, minor formatting changes were also introduced to make lint pass.
@wojtekmaj
Copy link
Contributor Author

wojtekmaj commented Mar 20, 2026

I think this one makes more sense because it's what's used in the styled-components repo. It's hard for me to judge because in industry, I see yarn v1 90%+ of the time, then the remainder is npm. Which do you think is best?

Statistics say Yarn v1 is on slow and steady, well deserved decline, while pnpm and modern Yarn go pretty much head to head:
https://github.com/wojtekmaj/package-manager-stats

My personal recommendation is to go with pnpm as it makes sense since styled-components repo already uses it. Fragmentation like this on org level doesn't make a lot of sense.

If you asked me where my heart is though, Yarn 100% :D

@wojtekmaj
Copy link
Contributor Author

Also don't forget to remove the yarn.lock!

Fixed :)

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