@angular/cli 15.0.2 → 15.1.0-next.1
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/lib/config/schema.json +61 -1
- package/lib/config/workspace-schema.d.ts +13 -1
- package/package.json +12 -12
- package/src/commands/add/cli.js +19 -15
- package/src/commands/update/cli.js +2 -2
package/lib/config/schema.json
CHANGED
|
@@ -1097,9 +1097,14 @@
|
|
|
1097
1097
|
"$source": "projectName"
|
|
1098
1098
|
}
|
|
1099
1099
|
},
|
|
1100
|
+
"functional": {
|
|
1101
|
+
"type": "boolean",
|
|
1102
|
+
"description": "Specifies whether to generate a guard as a function.",
|
|
1103
|
+
"default": false
|
|
1104
|
+
},
|
|
1100
1105
|
"implements": {
|
|
1101
1106
|
"type": "array",
|
|
1102
|
-
"description": "Specifies which
|
|
1107
|
+
"description": "Specifies which type of guard to create.",
|
|
1103
1108
|
"uniqueItems": true,
|
|
1104
1109
|
"minItems": 1,
|
|
1105
1110
|
"items": {
|
|
@@ -1157,6 +1162,11 @@
|
|
|
1157
1162
|
"type": "boolean",
|
|
1158
1163
|
"description": "Do not create \"spec.ts\" test files for the new interceptor.",
|
|
1159
1164
|
"default": false
|
|
1165
|
+
},
|
|
1166
|
+
"functional": {
|
|
1167
|
+
"type": "boolean",
|
|
1168
|
+
"description": "Creates the interceptor as a `HttpInterceptorFn`.",
|
|
1169
|
+
"default": false
|
|
1160
1170
|
}
|
|
1161
1171
|
}
|
|
1162
1172
|
},
|
|
@@ -1485,6 +1495,11 @@
|
|
|
1485
1495
|
"description": "When true (the default), creates the new files at the top level of the current project.",
|
|
1486
1496
|
"default": true
|
|
1487
1497
|
},
|
|
1498
|
+
"functional": {
|
|
1499
|
+
"type": "boolean",
|
|
1500
|
+
"description": "Creates the resolver as a `ResolveFn`.",
|
|
1501
|
+
"default": false
|
|
1502
|
+
},
|
|
1488
1503
|
"path": {
|
|
1489
1504
|
"type": "string",
|
|
1490
1505
|
"format": "path",
|
|
@@ -3236,6 +3251,14 @@
|
|
|
3236
3251
|
"title": "Universal Target",
|
|
3237
3252
|
"type": "object",
|
|
3238
3253
|
"properties": {
|
|
3254
|
+
"assets": {
|
|
3255
|
+
"type": "array",
|
|
3256
|
+
"description": "List of static application assets.",
|
|
3257
|
+
"default": [],
|
|
3258
|
+
"items": {
|
|
3259
|
+
"$ref": "#/definitions/AngularDevkitBuildAngularBuildersServerSchema/definitions/assetPattern"
|
|
3260
|
+
}
|
|
3261
|
+
},
|
|
3239
3262
|
"main": {
|
|
3240
3263
|
"type": "string",
|
|
3241
3264
|
"description": "The name of the main entry-point file."
|
|
@@ -3460,6 +3483,43 @@
|
|
|
3460
3483
|
},
|
|
3461
3484
|
"additionalProperties": false,
|
|
3462
3485
|
"definitions": {
|
|
3486
|
+
"assetPattern": {
|
|
3487
|
+
"oneOf": [
|
|
3488
|
+
{
|
|
3489
|
+
"type": "object",
|
|
3490
|
+
"properties": {
|
|
3491
|
+
"followSymlinks": {
|
|
3492
|
+
"type": "boolean",
|
|
3493
|
+
"default": false,
|
|
3494
|
+
"description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
|
|
3495
|
+
},
|
|
3496
|
+
"glob": {
|
|
3497
|
+
"type": "string",
|
|
3498
|
+
"description": "The pattern to match."
|
|
3499
|
+
},
|
|
3500
|
+
"input": {
|
|
3501
|
+
"type": "string",
|
|
3502
|
+
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
3503
|
+
},
|
|
3504
|
+
"ignore": {
|
|
3505
|
+
"description": "An array of globs to ignore.",
|
|
3506
|
+
"type": "array",
|
|
3507
|
+
"items": {
|
|
3508
|
+
"type": "string"
|
|
3509
|
+
}
|
|
3510
|
+
},
|
|
3511
|
+
"output": {
|
|
3512
|
+
"type": "string",
|
|
3513
|
+
"description": "Absolute path within the output."
|
|
3514
|
+
}
|
|
3515
|
+
},
|
|
3516
|
+
"additionalProperties": false
|
|
3517
|
+
},
|
|
3518
|
+
{
|
|
3519
|
+
"type": "string"
|
|
3520
|
+
}
|
|
3521
|
+
]
|
|
3522
|
+
},
|
|
3463
3523
|
"fileReplacement": {
|
|
3464
3524
|
"oneOf": [
|
|
3465
3525
|
{
|
|
@@ -398,7 +398,11 @@ export interface AngularGuardOptionsSchema {
|
|
|
398
398
|
*/
|
|
399
399
|
flat?: boolean;
|
|
400
400
|
/**
|
|
401
|
-
* Specifies
|
|
401
|
+
* Specifies whether to generate a guard as a function.
|
|
402
|
+
*/
|
|
403
|
+
functional?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* Specifies which type of guard to create.
|
|
402
406
|
*/
|
|
403
407
|
implements?: Implement[];
|
|
404
408
|
/**
|
|
@@ -434,6 +438,10 @@ export interface AngularInterceptorOptionsSchema {
|
|
|
434
438
|
* When true (the default), creates files at the top level of the project.
|
|
435
439
|
*/
|
|
436
440
|
flat?: boolean;
|
|
441
|
+
/**
|
|
442
|
+
* Creates the interceptor as a `HttpInterceptorFn`.
|
|
443
|
+
*/
|
|
444
|
+
functional?: boolean;
|
|
437
445
|
/**
|
|
438
446
|
* The name of the interceptor.
|
|
439
447
|
*/
|
|
@@ -655,6 +663,10 @@ export interface AngularResolverOptionsSchema {
|
|
|
655
663
|
* When true (the default), creates the new files at the top level of the current project.
|
|
656
664
|
*/
|
|
657
665
|
flat?: boolean;
|
|
666
|
+
/**
|
|
667
|
+
* Creates the resolver as a `ResolveFn`.
|
|
668
|
+
*/
|
|
669
|
+
functional?: boolean;
|
|
658
670
|
/**
|
|
659
671
|
* The name of the new resolver.
|
|
660
672
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.1.0-next.1",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.
|
|
29
|
-
"@angular-devkit/core": "15.0.
|
|
30
|
-
"@angular-devkit/schematics": "15.0.
|
|
31
|
-
"@schematics/angular": "15.0.
|
|
28
|
+
"@angular-devkit/architect": "0.1501.0-next.1",
|
|
29
|
+
"@angular-devkit/core": "15.1.0-next.1",
|
|
30
|
+
"@angular-devkit/schematics": "15.1.0-next.1",
|
|
31
|
+
"@schematics/angular": "15.1.0-next.1",
|
|
32
32
|
"@yarnpkg/lockfile": "1.1.0",
|
|
33
33
|
"ansi-colors": "4.1.3",
|
|
34
34
|
"ini": "3.0.1",
|
|
35
35
|
"inquirer": "8.2.4",
|
|
36
36
|
"jsonc-parser": "3.2.0",
|
|
37
|
-
"npm-package-arg": "
|
|
37
|
+
"npm-package-arg": "10.0.0",
|
|
38
38
|
"npm-pick-manifest": "8.0.1",
|
|
39
39
|
"open": "8.4.0",
|
|
40
40
|
"ora": "5.4.1",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"ng-update": {
|
|
48
48
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
49
49
|
"packageGroup": {
|
|
50
|
-
"@angular/cli": "15.0.
|
|
51
|
-
"@angular-devkit/architect": "0.
|
|
52
|
-
"@angular-devkit/build-angular": "15.0.
|
|
53
|
-
"@angular-devkit/build-webpack": "0.
|
|
54
|
-
"@angular-devkit/core": "15.0.
|
|
55
|
-
"@angular-devkit/schematics": "15.0.
|
|
50
|
+
"@angular/cli": "15.1.0-next.1",
|
|
51
|
+
"@angular-devkit/architect": "0.1501.0-next.1",
|
|
52
|
+
"@angular-devkit/build-angular": "15.1.0-next.1",
|
|
53
|
+
"@angular-devkit/build-webpack": "0.1501.0-next.1",
|
|
54
|
+
"@angular-devkit/core": "15.1.0-next.1",
|
|
55
|
+
"@angular-devkit/schematics": "15.1.0-next.1"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
package/src/commands/add/cli.js
CHANGED
|
@@ -113,7 +113,9 @@ class AddCommandModule extends schematics_command_module_1.SchematicsCommandModu
|
|
|
113
113
|
spinner.start('Determining package manager...');
|
|
114
114
|
const usingYarn = packageManager.name === workspace_schema_1.PackageManager.Yarn;
|
|
115
115
|
spinner.info(`Using package manager: ${color_1.colors.grey(packageManager.name)}`);
|
|
116
|
-
if (packageIdentifier.name &&
|
|
116
|
+
if (packageIdentifier.name &&
|
|
117
|
+
packageIdentifier.type === 'range' &&
|
|
118
|
+
packageIdentifier.rawSpec === '*') {
|
|
117
119
|
// only package name provided; search for viable version
|
|
118
120
|
// plus special cases for packages that did not have peer deps setup
|
|
119
121
|
spinner.start('Searching for compatible package version...');
|
|
@@ -241,22 +243,24 @@ class AddCommandModule extends schematics_command_module_1.SchematicsCommandModu
|
|
|
241
243
|
if (!packageIdentifier.name) {
|
|
242
244
|
return false;
|
|
243
245
|
}
|
|
244
|
-
let validVersion = false;
|
|
245
246
|
const installedVersion = await this.findProjectVersion(packageIdentifier.name);
|
|
246
|
-
if (installedVersion) {
|
|
247
|
-
|
|
248
|
-
validVersion = (0, semver_1.satisfies)(installedVersion, packageIdentifier.fetchSpec);
|
|
249
|
-
}
|
|
250
|
-
else if (packageIdentifier.type === 'version') {
|
|
251
|
-
const v1 = (0, semver_1.valid)(packageIdentifier.fetchSpec);
|
|
252
|
-
const v2 = (0, semver_1.valid)(installedVersion);
|
|
253
|
-
validVersion = v1 !== null && v1 === v2;
|
|
254
|
-
}
|
|
255
|
-
else if (!packageIdentifier.rawSpec) {
|
|
256
|
-
validVersion = true;
|
|
257
|
-
}
|
|
247
|
+
if (!installedVersion) {
|
|
248
|
+
return false;
|
|
258
249
|
}
|
|
259
|
-
|
|
250
|
+
if (packageIdentifier.rawSpec === '*') {
|
|
251
|
+
return true;
|
|
252
|
+
}
|
|
253
|
+
if (packageIdentifier.type === 'range' &&
|
|
254
|
+
packageIdentifier.fetchSpec &&
|
|
255
|
+
packageIdentifier.fetchSpec !== '*') {
|
|
256
|
+
return (0, semver_1.satisfies)(installedVersion, packageIdentifier.fetchSpec);
|
|
257
|
+
}
|
|
258
|
+
if (packageIdentifier.type === 'version') {
|
|
259
|
+
const v1 = (0, semver_1.valid)(packageIdentifier.fetchSpec);
|
|
260
|
+
const v2 = (0, semver_1.valid)(installedVersion);
|
|
261
|
+
return v1 !== null && v1 === v2;
|
|
262
|
+
}
|
|
263
|
+
return false;
|
|
260
264
|
}
|
|
261
265
|
async getCollectionName() {
|
|
262
266
|
const [, collectionName] = this.context.args.positional;
|
|
@@ -171,11 +171,11 @@ class UpdateCommandModule extends command_module_1.CommandModule {
|
|
|
171
171
|
logger.error(`Duplicate package '${packageIdentifier.name}' specified.`);
|
|
172
172
|
return 1;
|
|
173
173
|
}
|
|
174
|
-
if (options.migrateOnly && packageIdentifier.rawSpec) {
|
|
174
|
+
if (options.migrateOnly && packageIdentifier.rawSpec !== '*') {
|
|
175
175
|
logger.warn('Package specifier has no effect when using "migrate-only" option.');
|
|
176
176
|
}
|
|
177
177
|
// If next option is used and no specifier supplied, use next tag
|
|
178
|
-
if (options.next &&
|
|
178
|
+
if (options.next && packageIdentifier.rawSpec === '*') {
|
|
179
179
|
packageIdentifier.fetchSpec = 'next';
|
|
180
180
|
}
|
|
181
181
|
packages.push(packageIdentifier);
|