npm-check-updates 11.8.5 → 12.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +5 -4
  2. package/build/package.json +166 -0
  3. package/build/src/bin/cli.d.ts +2 -0
  4. package/build/src/bin/cli.js +89 -0
  5. package/build/src/bin/cli.js.map +1 -0
  6. package/build/src/cli-options.d.ts +13 -0
  7. package/build/src/cli-options.js +295 -0
  8. package/build/src/cli-options.js.map +1 -0
  9. package/build/src/constants.d.ts +3 -0
  10. package/{lib → build/src}/constants.js +8 -8
  11. package/build/src/constants.js.map +1 -0
  12. package/build/src/doctor.d.ts +3 -0
  13. package/build/src/doctor.js +154 -0
  14. package/build/src/doctor.js.map +1 -0
  15. package/build/src/index.d.ts +11 -0
  16. package/build/src/index.js +166 -0
  17. package/build/src/index.js.map +1 -0
  18. package/build/src/lib/doctor.d.ts +5 -0
  19. package/build/src/lib/doctor.js +157 -0
  20. package/build/src/lib/doctor.js.map +1 -0
  21. package/build/src/lib/filterAndReject.d.ts +11 -0
  22. package/build/src/lib/filterAndReject.js +65 -0
  23. package/build/src/lib/filterAndReject.js.map +1 -0
  24. package/build/src/lib/findPackage.d.ts +14 -0
  25. package/build/src/lib/findPackage.js +84 -0
  26. package/build/src/lib/findPackage.js.map +1 -0
  27. package/build/src/lib/get-ncu-rc.js +31 -0
  28. package/build/src/lib/get-ncu-rc.js.map +1 -0
  29. package/build/src/lib/getCurrentDependencies.d.ts +13 -0
  30. package/build/src/lib/getCurrentDependencies.js +64 -0
  31. package/build/src/lib/getCurrentDependencies.js.map +1 -0
  32. package/build/src/lib/getIgnoredUpgrades.d.ts +4 -0
  33. package/build/src/lib/getIgnoredUpgrades.js +27 -0
  34. package/build/src/lib/getIgnoredUpgrades.js.map +1 -0
  35. package/build/src/lib/getInstalledPackages.d.ts +12 -0
  36. package/build/src/lib/getInstalledPackages.js +30 -0
  37. package/build/src/lib/getInstalledPackages.js.map +1 -0
  38. package/build/src/lib/getNcuRc.d.ts +20 -0
  39. package/build/src/lib/getNcuRc.js +31 -0
  40. package/build/src/lib/getNcuRc.js.map +1 -0
  41. package/build/src/lib/getPackageFileName.d.ts +6 -0
  42. package/build/src/lib/getPackageFileName.js +16 -0
  43. package/build/src/lib/getPackageFileName.js.map +1 -0
  44. package/build/src/lib/getPackageManager.d.ts +11 -0
  45. package/build/src/lib/getPackageManager.js +31 -0
  46. package/build/src/lib/getPackageManager.js.map +1 -0
  47. package/build/src/lib/getPeerDependencies.d.ts +4 -0
  48. package/build/src/lib/getPeerDependencies.js +28 -0
  49. package/build/src/lib/getPeerDependencies.js.map +1 -0
  50. package/build/src/lib/getPeerDependenciesFromRegistry.d.ts +10 -0
  51. package/build/src/lib/getPeerDependenciesFromRegistry.js +35 -0
  52. package/build/src/lib/getPeerDependenciesFromRegistry.js.map +1 -0
  53. package/build/src/lib/getPreferredWildcard.d.ts +10 -0
  54. package/build/src/lib/getPreferredWildcard.js +34 -0
  55. package/build/src/lib/getPreferredWildcard.js.map +1 -0
  56. package/build/src/lib/getRepoUrl.d.ts +8 -0
  57. package/build/src/lib/getRepoUrl.js +70 -0
  58. package/build/src/lib/getRepoUrl.js.map +1 -0
  59. package/build/src/lib/initOptions.d.ts +4 -0
  60. package/build/src/lib/initOptions.js +72 -0
  61. package/build/src/lib/initOptions.js.map +1 -0
  62. package/build/src/lib/isUpgradeable.d.ts +10 -0
  63. package/build/src/lib/isUpgradeable.js +61 -0
  64. package/build/src/lib/isUpgradeable.js.map +1 -0
  65. package/build/src/lib/mergeOptions.d.ts +54 -0
  66. package/build/src/lib/mergeOptions.js +23 -0
  67. package/build/src/lib/mergeOptions.js.map +1 -0
  68. package/build/src/lib/programError.d.ts +4 -0
  69. package/build/src/lib/programError.js +15 -0
  70. package/build/src/lib/programError.js.map +1 -0
  71. package/build/src/lib/queryVersions.d.ts +10 -0
  72. package/build/src/lib/queryVersions.js +102 -0
  73. package/build/src/lib/queryVersions.js.map +1 -0
  74. package/build/src/lib/runGlobal.d.ts +4 -0
  75. package/build/src/lib/runGlobal.js +47 -0
  76. package/build/src/lib/runGlobal.js.map +1 -0
  77. package/build/src/lib/runLocal.d.ts +13 -0
  78. package/build/src/lib/runLocal.js +172 -0
  79. package/build/src/lib/runLocal.js.map +1 -0
  80. package/build/src/lib/upgradeDependencies.d.ts +11 -0
  81. package/build/src/lib/upgradeDependencies.js +86 -0
  82. package/build/src/lib/upgradeDependencies.js.map +1 -0
  83. package/build/src/lib/upgradePackageData.d.ts +19 -0
  84. package/build/src/lib/upgradePackageData.js +60 -0
  85. package/build/src/lib/upgradePackageData.js.map +1 -0
  86. package/build/src/lib/upgradePackageDefinitions.d.ts +10 -0
  87. package/build/src/lib/upgradePackageDefinitions.js +43 -0
  88. package/build/src/lib/upgradePackageDefinitions.js.map +1 -0
  89. package/build/src/logging.d.ts +34 -0
  90. package/build/src/logging.js +157 -0
  91. package/build/src/logging.js.map +1 -0
  92. package/build/src/package-managers/filters.d.ts +29 -0
  93. package/build/src/package-managers/filters.js +81 -0
  94. package/build/src/package-managers/filters.js.map +1 -0
  95. package/build/src/package-managers/gitTags.d.ts +11 -0
  96. package/build/src/package-managers/gitTags.js +109 -0
  97. package/build/src/package-managers/gitTags.js.map +1 -0
  98. package/build/src/package-managers/index.d.ts +3 -0
  99. package/build/src/package-managers/index.js +30 -0
  100. package/build/src/package-managers/index.js.map +1 -0
  101. package/build/src/package-managers/npm.d.ts +105 -0
  102. package/build/src/package-managers/npm.js +336 -0
  103. package/build/src/package-managers/npm.js.map +1 -0
  104. package/build/src/package-managers/yarn.d.ts +63 -0
  105. package/build/src/package-managers/yarn.js +237 -0
  106. package/build/src/package-managers/yarn.js.map +1 -0
  107. package/build/src/repo-url.js +67 -0
  108. package/build/src/repo-url.js.map +1 -0
  109. package/build/src/types/remote-git-tags.d.ts +3 -0
  110. package/build/src/types/remote-git-tags.js +2 -0
  111. package/build/src/types/remote-git-tags.js.map +1 -0
  112. package/{lib/index.d.ts → build/src/types.d.ts} +81 -57
  113. package/build/src/types.js +3 -0
  114. package/build/src/types.js.map +1 -0
  115. package/build/src/version-util.d.ts +149 -0
  116. package/build/src/version-util.js +398 -0
  117. package/build/src/version-util.js.map +1 -0
  118. package/build/src/versionmanager.js +520 -0
  119. package/build/src/versionmanager.js.map +1 -0
  120. package/package.json +61 -34
  121. package/bin/cli.js +0 -98
  122. package/lib/cli-options.js +0 -295
  123. package/lib/doctor.js +0 -199
  124. package/lib/index.js +0 -600
  125. package/lib/logging.js +0 -159
  126. package/lib/merge-options.js +0 -21
  127. package/lib/package-managers/README.md +0 -16
  128. package/lib/package-managers/gitTags.js +0 -98
  129. package/lib/package-managers/index.js +0 -7
  130. package/lib/package-managers/npm.js +0 -397
  131. package/lib/package-managers/yarn.js +0 -290
  132. package/lib/repo-url.js +0 -79
  133. package/lib/version-util.js +0 -458
  134. package/lib/versionmanager.js +0 -620
package/README.md CHANGED
@@ -33,7 +33,7 @@ npx npm-check-updates
33
33
 
34
34
  ## Usage
35
35
 
36
- Show any new dependencies for the project in the current directory:
36
+ Show all new dependencies ([excluding peerDependencies](https://github.com/raineorshine/npm-check-updates/issues/951)) for the project in the current directory:
37
37
 
38
38
  ```sh
39
39
  $ ncu
@@ -136,7 +136,8 @@ ncu "/^(?!react-).*$/" # windows
136
136
  Alias of (--packageFile '**/package.json').
137
137
  --dep <value> Check one or more sections of dependencies only:
138
138
  dev, optional, peer, prod, bundle
139
- (comma-delimited).
139
+ (comma-delimited). (default:
140
+ "prod,dev,bundle,optional")
140
141
  --deprecated Include deprecated packages.
141
142
  --doctor Iteratively installs upgrades and runs tests to
142
143
  identify breaking upgrades. Run "ncu --doctor"
@@ -162,7 +163,7 @@ ncu "/^(?!react-).*$/" # windows
162
163
  --greatest DEPRECATED. Renamed to "--target greatest".
163
164
  -i, --interactive Enable interactive prompts for each dependency;
164
165
  implies -u unless one of the json options are
165
- set,
166
+ set.
166
167
  -j, --jsonAll Output new package file instead of
167
168
  human-readable message.
168
169
  --jsonDeps Like `jsonAll` but only lists `dependencies`,
@@ -204,7 +205,7 @@ ncu "/^(?!react-).*$/" # windows
204
205
  --target" for details.` (default: "latest")
205
206
  --timeout <ms> Global timeout in milliseconds. (default: no
206
207
  global timeout and 30 seconds per
207
- npm-registery-fetch).
208
+ npm-registry-fetch).
208
209
  -u, --upgrade Overwrite package file with upgraded versions
209
210
  instead of just outputting to console.
210
211
  -V, --version output the version number
@@ -0,0 +1,166 @@
1
+ {
2
+ "name": "npm-check-updates",
3
+ "version": "12.0.2",
4
+ "author": "Tomas Junnonen <tomas1@gmail.com>",
5
+ "license": "Apache-2.0",
6
+ "contributors": [
7
+ "Raine Revere (https://github.com/raineorshine)"
8
+ ],
9
+ "description": "Find newer versions of dependencies than what your package.json allows",
10
+ "keywords": [
11
+ "npm",
12
+ "check",
13
+ "find",
14
+ "discover",
15
+ "updates",
16
+ "upgrades",
17
+ "dependencies",
18
+ "package.json",
19
+ "updater",
20
+ "version",
21
+ "management",
22
+ "ncu"
23
+ ],
24
+ "engines": {
25
+ "node": ">=12"
26
+ },
27
+ "main": "build/src/index.js",
28
+ "scripts": {
29
+ "build": "npm run build:ts && npm run build:readme",
30
+ "build:ts": "tsc && chmod u+x ./build/src/bin/cli.js",
31
+ "build:readme": "node scripts/buildReadme.js",
32
+ "lint": "cross-env FORCE_COLOR=1 npm-run-all --parallel --aggregate-output lint:*",
33
+ "lint:lockfile": "lockfile-lint",
34
+ "lint:markdown": "markdownlint \"**/*.md\" --ignore node_modules --ignore build --config .markdownlint.js",
35
+ "lint:src": "eslint --cache --cache-location node_modules/.cache/.eslintcache --ignore-path .gitignore --report-unused-disable-directives .",
36
+ "c8": "c8",
37
+ "prepublishOnly": "npm run build",
38
+ "test": "npm run test:src && npm run test:timeout",
39
+ "test:src": "mocha test src/test/* test/package-managers/npm/index.ts test/package-managers/yarn/index.ts",
40
+ "test:timeout": "mocha --exit test/timeout",
41
+ "ncu": "node build/src/bin/cli.js"
42
+ },
43
+ "bin": {
44
+ "npm-check-updates": "build/src/bin/cli.js",
45
+ "ncu": "build/src/bin/cli.js"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/raineorshine/npm-check-updates.git"
50
+ },
51
+ "homepage": "https://github.com/raineorshine/npm-check-updates",
52
+ "bugs": {
53
+ "url": "https://github.com/raineorshine/npm-check-updates/issues"
54
+ },
55
+ "dependencies": {
56
+ "chalk": "^4.1.2",
57
+ "cint": "^8.2.1",
58
+ "cli-table": "^0.3.6",
59
+ "commander": "^6.2.1",
60
+ "fast-memoize": "^2.5.2",
61
+ "find-up": "5.0.0",
62
+ "fp-and-or": "^0.1.3",
63
+ "get-stdin": "^8.0.0",
64
+ "globby": "^11.0.4",
65
+ "hosted-git-info": "^4.0.2",
66
+ "json-parse-helpfulerror": "^1.0.3",
67
+ "jsonlines": "^0.1.1",
68
+ "libnpmconfig": "^1.2.1",
69
+ "lodash": "^4.17.21",
70
+ "minimatch": "^3.0.4",
71
+ "p-map": "^4.0.0",
72
+ "pacote": "^12.0.2",
73
+ "parse-github-url": "^1.0.2",
74
+ "progress": "^2.0.3",
75
+ "prompts": "^2.4.2",
76
+ "rc-config-loader": "^4.0.0",
77
+ "remote-git-tags": "^3.0.0",
78
+ "rimraf": "^3.0.2",
79
+ "semver": "^7.3.5",
80
+ "semver-utils": "^1.1.4",
81
+ "source-map-support": "^0.5.20",
82
+ "spawn-please": "^1.0.0",
83
+ "update-notifier": "^5.1.0"
84
+ },
85
+ "devDependencies": {
86
+ "@types/chai": "^4.2.22",
87
+ "@types/chai-as-promised": "^7.1.4",
88
+ "@types/cli-table": "^0.3.0",
89
+ "@types/hosted-git-info": "^3.0.2",
90
+ "@types/json-parse-helpfulerror": "^1.0.1",
91
+ "@types/lodash": "^4.14.176",
92
+ "@types/minimatch": "^3.0.5",
93
+ "@types/mocha": "^9.0.0",
94
+ "@types/node": "^16.11.7",
95
+ "@types/pacote": "^11.1.1",
96
+ "@types/parse-github-url": "^1.0.0",
97
+ "@types/progress": "^2.0.5",
98
+ "@types/prompts": "^2.4.0",
99
+ "@types/rimraf": "^3.0.2",
100
+ "@types/semver": "^7.3.9",
101
+ "@types/semver-utils": "^1.1.1",
102
+ "@types/update-notifier": "^5.1.0",
103
+ "@typescript-eslint/eslint-plugin": "^5.3.1",
104
+ "@typescript-eslint/parser": "^5.3.1",
105
+ "c8": "^7.10.0",
106
+ "chai": "^4.3.4",
107
+ "chai-as-promised": "^7.1.1",
108
+ "chai-string": "^1.5.0",
109
+ "cross-env": "^7.0.3",
110
+ "eslint": "^7.32.0",
111
+ "eslint-config-raine": "^0.3.0",
112
+ "eslint-config-standard": "^16.0.3",
113
+ "eslint-plugin-fp": "^2.3.0",
114
+ "eslint-plugin-import": "^2.25.2",
115
+ "eslint-plugin-jsdoc": "^37.0.3",
116
+ "eslint-plugin-node": "^11.1.0",
117
+ "eslint-plugin-promise": "^5.1.1",
118
+ "husky": "^7.0.4",
119
+ "lockfile-lint": "^4.6.2",
120
+ "markdownlint-cli": "^0.29.0",
121
+ "mocha": "^9.1.3",
122
+ "npm-run-all": "^4.1.5",
123
+ "should": "^13.2.3",
124
+ "strip-ansi": "^6.0.1",
125
+ "ts-node": "^10.4.0",
126
+ "typescript": "^4.4.4",
127
+ "yarn": "^1.22.17"
128
+ },
129
+ "files": [
130
+ "build",
131
+ "!**/test/**"
132
+ ],
133
+ "lockfile-lint": {
134
+ "allowed-schemes": [
135
+ "https:"
136
+ ],
137
+ "allowed-hosts": [
138
+ "npm"
139
+ ],
140
+ "empty-hostname": false,
141
+ "type": "npm ",
142
+ "path": "package-lock.json"
143
+ },
144
+ "mocha": {
145
+ "check-leaks": true,
146
+ "extensions": [
147
+ "js",
148
+ "ts"
149
+ ],
150
+ "require": [
151
+ "source-map-support/register",
152
+ "ts-node/register"
153
+ ],
154
+ "timeout": 30000,
155
+ "trace-deprecation": true,
156
+ "trace-warnings": true,
157
+ "use_strict": true
158
+ },
159
+ "c8": {
160
+ "reporter": [
161
+ "html",
162
+ "lcov",
163
+ "text-summary"
164
+ ]
165
+ }
166
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const commander_1 = __importDefault(require("commander"));
8
+ const lodash_1 = __importDefault(require("lodash"));
9
+ const update_notifier_1 = __importDefault(require("update-notifier"));
10
+ const index_1 = __importDefault(require("../index"));
11
+ const package_json_1 = __importDefault(require("../../package.json"));
12
+ const cli_options_1 = __importDefault(require("../cli-options"));
13
+ const getNcuRc_1 = __importDefault(require("../lib/getNcuRc"));
14
+ // check if a new version of ncu is available and print an update notification
15
+ const notifier = (0, update_notifier_1.default)({ pkg: package_json_1.default });
16
+ if (notifier.update && notifier.update.latest !== package_json_1.default.version) {
17
+ notifier.notify({ defer: false, isGlobal: true });
18
+ }
19
+ // manually detect option-specific help
20
+ // https://github.com/raineorshine/npm-check-updates/issues/787
21
+ const rawArgs = process.argv.slice(2);
22
+ if (rawArgs.includes('--help') && rawArgs.length > 1) {
23
+ const nonHelpArgs = rawArgs.filter(arg => arg !== '--help');
24
+ nonHelpArgs.forEach(arg => {
25
+ const option = cli_options_1.default.find(({ long }) => `--${long}` === arg);
26
+ if (option) {
27
+ console.log(`Usage: ncu --${option.long}`);
28
+ if (option.short) {
29
+ console.log(` ncu -${option.short}`);
30
+ }
31
+ if (option.default !== undefined && !(Array.isArray(option.default) && option.default.length === 0)) {
32
+ console.log(`Default: ${option.default}`);
33
+ }
34
+ if (option.help) {
35
+ console.log(`\n${option.help}`);
36
+ }
37
+ else if (option.description) {
38
+ console.log(`\n${option.description}`);
39
+ }
40
+ }
41
+ else {
42
+ console.log(`Unknown option: ${arg}`);
43
+ }
44
+ });
45
+ if (rawArgs.length - nonHelpArgs.length > 1) {
46
+ console.log('Would you like some help with your help?');
47
+ }
48
+ process.exit(0);
49
+ }
50
+ // start commander program
51
+ commander_1.default
52
+ .description('[filter] is a list or regex of package names to check (all others will be ignored).')
53
+ .usage('[options] [filter]');
54
+ // add cli options
55
+ cli_options_1.default.forEach(({ long, short, arg, description, default: defaultValue, parse }) =>
56
+ // handle 3rd/4th argument polymorphism
57
+ commander_1.default.option(`${short ? `-${short}, ` : ''}--${long}${arg ? ` <${arg}>` : ''}`, description, parse || defaultValue, parse ? defaultValue : undefined));
58
+ // set version option at the end
59
+ commander_1.default.version(package_json_1.default.version);
60
+ commander_1.default.parse(process.argv);
61
+ const { configFileName, configFilePath, packageFile, mergeConfig } = commander_1.default;
62
+ // load .ncurc
63
+ // Do not load when global option is set
64
+ // Do not load when tests are running (an be overridden if configFilePath is set explicitly, or --mergeConfig option specified)
65
+ const rcResult = !commander_1.default.global && (!process.env.NCU_TESTS || configFilePath || mergeConfig)
66
+ ? (0, getNcuRc_1.default)({ configFileName, configFilePath, packageFile })
67
+ : null;
68
+ // combine command line arguments with config file arguments
69
+ const combinedArguments = rcResult
70
+ ? [
71
+ ...process.argv.slice(0, 2),
72
+ ...rcResult.args,
73
+ ...process.argv.slice(2),
74
+ ]
75
+ : process.argv;
76
+ commander_1.default.parse(combinedArguments);
77
+ // filter out undefined program options and combine cli options with config file options
78
+ const options = {
79
+ ...rcResult && Object.keys(rcResult.config).length > 0
80
+ ? { rcConfigPath: rcResult.filePath }
81
+ : null,
82
+ ...lodash_1.default.pickBy(commander_1.default.opts(), value => value !== undefined),
83
+ args: commander_1.default.args,
84
+ ...commander_1.default.filter ? { filter: commander_1.default.filter } : null,
85
+ cli: true,
86
+ };
87
+ // NOTE: Options handling and defaults go in initOptions in index.js
88
+ (0, index_1.default)(options);
89
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/bin/cli.ts"],"names":[],"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AG,mBAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI;IACrD,GAAG,EAAE,IAAI;CACV,CAAA;AAED,oEAAoE;AAEpE,IAAA,eAAG,EAAC,OAAO,CAAC,CAAA"}
@@ -0,0 +1,13 @@
1
+ export interface CLIOption<T = any> {
2
+ arg?: string;
3
+ default?: T;
4
+ deprecated?: boolean;
5
+ description: string;
6
+ help?: string;
7
+ parse?: (s: string) => T;
8
+ long: string;
9
+ short?: string;
10
+ type?: string;
11
+ }
12
+ declare const cliOptionsSorted: CLIOption<any>[];
13
+ export default cliOptionsSorted;
@@ -0,0 +1,295 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const lodash_1 = __importDefault(require("lodash"));
7
+ const cli_table_1 = __importDefault(require("cli-table"));
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const constants_1 = require("./constants");
10
+ /**
11
+ * "newest" means most recently released in terms of release date, even if there are other version numbers that are higher. It includes prereleases.
12
+ * "greatest" means highest version number, regardless of release date. It includes prereleases.
13
+ * "latest" is whatever the project's "latest" git tag points to. It's usually the non-prerelease version with the highest version number, but is ultimately decided by each project's maintainers.
14
+ * "minor" means highest minor version without incrementing the current major.
15
+ * "patch" means highest patch version without incrementing the current major or minor.
16
+ **/
17
+ const getHelpTargetTable = () => {
18
+ /* eslint-disable fp/no-mutating-methods */
19
+ const table = new cli_table_1.default({
20
+ colAligns: ['right', 'left'],
21
+ });
22
+ table.push(['greatest', `Upgrade to the highest version number, regardless of release date or tag.
23
+ Includes prereleases.`]);
24
+ table.push(['latest', `Upgrade to whatever the package's "latest" git tag points to. It's usually the
25
+ non-prerelease version with the highest version number, but is ultimately decided
26
+ by each project's maintainers. Default.`]);
27
+ table.push(['minor', 'Upgrade to the highest minor version without bumping the major version.']);
28
+ table.push(['newest', `Upgrade to the version with the most recent publish date, even if there are
29
+ other version numbers that are higher. Includes prereleases.`]);
30
+ table.push(['patch', `Upgrade to the highest patch version without bumping the minor or major versions.`]);
31
+ return `Set the target version that is upgraded to (default: "latest").\n\n${table.toString()}`;
32
+ };
33
+ // store CLI options separately from bin file so that they can be used to build type definitions
34
+ const cliOptions = [
35
+ {
36
+ long: 'peer',
37
+ description: 'Check peer dependencies of installed packages and filter updates to compatible versions. Run "ncu --help --peer" for details.',
38
+ type: 'boolean',
39
+ help: `Check peer dependencies of installed packages and filter updates to compatible versions.
40
+
41
+ ${chalk_1.default.bold('Example')}
42
+
43
+ The following example demonstrates how --peer works, and how it uses peer dependencies from upgraded modules.
44
+
45
+ The package ${chalk_1.default.bold('ncu-test-peer-update')} has two versions published:
46
+
47
+ - 1.0.0 has peer dependency "ncu-test-return-version": "1.0.x"
48
+ - 1.1.0 has peer dependency "ncu-test-return-version": "1.1.x"
49
+
50
+ Our test app has the following dependencies:
51
+
52
+ "ncu-test-peer-update": "1.0.0",
53
+ "ncu-test-return-version": "1.0.0"
54
+
55
+ The latest versions of these packages are:
56
+
57
+ "ncu-test-peer-update": "1.1.0",
58
+ "ncu-test-return-version": "2.0.0"
59
+
60
+ ${chalk_1.default.bold('With --peer')}
61
+
62
+ ncu upgrades packages to the highest version that still adheres to the peer dependency constraints:
63
+
64
+
65
+ ncu-test-peer-update 1.0.0 → 1.${chalk_1.default.cyan('1.0')}
66
+ ncu-test-return-version 1.0.0 → 1.${chalk_1.default.cyan('1.0')}
67
+
68
+ ${chalk_1.default.bold('Without --peer')}
69
+
70
+ As a comparison: without using the --peer option, ncu will suggest the latest versions, ignoring peer dependencies:
71
+
72
+ ncu-test-peer-update 1.0.0 → 1.${chalk_1.default.cyan('1.0')}
73
+ ncu-test-return-version 1.0.0 → ${chalk_1.default.red('2.0.0')}
74
+ `
75
+ },
76
+ {
77
+ long: 'color',
78
+ description: 'Force color in terminal',
79
+ },
80
+ {
81
+ long: 'concurrency',
82
+ arg: 'n',
83
+ description: 'Max number of concurrent HTTP requests to registry.',
84
+ parse: s => parseInt(s, 10),
85
+ default: 8,
86
+ },
87
+ {
88
+ long: 'configFileName',
89
+ arg: 'filename',
90
+ description: 'Config file name (default: .ncurc.{json,yml,js})',
91
+ },
92
+ {
93
+ long: 'configFilePath',
94
+ arg: 'path',
95
+ description: 'Directory of .ncurc config file (default: directory of `packageFile`).',
96
+ },
97
+ {
98
+ long: 'cwd',
99
+ arg: 'path',
100
+ description: 'Working directory in which npm will be executed.',
101
+ },
102
+ {
103
+ long: 'deep',
104
+ description: `Run recursively in current working directory. Alias of (--packageFile '${constants_1.deepPatternPrefix}package.json').`,
105
+ type: 'boolean',
106
+ },
107
+ {
108
+ long: 'mergeConfig',
109
+ description: `Merges nested configs with the root config file for --deep or --packageFile options (default: false)').`,
110
+ type: 'boolean'
111
+ },
112
+ {
113
+ long: 'dep',
114
+ arg: 'value',
115
+ description: 'Check one or more sections of dependencies only: dev, optional, peer, prod, bundle (comma-delimited).',
116
+ default: 'prod,dev,bundle,optional'
117
+ },
118
+ {
119
+ long: 'deprecated',
120
+ description: 'Include deprecated packages.',
121
+ },
122
+ {
123
+ long: 'doctor',
124
+ description: 'Iteratively installs upgrades and runs tests to identify breaking upgrades. Run "ncu --doctor" for detailed help. Add "-u" to execute.',
125
+ },
126
+ {
127
+ long: 'enginesNode',
128
+ description: 'Include only packages that satisfy engines.node as specified in the package file.',
129
+ },
130
+ {
131
+ long: 'errorLevel',
132
+ short: 'e',
133
+ arg: 'n',
134
+ description: 'Set the error level. 1: exits with error code 0 if no errors occur. 2: exits with error code 0 if no packages need updating (useful for continuous integration).',
135
+ parse: s => parseInt(s, 10),
136
+ default: 1,
137
+ },
138
+ {
139
+ long: 'filter',
140
+ short: 'f',
141
+ arg: 'matches',
142
+ description: 'Include only package names matching the given string, wildcard, glob, comma-or-space-delimited list, or /regex/.',
143
+ type: 'string | string[] | RegExp',
144
+ },
145
+ {
146
+ long: 'filterVersion',
147
+ arg: 'matches',
148
+ description: 'Filter on package version using comma-or-space-delimited list, or /regex/.',
149
+ type: 'string | string[] | RegExp',
150
+ },
151
+ {
152
+ long: 'format',
153
+ arg: 'value',
154
+ description: 'Enable additional output data, string or comma-delimited list: ownerChanged, repo. ownerChanged: shows if the package owner changed between versions. repo: infers and displays links to source code repository.',
155
+ parse: value => typeof value === 'string' ? value.split(',') : value,
156
+ default: [],
157
+ type: 'string[]',
158
+ },
159
+ {
160
+ long: 'global',
161
+ short: 'g',
162
+ description: 'Check global packages instead of in the current project.',
163
+ },
164
+ {
165
+ long: 'greatest',
166
+ description: 'DEPRECATED. Renamed to "--target greatest".',
167
+ deprecated: true,
168
+ },
169
+ {
170
+ long: 'interactive',
171
+ short: 'i',
172
+ description: 'Enable interactive prompts for each dependency; implies -u unless one of the json options are set.',
173
+ },
174
+ {
175
+ // program.json is set to true in programInit if any options that begin with 'json' are true
176
+ long: 'jsonAll',
177
+ short: 'j',
178
+ description: 'Output new package file instead of human-readable message.',
179
+ },
180
+ {
181
+ long: 'jsonDeps',
182
+ description: 'Like `jsonAll` but only lists `dependencies`, `devDependencies`, `optionalDependencies`, etc of the new package data.',
183
+ },
184
+ {
185
+ long: 'jsonUpgraded',
186
+ description: 'Output upgraded dependencies in json.',
187
+ },
188
+ {
189
+ long: 'loglevel',
190
+ short: 'l',
191
+ arg: 'n',
192
+ description: 'Amount to log: silent, error, minimal, warn, info, verbose, silly.',
193
+ default: 'warn',
194
+ },
195
+ {
196
+ short: 'm',
197
+ long: 'minimal',
198
+ description: 'Do not upgrade newer versions that are already satisfied by the version range according to semver.',
199
+ },
200
+ {
201
+ short: 'n',
202
+ long: 'newest',
203
+ description: 'DEPRECATED. Renamed to "--target newest".',
204
+ deprecated: true,
205
+ },
206
+ {
207
+ long: 'ownerChanged',
208
+ short: 'o',
209
+ description: 'DEPRECATED. Renamed to "--format ownerChanged".',
210
+ deprecated: true,
211
+ },
212
+ {
213
+ long: 'packageData',
214
+ arg: 'value',
215
+ description: 'Package file data (you can also use stdin).',
216
+ },
217
+ {
218
+ long: 'packageFile',
219
+ arg: 'path|glob',
220
+ description: 'Package file(s) location (default: ./package.json).',
221
+ },
222
+ {
223
+ long: 'packageManager',
224
+ short: 'p',
225
+ arg: 'name',
226
+ // manual default to allow overriding auto yarn detection
227
+ description: 'npm, yarn (default: "npm")',
228
+ },
229
+ {
230
+ long: 'pre',
231
+ arg: 'n',
232
+ description: 'Include -alpha, -beta, -rc. (default: 0; default with --newest and --greatest: 1).',
233
+ type: 'boolean',
234
+ parse: s => !!parseInt(s, 10),
235
+ },
236
+ {
237
+ long: 'prefix',
238
+ arg: 'path',
239
+ description: 'Current working directory of npm.',
240
+ },
241
+ {
242
+ long: 'registry',
243
+ short: 'r',
244
+ arg: 'url',
245
+ description: 'Third-party npm registry.',
246
+ },
247
+ {
248
+ long: 'reject',
249
+ short: 'x',
250
+ arg: 'matches',
251
+ description: 'Exclude packages matching the given string, wildcard, glob, comma-or-space-delimited list, or /regex/.',
252
+ type: 'string | string[] | RegExp | RegExp[]',
253
+ },
254
+ {
255
+ long: 'rejectVersion',
256
+ arg: 'matches',
257
+ description: 'Exclude package.json versions using comma-or-space-delimited list, or /regex/.',
258
+ type: 'string | string[] | RegExp | RegExp[]',
259
+ },
260
+ {
261
+ long: 'removeRange',
262
+ description: 'Remove version ranges from the final package version.'
263
+ },
264
+ {
265
+ long: 'semverLevel',
266
+ arg: 'value',
267
+ description: 'DEPRECATED. Renamed to --target.',
268
+ deprecated: true,
269
+ },
270
+ {
271
+ long: 'silent',
272
+ short: 's',
273
+ description: 'Don\'t output anything (--loglevel silent).',
274
+ },
275
+ {
276
+ long: 'target',
277
+ short: 't',
278
+ arg: 'value',
279
+ description: 'Target version to upgrade to: latest, newest, greatest, minor, patch. Run "ncu --help --target" for details.` (default: "latest")',
280
+ help: getHelpTargetTable(),
281
+ },
282
+ {
283
+ long: 'timeout',
284
+ arg: 'ms',
285
+ description: 'Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch).',
286
+ },
287
+ {
288
+ long: 'upgrade',
289
+ short: 'u',
290
+ description: 'Overwrite package file with upgraded versions instead of just outputting to console.',
291
+ },
292
+ ];
293
+ const cliOptionsSorted = lodash_1.default.sortBy(cliOptions, 'long');
294
+ exports.default = cliOptionsSorted;
295
+ //# sourceMappingURL=cli-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-options.js","sourceRoot":"","sources":["../../src/cli-options.ts"],"names":[],"mappings":";;;;;AAAA,oDAAsB;AACtB,0DAA6B;AAC7B,kDAAyB;AACzB,2CAA+C;AAc/C;;;;;;IAMI;AACJ,MAAM,kBAAkB,GAAG,GAAW,EAAE;IACtC,2CAA2C;IAE3C,MAAM,KAAK,GAAG,IAAI,mBAAK,CAAC;QACtB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC7B,CAAC,CAAA;IAEF,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;sBACJ,CAAC,CAAC,CAAA;IACtB,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;;wCAEgB,CAAC,CAAC,CAAA;IACxC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,yEAAyE,CAAC,CAAC,CAAA;IAChG,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;6DACqC,CAAC,CAAC,CAAA;IAC7D,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,mFAAmF,CAAC,CAAC,CAAA;IAE1G,OAAO,sEAAsE,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAA;AACjG,CAAC,CAAA;AAED,gGAAgG;AAChG,MAAM,UAAU,GAAgB;IAC9B;QACE,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,+HAA+H;QAC5I,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;;EAER,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC;;;;c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SAAS;QACd,WAAW,EAAE,wGAAwG;QACrH,IAAI,EAAE,uCAAuC;KAC9C;IACD;QACE,IAAI,EAAE,eAAe;QACrB,GAAG,EAAE,SAAS;QACd,WAAW,EAAE,gFAAgF;QAC7F,IAAI,EAAE,uCAAuC;KAC9C;IACD;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,uDAAuD;KACrE;IACD;QACE,IAAI,EAAE,aAAa;QACnB,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,kCAAkC;QAC/C,UAAU,EAAE,IAAI;KACjB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,6CAA6C;KAC3D;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,mIAAmI;QAChJ,IAAI,EAAE,kBAAkB,EAAE;KAC3B;IACD;QACE,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,IAAI;QACT,WAAW,EAAE,qGAAqG;KACnH;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,sFAAsF;KACpG;CACF,CAAA;AAED,MAAM,gBAAgB,GAAG,gBAAC,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAErD,kBAAe,gBAAgB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const supportedVersionTargets: string[];
2
+ export declare const doctorHelpText = "Usage: ncu --doctor [-u] [options]\n\nIteratively installs upgrades and runs tests to identify breaking upgrades. Add \"-u\" to execute (modifies your package file, lock file, and node_modules).\n\nTo be more precise:\n1. Runs \"npm install\" and \"npm test\" to ensure tests are currently passing.\n2. Runs \"ncu -u\" to optimistically upgrade all dependencies.\n3. If tests pass, hurray!\n4. If tests fail, restores package file and lock file.\n5. For each dependency, install upgrade and run tests.\n6. Prints broken upgrades with test error.\n7. Saves working upgrades to package.json.\n\nExample:\n\n$ ncu --doctor -u\nRunning tests before upgrading\nnpm install\nnpm run test\nUpgrading all dependencies and re-running tests\nncu -u\nnpm install\nnpm run test\nTests failed\nIdentifying broken dependencies\nnpm install\nnpm install --no-save react@16.0.0\nnpm run test\n \u2713 react 15.0.0 \u2192 16.0.0\nnpm install --no-save react-redux@7.0.0\nnpm run test\n \u2717 react-redux 6.0.0 \u2192 7.0.0\n\n/projects/myproject/test.js:13\n throw new Error('Test failed!')\n ^\n\nnpm install --no-save react-dnd@11.1.3\nnpm run test\n \u2713 react-dnd 10.0.0 \u2192 11.1.3\nSaving partially upgraded package.json\n";
3
+ export declare const deepPatternPrefix = "**/";
@@ -1,6 +1,8 @@
1
- const supportedVersionTargets = ['latest', 'newest', 'greatest', 'minor', 'patch']
2
-
3
- const doctorHelpText = `Usage: ncu --doctor [-u] [options]
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deepPatternPrefix = exports.doctorHelpText = exports.supportedVersionTargets = void 0;
4
+ exports.supportedVersionTargets = ['latest', 'newest', 'greatest', 'minor', 'patch'];
5
+ exports.doctorHelpText = `Usage: ncu --doctor [-u] [options]
4
6
 
5
7
  Iteratively installs upgrades and runs tests to identify breaking upgrades. Add "-u" to execute (modifies your package file, lock file, and node_modules).
6
8
 
@@ -41,8 +43,6 @@ npm install --no-save react-dnd@11.1.3
41
43
  npm run test
42
44
  ✓ react-dnd 10.0.0 → 11.1.3
43
45
  Saving partially upgraded package.json
44
- `
45
-
46
- const deepPatternPrefix = '**/'
47
-
48
- module.exports = { deepPatternPrefix, doctorHelpText, supportedVersionTargets }
46
+ `;
47
+ exports.deepPatternPrefix = '**/';
48
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAE5E,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC7B,CAAA;AAEY,QAAA,iBAAiB,GAAG,KAAK,CAAA"}
@@ -0,0 +1,3 @@
1
+ export = doctor;
2
+ /** Iteratively installs upgrades and runs tests to identify breaking upgrades. */
3
+ declare function doctor(run: any, options: any): Promise<void>;