npm-check-updates
Advanced tools
Comparing version 17.1.10 to 17.1.11
{ | ||
"name": "npm-check-updates", | ||
"version": "17.1.10", | ||
"version": "17.1.11", | ||
"author": "Tomas Junnonen <tomas1@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -467,3 +467,3 @@ # npm-check-updates | ||
@param name The name of the dependency. | ||
@param semver A parsed Semver array of the upgraded version. | ||
@param semver A parsed Semver array of the current version. | ||
(See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring) | ||
@@ -489,13 +489,13 @@ @returns True if the package should be included, false if it should be excluded. | ||
```js | ||
/** Filter out non-major version updates. | ||
@param {string} packageName The name of the dependency. | ||
@param {string} current Current version declaration (may be a range). | ||
@param {SemVer[]} currentSemver Current version declaration in semantic versioning format (may be a range). | ||
@param {string} upgraded Upgraded version. | ||
@param {SemVer} upgradedSemver Upgraded version in semantic versioning format. | ||
@returns {boolean} Return true if the upgrade should be kept, otherwise it will be ignored. | ||
/** Filter out non-major version updates. Note this could also be achieved with --target semver. | ||
@param {string} packageName The name of the dependency. | ||
@param {string} current Current version declaration (may be a range). | ||
@param {SemVer[]} currentVersionSemver Current version declaration in semantic versioning format (may be a range). | ||
@param {string} upgraded Upgraded version. | ||
@param {SemVer} upgradedVersionSemver Upgraded version in semantic versioning format. | ||
@returns {boolean} Return true if the upgrade should be kept, otherwise it will be ignored. | ||
*/ | ||
filterResults: (packageName, { current, currentSemver, upgraded, upgradedSemver }) => { | ||
const currentMajor = parseInt(currentSemver[0]?.major, 10) | ||
const upgradedMajor = parseInt(upgradedSemver?.major, 10) | ||
filterResults: (packageName, { current, currentVersionSemver, upgraded, upgradedVersionSemver }) => { | ||
const currentMajor = parseInt(currentVersionSemver[0]?.major, 10) | ||
const upgradedMajor = parseInt(upgradedVersionSemver?.major, 10) | ||
if (currentMajor && upgradedMajor) { | ||
@@ -518,8 +518,10 @@ return currentMajor < upgradedMajor | ||
The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. This function is an alias for the filter option function. | ||
`--filterVersion` runs _before_ new versions are fetched, in contrast to `--filterResults` which runs _after_. | ||
The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. This function is an alias for the `filter` option function. | ||
```js | ||
/** | ||
@param name The name of the dependency. | ||
@param semver A parsed Semver array of the upgraded version. | ||
@param semver A parsed Semver array of the current version. | ||
(See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring) | ||
@@ -703,3 +705,3 @@ @returns True if the package should be included, false if it should be excluded. | ||
@param name The name of the dependency. | ||
@param semver A parsed Semver array of the upgraded version. | ||
@param semver A parsed Semver array of the current version. | ||
(See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring) | ||
@@ -724,2 +726,4 @@ @returns True if the package should be excluded, false if it should be included. | ||
`--rejectVersion` runs _before_ new versions are fetched, in contrast to `--filterResults` which runs _after_. | ||
The predicate function is only available in .ncurc.js or when importing npm-check-updates as a module, not on the command line. This function is an alias for the reject option function. | ||
@@ -730,3 +734,3 @@ | ||
@param name The name of the dependency. | ||
@param semver A parsed Semver array of the upgraded version. | ||
@param semver A parsed Semver array of the current version. | ||
(See: https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring) | ||
@@ -733,0 +737,0 @@ @returns True if the package should be excluded, false if it should be included. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
5336362
5420
840