-
Notifications
You must be signed in to change notification settings - Fork 314
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
Update only major versions #1286
Comments
Hi, thanks for the suggestion. This would likely be implemented as a new A dedicated option for this feature is possible if this issue gets more upvotes. FYI If you use |
I am not sure if I understand correctly but for my use case I am interested only in major versions.
You mentioned the |
The In your case, the published version is already available, so it's just a matter of wiring up a filter function that is run after the fetch rather than before (like the current Let me know if you're interested in working on this and I can point you towards the code when I'm back at my computer. |
That would be great if you could put some light on the code, maybe that will help to get it done faster 👍 |
The new I would recommend the following signature for the user-provided export type FilterResultsFunction = (packageName: string, {
currentVersion: VersionSpec,
currentVersionSemver: SemVer[],
upgradedVersion: Version
}) => boolean (I chose this signature to be somewhat future-proof; removing/changing arguments would require a major version change, but adding keys to the argument object would not.) I think the best place to filter the upgraded packages is after npm-check-updates/src/lib/upgradePackageDefinitions.ts Lines 27 to 32 in c5100fc
You can add
Let me know if you need any additional guidance! |
Wow, that is amazing @raineorshine 🚀 I will take a detailed look into code, probably on the weekend. |
Hi!
I was playing around with npm-check-updates and did not found an option to update only major versions (excluding potential updates for minor/patch libraries).
Why I need this?
Updating deps update is tedious task for each I have the Jenkins job.
For the minor/patch updates, I would like to deploy update dependencies automatically (automated work)
For the major updates, I want to review the changes before I deploy new application version (manual work)
Example:
application package.json contains following libraries:
There newest versions in artifactory:
Expectation:
Only version of artifact
b
should be updated from 13.0.0 to 14.1.1 because that is the major change in the example.Currently there is a target option, but my use case is not supported with any of options there.
Workaround:
npx npm-check-updates --format group
Major
sectionnpm-check-updates
with regex based on artifacts found in point 2Maybe there can be added new target option called
majorOnly
that will work like I described?The text was updated successfully, but these errors were encountered: