@angular/cli 14.2.5 → 14.2.6
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.6",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.1402.
|
|
29
|
-
"@angular-devkit/core": "14.2.
|
|
30
|
-
"@angular-devkit/schematics": "14.2.
|
|
31
|
-
"@schematics/angular": "14.2.
|
|
28
|
+
"@angular-devkit/architect": "0.1402.6",
|
|
29
|
+
"@angular-devkit/core": "14.2.6",
|
|
30
|
+
"@angular-devkit/schematics": "14.2.6",
|
|
31
|
+
"@schematics/angular": "14.2.6",
|
|
32
32
|
"@yarnpkg/lockfile": "1.1.0",
|
|
33
33
|
"ansi-colors": "4.1.3",
|
|
34
34
|
"debug": "4.3.4",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"ng-update": {
|
|
50
50
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
51
51
|
"packageGroup": {
|
|
52
|
-
"@angular/cli": "14.2.
|
|
53
|
-
"@angular-devkit/architect": "0.1402.
|
|
54
|
-
"@angular-devkit/build-angular": "14.2.
|
|
55
|
-
"@angular-devkit/build-webpack": "0.1402.
|
|
56
|
-
"@angular-devkit/core": "14.2.
|
|
57
|
-
"@angular-devkit/schematics": "14.2.
|
|
52
|
+
"@angular/cli": "14.2.6",
|
|
53
|
+
"@angular-devkit/architect": "0.1402.6",
|
|
54
|
+
"@angular-devkit/build-angular": "14.2.6",
|
|
55
|
+
"@angular-devkit/build-webpack": "0.1402.6",
|
|
56
|
+
"@angular-devkit/core": "14.2.6",
|
|
57
|
+
"@angular-devkit/schematics": "14.2.6"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
@@ -144,11 +144,12 @@ class UpdateCommandModule extends command_module_1.CommandModule {
|
|
|
144
144
|
.strict();
|
|
145
145
|
}
|
|
146
146
|
async run(options) {
|
|
147
|
-
var _a, _b;
|
|
147
|
+
var _a, _b, _c;
|
|
148
148
|
const { logger, packageManager } = this.context;
|
|
149
149
|
packageManager.ensureCompatibility();
|
|
150
150
|
// Check if the current installed CLI version is older than the latest compatible version.
|
|
151
|
-
|
|
151
|
+
// Skip when running `ng update` without a package name as this will not trigger an actual update.
|
|
152
|
+
if (!environment_options_1.disableVersionCheck && ((_a = options.packages) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
152
153
|
const cliVersionToInstall = await this.checkCLIVersion(options.packages, options.verbose, options.next);
|
|
153
154
|
if (cliVersionToInstall) {
|
|
154
155
|
logger.warn('The installed Angular CLI version is outdated.\n' +
|
|
@@ -157,7 +158,7 @@ class UpdateCommandModule extends command_module_1.CommandModule {
|
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
const packages = [];
|
|
160
|
-
for (const request of (
|
|
161
|
+
for (const request of (_b = options.packages) !== null && _b !== void 0 ? _b : []) {
|
|
161
162
|
try {
|
|
162
163
|
const packageIdentifier = (0, npm_package_arg_1.default)(request);
|
|
163
164
|
// only registry identifiers are supported
|
|
@@ -209,7 +210,7 @@ class UpdateCommandModule extends command_module_1.CommandModule {
|
|
|
209
210
|
return success ? 0 : 1;
|
|
210
211
|
}
|
|
211
212
|
return options.migrateOnly
|
|
212
|
-
? this.migrateOnly(workflow, ((
|
|
213
|
+
? this.migrateOnly(workflow, ((_c = options.packages) !== null && _c !== void 0 ? _c : [])[0], rootDependencies, options)
|
|
213
214
|
: this.updatePackagesAndMigrate(workflow, rootDependencies, options, packages);
|
|
214
215
|
}
|
|
215
216
|
async executeSchematic(workflow, collection, schematic, options = {}) {
|
|
@@ -21,10 +21,10 @@ export declare function considerSettingUpAutocompletion(command: string, logger:
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function initializeAutocomplete(): Promise<string>;
|
|
23
23
|
/**
|
|
24
|
-
* Returns whether the user has a global CLI install
|
|
24
|
+
* Returns whether the user has a global CLI install.
|
|
25
25
|
* Execution from `npx` is *not* considered a global CLI install.
|
|
26
26
|
*
|
|
27
27
|
* This does *not* mean the current execution is from a global CLI install, only that a global
|
|
28
28
|
* install exists on the system.
|
|
29
29
|
*/
|
|
30
|
-
export declare function hasGlobalCliInstall(): Promise<boolean
|
|
30
|
+
export declare function hasGlobalCliInstall(): Promise<boolean>;
|
|
@@ -83,7 +83,7 @@ Appended \`source <(ng completion script)\` to \`${rcFile}\`. Restart your termi
|
|
|
83
83
|
|
|
84
84
|
${color_1.colors.yellow(`source <(ng completion script)`)}
|
|
85
85
|
`.trim());
|
|
86
|
-
if ((await hasGlobalCliInstall())
|
|
86
|
+
if (!(await hasGlobalCliInstall())) {
|
|
87
87
|
logger.warn('Setup completed successfully, but there does not seem to be a global install of the' +
|
|
88
88
|
' Angular CLI. For autocompletion to work, the CLI will need to be on your `$PATH`, which' +
|
|
89
89
|
' is typically done with the `-g` flag in `npm install -g @angular/cli`.' +
|
|
@@ -234,27 +234,26 @@ function getShellRunCommandCandidates(shell, home) {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
|
-
* Returns whether the user has a global CLI install
|
|
237
|
+
* Returns whether the user has a global CLI install.
|
|
238
238
|
* Execution from `npx` is *not* considered a global CLI install.
|
|
239
239
|
*
|
|
240
240
|
* This does *not* mean the current execution is from a global CLI install, only that a global
|
|
241
241
|
* install exists on the system.
|
|
242
242
|
*/
|
|
243
|
-
|
|
244
|
-
var _a;
|
|
243
|
+
function hasGlobalCliInstall() {
|
|
245
244
|
// List all binaries with the `ng` name on the user's `$PATH`.
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
245
|
+
return new Promise((resolve) => {
|
|
246
|
+
(0, child_process_1.execFile)('which', ['-a', 'ng'], (error, stdout) => {
|
|
247
|
+
if (error) {
|
|
248
|
+
// No instances of `ng` on the user's `$PATH`
|
|
249
|
+
// `which` returns exit code 2 if an invalid option is specified and `-a` doesn't appear to be
|
|
250
|
+
// supported on all systems. Other exit codes mean unknown errors occurred. Can't tell whether
|
|
251
|
+
// CLI is globally installed, so treat this as inconclusive.
|
|
252
|
+
// `which` was killed by a signal and did not exit gracefully. Maybe it hung or something else
|
|
253
|
+
// went very wrong, so treat this as inconclusive.
|
|
254
|
+
resolve(false);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
258
257
|
// Successfully listed all `ng` binaries on the `$PATH`. Look for at least one line which is a
|
|
259
258
|
// global install. We can't easily identify global installs, but local installs are typically
|
|
260
259
|
// placed in `node_modules/.bin` by NPM / Yarn. `npx` also currently caches files at
|
|
@@ -267,19 +266,8 @@ async function hasGlobalCliInstall() {
|
|
|
267
266
|
const localInstall = grandparent.base === 'node_modules' && parent.base === '.bin';
|
|
268
267
|
return !localInstall;
|
|
269
268
|
});
|
|
270
|
-
return hasGlobalInstall;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return false;
|
|
274
|
-
case null:
|
|
275
|
-
// `which` was killed by a signal and did not exit gracefully. Maybe it hung or something else
|
|
276
|
-
// went very wrong, so treat this as inconclusive.
|
|
277
|
-
return undefined;
|
|
278
|
-
default:
|
|
279
|
-
// `which` returns exit code 2 if an invalid option is specified and `-a` doesn't appear to be
|
|
280
|
-
// supported on all systems. Other exit codes mean unknown errors occurred. Can't tell whether
|
|
281
|
-
// CLI is globally installed, so treat this as inconclusive.
|
|
282
|
-
return undefined;
|
|
283
|
-
}
|
|
269
|
+
return resolve(hasGlobalInstall);
|
|
270
|
+
});
|
|
271
|
+
});
|
|
284
272
|
}
|
|
285
273
|
exports.hasGlobalCliInstall = hasGlobalCliInstall;
|
|
@@ -222,16 +222,11 @@ async function getNpmPackageJson(packageName, logger, options = {}) {
|
|
|
222
222
|
const { usingYarn = false, verbose = false, registry } = options;
|
|
223
223
|
ensureNpmrc(logger, usingYarn, verbose);
|
|
224
224
|
const { packument } = await Promise.resolve().then(() => __importStar(require('pacote')));
|
|
225
|
-
const
|
|
225
|
+
const response = packument(packageName, {
|
|
226
226
|
fullMetadata: true,
|
|
227
227
|
...npmrc,
|
|
228
228
|
...(registry ? { registry } : {}),
|
|
229
229
|
});
|
|
230
|
-
// TODO: find some way to test this
|
|
231
|
-
const response = resultPromise.catch((err) => {
|
|
232
|
-
logger.warn(err.message || err);
|
|
233
|
-
return { requestedName: packageName };
|
|
234
|
-
});
|
|
235
230
|
npmPackageJsonCache.set(packageName, response);
|
|
236
231
|
return response;
|
|
237
232
|
}
|