diff --git a/.ncurc.js b/.ncurc.js index 2589840530..5c17725d5d 100644 --- a/.ncurc.js +++ b/.ncurc.js @@ -18,5 +18,17 @@ module.exports = { return check.some((prefix) => name.startsWith(prefix)); }, // https://github.com/raineorshine/npm-check-updates#target - target: () => `semver`, + target: (name, semver) => { + const { operator } = semver[0] ?? {}; + + // rc-component + if (rcOrg.some((prefix) => name.startsWith(prefix))) { + // `^` always upgrade latest, otherwise follow semver. + if (operator === '^') { + return 'latest'; + } + } + + return 'semver'; + }, };