JamieMason / syncpack

Consistent dependency versions in large JavaScript Monorepos.
https://jamiemason.github.io/syncpack/
MIT License
1.34k stars 44 forks source link

Explicitly add dependency `fast-check` #180

Closed keyz closed 6 months ago

keyz commented 6 months ago

Description (What)

Since 12.0.0, pnpm add syncpack has been failing under pnpm strict mode because fast-check isn't declared as a dependency:

 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

.
└─┬ syncpack 12.0.0
  ├─┬ @effect/schema 0.56.0
  │ └── ✕ missing peer fast-check@^3.13.2
  └─┬ @effect/match 0.40.0
    └── ✕ unmet peer effect@2.0.0-next.47: found 2.0.0-next.62
Peer dependencies that should be installed:
  fast-check@^3.13.2

hint: If you want peer dependencies to be automatically installed, add "auto-install-peers=true" to an .npmrc file at the root of your project.
hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.

Justification (Why)

As a CLI tool, syncpack should be self-contained and shouldn't require the callsite to install peer deps

How Can This Be Tested?

Run pnpm add syncpack with a strict .npmrc:

auto-install-peers=false
strict-peer-dependencies=true
JamieMason commented 6 months ago

Thanks @keyz, I'll add a pnpm check to CI to catch these in future (I'm using npm).

JamieMason commented 6 months ago

I've switched this repo over to using pnpm strict, hopefully this is resolved in 12.0.1

keyz commented 6 months ago

Great, thank you @JamieMason!