@angular/cli 21.0.0-next.5 → 21.0.0-next.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.
Files changed (34) hide show
  1. package/lib/config/schema.json +140 -43
  2. package/lib/config/workspace-schema.d.ts +1 -0
  3. package/lib/config/workspace-schema.js +1 -0
  4. package/package.json +15 -15
  5. package/src/command-builder/utilities/json-schema.d.ts +13 -1
  6. package/src/command-builder/utilities/json-schema.js +179 -100
  7. package/src/commands/cache/info/cli.js +35 -11
  8. package/src/commands/version/cli.d.ts +3 -7
  9. package/src/commands/version/cli.js +44 -49
  10. package/src/commands/version/version-info.d.ts +18 -10
  11. package/src/commands/version/version-info.js +23 -48
  12. package/src/package-managers/discovery.d.ts +23 -0
  13. package/src/package-managers/discovery.js +109 -0
  14. package/src/package-managers/error.d.ts +31 -0
  15. package/src/package-managers/error.js +40 -0
  16. package/src/package-managers/factory.d.ts +25 -0
  17. package/src/package-managers/factory.js +122 -0
  18. package/src/package-managers/host.d.ts +64 -0
  19. package/src/package-managers/host.js +68 -0
  20. package/src/package-managers/logger.d.ts +27 -0
  21. package/src/package-managers/logger.js +9 -0
  22. package/src/package-managers/package-manager-descriptor.d.ts +204 -0
  23. package/src/package-managers/package-manager-descriptor.js +146 -0
  24. package/src/package-managers/package-manager.d.ts +144 -0
  25. package/src/package-managers/package-manager.js +302 -0
  26. package/src/package-managers/package-metadata.d.ts +85 -0
  27. package/src/package-managers/package-metadata.js +9 -0
  28. package/src/package-managers/package-tree.d.ts +23 -0
  29. package/src/package-managers/package-tree.js +9 -0
  30. package/src/package-managers/parsers.d.ts +92 -0
  31. package/src/package-managers/parsers.js +233 -0
  32. package/src/package-managers/testing/mock-host.d.ts +26 -0
  33. package/src/package-managers/testing/mock-host.js +52 -0
  34. package/src/utilities/version.js +1 -1
@@ -1848,7 +1848,8 @@
1848
1848
  "claude",
1849
1849
  "cursor",
1850
1850
  "jetbrains",
1851
- "windsurf"
1851
+ "windsurf",
1852
+ "agents"
1852
1853
  ]
1853
1854
  }
1854
1855
  },
@@ -4304,12 +4305,12 @@
4304
4305
  "properties": {
4305
4306
  "buildTarget": {
4306
4307
  "type": "string",
4307
- "description": "Specifies the build target to use for the unit test build in the format `project:target[:configuration]`. You can also pass a comma-separated list of configurations. Example: `project:target:production,staging`.",
4308
+ "description": "Specifies the build target to use for the unit test build in the format `project:target[:configuration]`. This defaults to the `build` target of the current project with the `development` configuration. You can also pass a comma-separated list of configurations. Example: `project:target:production,staging`.",
4308
4309
  "pattern": "^[^:\\s]*:[^:\\s]*(:[^\\s]+)?$"
4309
4310
  },
4310
4311
  "tsConfig": {
4311
4312
  "type": "string",
4312
- "description": "The path to the TypeScript configuration file, relative to the workspace root."
4313
+ "description": "The path to the TypeScript configuration file, relative to the workspace root. Defaults to `tsconfig.spec.json` in the project root if it exists. If not specified and the default does not exist, the `tsConfig` from the specified `buildTarget` will be used."
4313
4314
  },
4314
4315
  "runner": {
4315
4316
  "type": "string",
@@ -4327,6 +4328,11 @@
4327
4328
  },
4328
4329
  "minItems": 1
4329
4330
  },
4331
+ "browserViewport": {
4332
+ "description": "Specifies the browser viewport dimensions for browser-based tests in the format `widthxheight`.",
4333
+ "type": "string",
4334
+ "pattern": "^\\d+x\\d+$"
4335
+ },
4330
4336
  "include": {
4331
4337
  "type": "array",
4332
4338
  "items": {
@@ -4357,25 +4363,46 @@
4357
4363
  "description": "Enables debugging mode for tests, allowing the use of the Node Inspector.",
4358
4364
  "default": false
4359
4365
  },
4360
- "codeCoverage": {
4366
+ "coverage": {
4361
4367
  "type": "boolean",
4362
- "description": "Enables code coverage reporting for tests.",
4368
+ "description": "Enables coverage reporting for tests.",
4363
4369
  "default": false
4364
4370
  },
4365
- "codeCoverageExclude": {
4371
+ "coverageAll": {
4372
+ "type": "boolean",
4373
+ "description": "Includes all files that match the `coverageInclude` pattern in the coverage report, not just those touched by tests.",
4374
+ "default": true
4375
+ },
4376
+ "coverageInclude": {
4366
4377
  "type": "array",
4367
- "description": "Specifies glob patterns of files to exclude from the code coverage report.",
4378
+ "description": "Specifies glob patterns of files to include in the coverage report.",
4368
4379
  "items": {
4369
4380
  "type": "string"
4370
4381
  }
4371
4382
  },
4372
- "codeCoverageReporters": {
4383
+ "coverageExclude": {
4373
4384
  "type": "array",
4374
- "description": "Specifies the reporters to use for code coverage results. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'html', 'lcov', 'lcovonly', 'text', 'text-summary', 'cobertura', 'json', and 'json-summary'.",
4385
+ "description": "Specifies glob patterns of files to exclude from the coverage report.",
4386
+ "items": {
4387
+ "type": "string"
4388
+ }
4389
+ },
4390
+ "coverageReporters": {
4391
+ "type": "array",
4392
+ "description": "Specifies the reporters to use for coverage results. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'html', 'lcov', 'lcovonly', 'text', 'text-summary', 'cobertura', 'json', and 'json-summary'.",
4375
4393
  "items": {
4376
4394
  "oneOf": [
4377
4395
  {
4378
- "$ref": "#/definitions/AngularBuildBuildersUnitTestSchema/definitions/coverage-reporters"
4396
+ "enum": [
4397
+ "html",
4398
+ "lcov",
4399
+ "lcovonly",
4400
+ "text",
4401
+ "text-summary",
4402
+ "cobertura",
4403
+ "json",
4404
+ "json-summary"
4405
+ ]
4379
4406
  },
4380
4407
  {
4381
4408
  "type": "array",
@@ -4383,7 +4410,16 @@
4383
4410
  "maxItems": 2,
4384
4411
  "items": [
4385
4412
  {
4386
- "$ref": "#/definitions/AngularBuildBuildersUnitTestSchema/definitions/coverage-reporters"
4413
+ "enum": [
4414
+ "html",
4415
+ "lcov",
4416
+ "lcovonly",
4417
+ "text",
4418
+ "text-summary",
4419
+ "cobertura",
4420
+ "json",
4421
+ "json-summary"
4422
+ ]
4387
4423
  },
4388
4424
  {
4389
4425
  "type": "object"
@@ -4393,6 +4429,76 @@
4393
4429
  ]
4394
4430
  }
4395
4431
  },
4432
+ "coverageThresholds": {
4433
+ "type": "object",
4434
+ "description": "Specifies minimum coverage thresholds that must be met. If thresholds are not met, the builder will exit with an error.",
4435
+ "properties": {
4436
+ "perFile": {
4437
+ "type": "boolean",
4438
+ "description": "When true, thresholds are enforced for each file individually."
4439
+ },
4440
+ "statements": {
4441
+ "type": "number",
4442
+ "description": "Minimum percentage of statements covered."
4443
+ },
4444
+ "branches": {
4445
+ "type": "number",
4446
+ "description": "Minimum percentage of branches covered."
4447
+ },
4448
+ "functions": {
4449
+ "type": "number",
4450
+ "description": "Minimum percentage of functions covered."
4451
+ },
4452
+ "lines": {
4453
+ "type": "number",
4454
+ "description": "Minimum percentage of lines covered."
4455
+ }
4456
+ },
4457
+ "additionalProperties": false
4458
+ },
4459
+ "coverageWatermarks": {
4460
+ "type": "object",
4461
+ "description": "Specifies coverage watermarks for the HTML reporter. These determine the color coding for high, medium, and low coverage.",
4462
+ "properties": {
4463
+ "statements": {
4464
+ "type": "array",
4465
+ "description": "The high and low watermarks for statements coverage. `[low, high]`",
4466
+ "items": {
4467
+ "type": "number"
4468
+ },
4469
+ "minItems": 2,
4470
+ "maxItems": 2
4471
+ },
4472
+ "branches": {
4473
+ "type": "array",
4474
+ "description": "The high and low watermarks for branches coverage. `[low, high]`",
4475
+ "items": {
4476
+ "type": "number"
4477
+ },
4478
+ "minItems": 2,
4479
+ "maxItems": 2
4480
+ },
4481
+ "functions": {
4482
+ "type": "array",
4483
+ "description": "The high and low watermarks for functions coverage. `[low, high]`",
4484
+ "items": {
4485
+ "type": "number"
4486
+ },
4487
+ "minItems": 2,
4488
+ "maxItems": 2
4489
+ },
4490
+ "lines": {
4491
+ "type": "array",
4492
+ "description": "The high and low watermarks for lines coverage. `[low, high]`",
4493
+ "items": {
4494
+ "type": "number"
4495
+ },
4496
+ "minItems": 2,
4497
+ "maxItems": 2
4498
+ }
4499
+ },
4500
+ "additionalProperties": false
4501
+ },
4396
4502
  "reporters": {
4397
4503
  "type": "array",
4398
4504
  "description": "Specifies the reporters to use during test execution. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'default', 'verbose', 'dots', 'json', 'junit', 'tap', 'tap-flat', and 'html'. You can also provide a path to a custom reporter.",
@@ -4401,10 +4507,19 @@
4401
4507
  {
4402
4508
  "anyOf": [
4403
4509
  {
4404
- "$ref": "#/definitions/AngularBuildBuildersUnitTestSchema/definitions/reporters-enum"
4510
+ "type": "string"
4405
4511
  },
4406
4512
  {
4407
- "type": "string"
4513
+ "enum": [
4514
+ "default",
4515
+ "verbose",
4516
+ "dots",
4517
+ "json",
4518
+ "junit",
4519
+ "tap",
4520
+ "tap-flat",
4521
+ "html"
4522
+ ]
4408
4523
  }
4409
4524
  ]
4410
4525
  },
@@ -4416,10 +4531,19 @@
4416
4531
  {
4417
4532
  "anyOf": [
4418
4533
  {
4419
- "$ref": "#/definitions/AngularBuildBuildersUnitTestSchema/definitions/reporters-enum"
4534
+ "type": "string"
4420
4535
  },
4421
4536
  {
4422
- "type": "string"
4537
+ "enum": [
4538
+ "default",
4539
+ "verbose",
4540
+ "dots",
4541
+ "json",
4542
+ "junit",
4543
+ "tap",
4544
+ "tap-flat",
4545
+ "html"
4546
+ ]
4423
4547
  }
4424
4548
  ]
4425
4549
  },
@@ -4463,34 +4587,7 @@
4463
4587
  "visible": false
4464
4588
  }
4465
4589
  },
4466
- "additionalProperties": false,
4467
- "definitions": {
4468
- "coverage-reporters": {
4469
- "enum": [
4470
- "html",
4471
- "lcov",
4472
- "lcovonly",
4473
- "text",
4474
- "text-summary",
4475
- "cobertura",
4476
- "json",
4477
- "json-summary"
4478
- ]
4479
- },
4480
- "reporters-enum": {
4481
- "type": "string",
4482
- "enum": [
4483
- "default",
4484
- "verbose",
4485
- "dots",
4486
- "json",
4487
- "junit",
4488
- "tap",
4489
- "tap-flat",
4490
- "html"
4491
- ]
4492
- }
4493
- }
4590
+ "additionalProperties": false
4494
4591
  },
4495
4592
  "AngularBuildBuildersKarmaSchema": {
4496
4593
  "title": "Karma Target",
@@ -818,6 +818,7 @@ export type AngularNgNewOptionsSchema = {
818
818
  zoneless?: boolean;
819
819
  };
820
820
  export declare enum AiConfig {
821
+ Agents = "agents",
821
822
  Claude = "claude",
822
823
  Copilot = "copilot",
823
824
  Cursor = "cursor",
@@ -113,6 +113,7 @@ var TypeSeparator;
113
113
  })(TypeSeparator || (exports.TypeSeparator = TypeSeparator = {}));
114
114
  var AiConfig;
115
115
  (function (AiConfig) {
116
+ AiConfig["Agents"] = "agents";
116
117
  AiConfig["Claude"] = "claude";
117
118
  AiConfig["Copilot"] = "copilot";
118
119
  AiConfig["Cursor"] = "cursor";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "21.0.0-next.5",
3
+ "version": "21.0.0-next.6",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,15 +25,15 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.2100.0-next.5",
29
- "@angular-devkit/core": "21.0.0-next.5",
30
- "@angular-devkit/schematics": "21.0.0-next.5",
28
+ "@angular-devkit/architect": "0.2100.0-next.6",
29
+ "@angular-devkit/core": "21.0.0-next.6",
30
+ "@angular-devkit/schematics": "21.0.0-next.6",
31
31
  "@inquirer/prompts": "7.8.6",
32
32
  "@listr2/prompt-adapter-inquirer": "3.0.4",
33
- "@modelcontextprotocol/sdk": "1.18.1",
34
- "@schematics/angular": "21.0.0-next.5",
33
+ "@modelcontextprotocol/sdk": "1.18.2",
34
+ "@schematics/angular": "21.0.0-next.6",
35
35
  "@yarnpkg/lockfile": "1.1.0",
36
- "algoliasearch": "5.37.0",
36
+ "algoliasearch": "5.39.0",
37
37
  "ini": "5.0.0",
38
38
  "jsonc-parser": "3.3.1",
39
39
  "listr2": "9.0.4",
@@ -47,14 +47,14 @@
47
47
  "ng-update": {
48
48
  "migrations": "@schematics/angular/migrations/migration-collection.json",
49
49
  "packageGroup": {
50
- "@angular/cli": "21.0.0-next.5",
51
- "@angular/build": "21.0.0-next.5",
52
- "@angular/ssr": "21.0.0-next.5",
53
- "@angular-devkit/architect": "0.2100.0-next.5",
54
- "@angular-devkit/build-angular": "21.0.0-next.5",
55
- "@angular-devkit/build-webpack": "0.2100.0-next.5",
56
- "@angular-devkit/core": "21.0.0-next.5",
57
- "@angular-devkit/schematics": "21.0.0-next.5"
50
+ "@angular/cli": "21.0.0-next.6",
51
+ "@angular/build": "21.0.0-next.6",
52
+ "@angular/ssr": "21.0.0-next.6",
53
+ "@angular-devkit/architect": "0.2100.0-next.6",
54
+ "@angular-devkit/build-angular": "21.0.0-next.6",
55
+ "@angular-devkit/build-webpack": "0.2100.0-next.6",
56
+ "@angular-devkit/core": "21.0.0-next.6",
57
+ "@angular-devkit/schematics": "21.0.0-next.6"
58
58
  }
59
59
  },
60
60
  "packageManager": "pnpm@10.17.1",
@@ -9,7 +9,8 @@ import { json } from '@angular-devkit/core';
9
9
  import type { Argv, Options as YargsOptions } from 'yargs';
10
10
  import { EventCustomDimension } from '../../analytics/analytics-parameters';
11
11
  /**
12
- * An option description.
12
+ * An option description that can be used by yargs to create a command.
13
+ * See: https://github.com/yargs/yargs/blob/main/docs/options.mjs
13
14
  */
14
15
  export interface Option extends YargsOptions {
15
16
  /**
@@ -42,6 +43,17 @@ export interface Option extends YargsOptions {
42
43
  */
43
44
  itemValueType?: 'string';
44
45
  }
46
+ /**
47
+ * Parses a JSON schema to a list of options that can be used by yargs.
48
+ *
49
+ * @param registry A schema registry to use for flattening the schema.
50
+ * @param schema The JSON schema to parse.
51
+ * @param interactive Whether to prompt the user for missing options.
52
+ * @returns A list of options.
53
+ *
54
+ * @note The schema definition are not resolved at this stage. This means that `$ref` will not be resolved,
55
+ * and custom keywords like `x-prompt` will not be processed.
56
+ */
45
57
  export declare function parseJsonSchemaToOptions(registry: json.schema.SchemaRegistry, schema: json.JsonObject, interactive?: boolean): Promise<Option[]>;
46
58
  /**
47
59
  * Adds schema options to a command also this keeps track of options that are required for analytics.