-
Notifications
You must be signed in to change notification settings - Fork 17
/
.ncurc.js
32 lines (30 loc) · 1.01 KB
/
.ncurc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Configure which packages to ignore version upgrades.
*/
const ignoredPackages = [];
/**
* Configure which packages to ignore for major version upgrades.
* Type: { [packageName]: reason }, i.e. { '@storybook/react': 'some reason' }
*/
const ignoreMajorVersions = {
};
module.exports = {
upgrade: true,
reject: ignoredPackages,
packageManager: 'npm',
/** Custom target that performs minor upgrades for selected packages.
@param dependencyName The name of the dependency.
@param parsedVersion A parsed Semver object from semver-utils.
(See https://git.coolaj86.com/coolaj86/semver-utils.js#semverutils-parse-semverstring)
@returns 'latest' | 'newest' | 'greatest' | 'minor' | 'patch'
*/
target: (dependencyName, parsedVersion) => {
const ignored = ignoreMajorVersions[dependencyName]
if (ignored !== undefined) {
const res = 'minor';
console.log(`\n👀 ️${dependencyName} is pinned to ${res}. Reason: ${ignored}`);
return res;
}
return 'latest';
},
};