@angular/cli 8.3.4 → 8.3.8
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/bin/postinstall/analytics-prompt.js +8 -10
- package/commands/add-impl.js +1 -1
- package/commands/update-impl.js +29 -16
- package/lib/config/schema.json +25 -2
- package/models/parser.js +1 -1
- package/package.json +11 -10
- package/utilities/package-metadata.d.ts +1 -1
- package/utilities/package-metadata.js +6 -3
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
// This file is
|
|
2
|
+
// This file is ES5 because it needs to be executed as is.
|
|
3
3
|
|
|
4
|
-
if ('NG_CLI_ANALYTICS'
|
|
4
|
+
if (process.env['NG_CLI_ANALYTICS'] !== undefined) {
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const analytics = require('../../models/analytics');
|
|
8
|
+
try {
|
|
9
|
+
var analytics = require('../../models/analytics');
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})();
|
|
11
|
+
if (!analytics.hasGlobalAnalyticsConfiguration()) {
|
|
12
|
+
analytics.promptGlobalAnalytics().catch(function() { });
|
|
13
|
+
}
|
|
14
|
+
} catch (_) {}
|
package/commands/add-impl.js
CHANGED
|
@@ -75,7 +75,7 @@ class AddCommand extends schematic_command_1.SchematicCommand {
|
|
|
75
75
|
}
|
|
76
76
|
else if (!latestManifest || (await this.hasMismatchedPeer(latestManifest))) {
|
|
77
77
|
// 'latest' is invalid so search for most recent matching package
|
|
78
|
-
const versionManifests =
|
|
78
|
+
const versionManifests = Object.values(packageMetadata.versions).filter(value => !semver_1.prerelease(value.version));
|
|
79
79
|
versionManifests.sort((a, b) => semver_1.rcompare(a.version, b.version, true));
|
|
80
80
|
let newIdentifier;
|
|
81
81
|
for (const versionManifest of versionManifests) {
|
package/commands/update-impl.js
CHANGED
|
@@ -10,12 +10,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
const child_process_1 = require("child_process");
|
|
11
11
|
const fs = require("fs");
|
|
12
12
|
const path = require("path");
|
|
13
|
-
const semver = require("semver");
|
|
14
13
|
const schematic_command_1 = require("../models/schematic-command");
|
|
15
14
|
const package_manager_1 = require("../utilities/package-manager");
|
|
16
15
|
const package_metadata_1 = require("../utilities/package-metadata");
|
|
17
16
|
const package_tree_1 = require("../utilities/package-tree");
|
|
18
17
|
const npa = require('npm-package-arg');
|
|
18
|
+
const pickManifest = require('npm-pick-manifest');
|
|
19
19
|
const oldConfigFileNames = ['.angular-cli.json', 'angular-cli.json'];
|
|
20
20
|
class UpdateCommand extends schematic_command_1.SchematicCommand {
|
|
21
21
|
constructor() {
|
|
@@ -206,9 +206,7 @@ class UpdateCommand extends schematic_command_1.SchematicCommand {
|
|
|
206
206
|
return 1;
|
|
207
207
|
}
|
|
208
208
|
// If a specific version is requested and matches the installed version, skip.
|
|
209
|
-
if (pkg.type === 'version' &&
|
|
210
|
-
typeof node === 'object' &&
|
|
211
|
-
node.package.version === pkg.fetchSpec) {
|
|
209
|
+
if (pkg.type === 'version' && node.package.version === pkg.fetchSpec) {
|
|
212
210
|
this.logger.info(`Package '${pkg.name}' is already at '${pkg.fetchSpec}'.`);
|
|
213
211
|
continue;
|
|
214
212
|
}
|
|
@@ -234,24 +232,39 @@ class UpdateCommand extends schematic_command_1.SchematicCommand {
|
|
|
234
232
|
// Try to find a package version based on the user requested package specifier
|
|
235
233
|
// registry specifier types are either version, range, or tag
|
|
236
234
|
let manifest;
|
|
237
|
-
if (requestIdentifier.type === 'version'
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
235
|
+
if (requestIdentifier.type === 'version' ||
|
|
236
|
+
requestIdentifier.type === 'range' ||
|
|
237
|
+
requestIdentifier.type === 'tag') {
|
|
238
|
+
try {
|
|
239
|
+
manifest = pickManifest(metadata, requestIdentifier.fetchSpec);
|
|
240
|
+
}
|
|
241
|
+
catch (e) {
|
|
242
|
+
if (e.code === 'ETARGET') {
|
|
243
|
+
// If not found and next was used and user did not provide a specifier, try latest.
|
|
244
|
+
// Package may not have a next tag.
|
|
245
|
+
if (requestIdentifier.type === 'tag' &&
|
|
246
|
+
requestIdentifier.fetchSpec === 'next' &&
|
|
247
|
+
!requestIdentifier.rawSpec) {
|
|
248
|
+
try {
|
|
249
|
+
manifest = pickManifest(metadata, 'latest');
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
if (e.code !== 'ETARGET' && e.code !== 'ENOVERSIONS') {
|
|
253
|
+
throw e;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
else if (e.code !== 'ENOVERSIONS') {
|
|
259
|
+
throw e;
|
|
260
|
+
}
|
|
244
261
|
}
|
|
245
|
-
}
|
|
246
|
-
else if (requestIdentifier.type === 'tag') {
|
|
247
|
-
manifest = metadata.tags[requestIdentifier.fetchSpec];
|
|
248
262
|
}
|
|
249
263
|
if (!manifest) {
|
|
250
264
|
this.logger.error(`Package specified by '${requestIdentifier.raw}' does not exist within the registry.`);
|
|
251
265
|
return 1;
|
|
252
266
|
}
|
|
253
|
-
if (
|
|
254
|
-
(typeof node === 'object' && manifest.version === node.package.version)) {
|
|
267
|
+
if (manifest.version === node.package.version) {
|
|
255
268
|
this.logger.info(`Package '${packageName}' is already up to date.`);
|
|
256
269
|
continue;
|
|
257
270
|
}
|
package/lib/config/schema.json
CHANGED
|
@@ -847,8 +847,31 @@
|
|
|
847
847
|
"default": false
|
|
848
848
|
},
|
|
849
849
|
"index": {
|
|
850
|
-
"
|
|
851
|
-
"
|
|
850
|
+
"description": "Configures the generation of the application's HTML index.",
|
|
851
|
+
"oneOf": [
|
|
852
|
+
{
|
|
853
|
+
"type": "string",
|
|
854
|
+
"description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path."
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"type": "object",
|
|
858
|
+
"description": "",
|
|
859
|
+
"properties": {
|
|
860
|
+
"input": {
|
|
861
|
+
"type": "string",
|
|
862
|
+
"minLength": 1,
|
|
863
|
+
"description": "The path of a file to use for the application's generated HTML index."
|
|
864
|
+
},
|
|
865
|
+
"output": {
|
|
866
|
+
"type": "string",
|
|
867
|
+
"minLength": 1,
|
|
868
|
+
"default": "index.html",
|
|
869
|
+
"description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path."
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"required": ["input"]
|
|
873
|
+
}
|
|
874
|
+
]
|
|
852
875
|
},
|
|
853
876
|
"statsJson": {
|
|
854
877
|
"type": "boolean",
|
package/models/parser.js
CHANGED
|
@@ -164,7 +164,7 @@ function _assignOption(arg, nextArg, { options, parsedOptions, leftovers, ignore
|
|
|
164
164
|
const v = _coerce(value, option, parsedOptions[option.name]);
|
|
165
165
|
if (v !== undefined) {
|
|
166
166
|
if (parsedOptions[option.name] !== v) {
|
|
167
|
-
if (parsedOptions[option.name] !== undefined) {
|
|
167
|
+
if (parsedOptions[option.name] !== undefined && option.type !== interface_1.OptionType.Array) {
|
|
168
168
|
warnings.push(`Option ${JSON.stringify(option.name)} was already specified with value `
|
|
169
169
|
+ `${JSON.stringify(parsedOptions[option.name])}. The new value ${JSON.stringify(v)} `
|
|
170
170
|
+ `will override it.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.8",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -28,17 +28,18 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/angular/angular-cli",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@angular-devkit/architect": "0.803.
|
|
32
|
-
"@angular-devkit/core": "8.3.
|
|
33
|
-
"@angular-devkit/schematics": "8.3.
|
|
34
|
-
"@schematics/angular": "8.3.
|
|
35
|
-
"@schematics/update": "0.803.
|
|
31
|
+
"@angular-devkit/architect": "0.803.8",
|
|
32
|
+
"@angular-devkit/core": "8.3.8",
|
|
33
|
+
"@angular-devkit/schematics": "8.3.8",
|
|
34
|
+
"@schematics/angular": "8.3.8",
|
|
35
|
+
"@schematics/update": "0.803.8",
|
|
36
36
|
"@yarnpkg/lockfile": "1.1.0",
|
|
37
37
|
"ansi-colors": "4.1.1",
|
|
38
38
|
"debug": "^4.1.1",
|
|
39
39
|
"ini": "1.3.5",
|
|
40
40
|
"inquirer": "6.5.1",
|
|
41
41
|
"npm-package-arg": "6.1.0",
|
|
42
|
+
"npm-pick-manifest": "3.0.2",
|
|
42
43
|
"open": "6.4.0",
|
|
43
44
|
"pacote": "9.5.5",
|
|
44
45
|
"read-package-tree": "5.3.1",
|
|
@@ -50,10 +51,10 @@
|
|
|
50
51
|
"ng-update": {
|
|
51
52
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
52
53
|
"packageGroup": {
|
|
53
|
-
"@angular/cli": "8.3.
|
|
54
|
-
"@angular-devkit/build-angular": "0.803.
|
|
55
|
-
"@angular-devkit/build-ng-packagr": "0.803.
|
|
56
|
-
"@angular-devkit/build-webpack": "0.803.
|
|
54
|
+
"@angular/cli": "8.3.8",
|
|
55
|
+
"@angular-devkit/build-angular": "0.803.8",
|
|
56
|
+
"@angular-devkit/build-ng-packagr": "0.803.8",
|
|
57
|
+
"@angular-devkit/build-webpack": "0.803.8"
|
|
57
58
|
}
|
|
58
59
|
},
|
|
59
60
|
"engines": {
|
|
@@ -41,7 +41,7 @@ export interface PackageMetadata {
|
|
|
41
41
|
tags: {
|
|
42
42
|
[tag: string]: PackageManifest | undefined;
|
|
43
43
|
};
|
|
44
|
-
versions:
|
|
44
|
+
versions: Record<string, PackageManifest>;
|
|
45
45
|
}
|
|
46
46
|
export declare function fetchPackageMetadata(name: string, logger: logging.LoggerApi, options?: {
|
|
47
47
|
registry?: string;
|
|
@@ -107,16 +107,19 @@ async function fetchPackageMetadata(name, logger, options) {
|
|
|
107
107
|
const metadata = {
|
|
108
108
|
name: response.name,
|
|
109
109
|
tags: {},
|
|
110
|
-
versions:
|
|
110
|
+
versions: {},
|
|
111
111
|
};
|
|
112
112
|
if (response.versions) {
|
|
113
113
|
for (const [version, manifest] of Object.entries(response.versions)) {
|
|
114
|
-
metadata.versions
|
|
114
|
+
metadata.versions[version] = normalizeManifest(manifest);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
if (response['dist-tags']) {
|
|
118
|
+
// Store this for use with other npm utility packages
|
|
119
|
+
// tslint:disable-next-line: no-any
|
|
120
|
+
metadata['dist-tags'] = response['dist-tags'];
|
|
118
121
|
for (const [tag, version] of Object.entries(response['dist-tags'])) {
|
|
119
|
-
const manifest = metadata.versions
|
|
122
|
+
const manifest = metadata.versions[version];
|
|
120
123
|
if (manifest) {
|
|
121
124
|
metadata.tags[tag] = manifest;
|
|
122
125
|
}
|