tajo / ladle

🥄 Develop, test and document your React story components faster.
https://www.ladle.dev
MIT License
2.63k stars 93 forks source link

Prevent Prettier from touching PNPM files #392

Closed wojtekmaj closed 1 year ago

wojtekmaj commented 1 year ago

Prettier auto formatted pnpm-lock and pnpm-workspace files, leading to confusing diffs before committing.

Changes in PNPM files were made by PNPM itself after running pnpm i command. The only manual change is .prettierignore file.

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 4fa84b2ef6d7d9e2ceb78d505d77cae4f3c8dfae

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
ladle ❌ Failed (Inspect) Mar 7, 2023 at 9:31AM (UTC)
tajo commented 1 year ago

Not sure why CI's pnpm install differs from yours, maybe you are using an older version of pnpm? I did the same change in my PR and it works: https://github.com/tajo/ladle/pull/394

wojtekmaj commented 1 year ago

The reason you may have not experienced lockfile changesbefore is that despite different formatting, Prettier definitely outputted a valid YAML, so PNPM didn't feel like changing it. As you install/update stuff, you'll start seeing the changes as PNPM goes back to its own formatting.

I think we're on the same PNPM version as specified in package.json, we may be using different OS...