Skip to content

Conversation

@steverice
Copy link
Contributor

For users of the Yarn package manager.

Add a hook that checks that a yarn.lock matches the given package.json. This is very similar, and mostly copied from, the existing BundleCheck pre-commit hook.

The primary difference is that yarn check's output needs a bit more massaging. Since it reports a number of issues that are unrelated, or outside the developer's control, check for certain error statements that do indicate the lockfile is out of date.

@steverice steverice requested a review from sds February 10, 2018 02:22
Add a hook that checks that a [`yarn.lock`](https://yarnpkg.com)
matches the given `package.json`. This is very similar, and mostly
copied from, the existing `BundleCheck` pre-commit hook.

The primary difference is that `yarn check`'s output needs a bit
more massaging. Since it reports a number of issues that are
unrelated, or outside the developer's control, check for certain
error statements that do indicate the lockfile is out of date.
Copy link
Owner

@sds sds left a comment

Choose a reason for hiding this comment

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

Nice, thanks for writing tests with real-world example output.

@sds sds merged commit b178184 into master Feb 10, 2018
@sds sds deleted the yarn-check branch February 10, 2018 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants