Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add lint-semver-ranges command #56

Closed
wants to merge 8 commits into from

Conversation

ArturWierzbicki
Copy link
Contributor

Hey @JamieMason! First of all, thanks for creating this project - it's a great tool to have when dealing with monorepos.

Description (What)

I have added a lint-semver-ranges command, which works just like the existing fix-semver-ranges command, except that it simply outputs all the non-compliant dependency versions instead of fixing them.

Justification (Why)

My use case for this command is a project in which a) I cannot force everyone to use fix-semver-ranges before pushing the code (e.g., via a pre-commit hook), and b) the CI process can't commit changes to dependency versions

Of course, I could work around the limitations by failing the CI job if running fix-semver-ranges modifies any file, but adding a "lint" capability to the project looks like the cleanest solution.

How Can This Be Tested?

Command name: lint-semver-ranges:
https://github.com/ArturWierzbicki/syncpack/blob/82916f7248c025039d18d94181645b8758fc2381/package.json#L13

Example output:
image

I did two small refactors in order to reuse as much code from fix-semver-ranges as possible. Looking forward to your feedback!

@JamieMason
Copy link
Owner

This looks really good, great work and thanks a lot. I'm really busy due to my day job but I hope to pick this up this weekend.

@JamieMason JamieMason closed this in b4209f0 Aug 1, 2021
@JamieMason
Copy link
Owner

Thanks again for this @ArturWierzbicki, this was released in 5.8.12 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants