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] pass a path to check dependency compatibility #31

Closed erj826 closed 1 year ago

erj826 commented 1 year ago

Problem Statement

Before moving an existing application into a monorepo there's no automated way to check if the dependencies in the application will align with the existing dependency versions in the monorepo or if they'll cause the one-version check to fail.

Proposed Solution

Add a -f --file option to the one-version check command where we can pass an arbitrary (local) file path to check for one-version compatibility.

For example:

yarn one-version check -f /path/to/my/other/repo/package.json

This would allow us to preview the output as if we had already moved the new package.json into the monorepo.

Alternatives Considered

Manually move a package.json into the monorepo and run yarn one-version check to see which versions do not match.

Additional Context

No response