wayfair / one-version

Implementation of Google’s One Version Rule for JS monorepos
https://www.npmjs.com/package/@wayfair/one-version
MIT License
24 stars 4 forks source link

[Feat] Add support for yarn berry #18

Closed hamlim closed 2 years ago

hamlim commented 2 years ago

Problem Statement

The current behavior with --packageManager yarn defaults to using yarn --silent workspaces info which no longer exists/works with yarn berry (2.0 +). This breaks when adopting the one-version rule in yarn berry monorepos.

Proposed Solution

Introduce a berry packageManager option, that uses yarn workspaces list --json to determine the workspaces in the repo!

Alternatives Considered

Have the default behavior of --packageManager yarn assume yarn berry only and not yarn v1, but this seems overly restrictive if teams want to adopt this package in yarn v1 monorepos.

Additional Context

No response