@angular/cli 20.2.0 → 20.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "20.2.0",
3
+ "version": "20.2.1",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,13 +25,13 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.2002.0",
29
- "@angular-devkit/core": "20.2.0",
30
- "@angular-devkit/schematics": "20.2.0",
28
+ "@angular-devkit/architect": "0.2002.1",
29
+ "@angular-devkit/core": "20.2.1",
30
+ "@angular-devkit/schematics": "20.2.1",
31
31
  "@inquirer/prompts": "7.8.2",
32
32
  "@listr2/prompt-adapter-inquirer": "3.0.1",
33
33
  "@modelcontextprotocol/sdk": "1.17.3",
34
- "@schematics/angular": "20.2.0",
34
+ "@schematics/angular": "20.2.1",
35
35
  "@yarnpkg/lockfile": "1.1.0",
36
36
  "algoliasearch": "5.35.0",
37
37
  "ini": "5.0.0",
@@ -47,17 +47,17 @@
47
47
  "ng-update": {
48
48
  "migrations": "@schematics/angular/migrations/migration-collection.json",
49
49
  "packageGroup": {
50
- "@angular/cli": "20.2.0",
51
- "@angular/build": "20.2.0",
52
- "@angular/ssr": "20.2.0",
53
- "@angular-devkit/architect": "0.2002.0",
54
- "@angular-devkit/build-angular": "20.2.0",
55
- "@angular-devkit/build-webpack": "0.2002.0",
56
- "@angular-devkit/core": "20.2.0",
57
- "@angular-devkit/schematics": "20.2.0"
50
+ "@angular/cli": "20.2.1",
51
+ "@angular/build": "20.2.1",
52
+ "@angular/ssr": "20.2.1",
53
+ "@angular-devkit/architect": "0.2002.1",
54
+ "@angular-devkit/build-angular": "20.2.1",
55
+ "@angular-devkit/build-webpack": "0.2002.1",
56
+ "@angular-devkit/core": "20.2.1",
57
+ "@angular-devkit/schematics": "20.2.1"
58
58
  }
59
59
  },
60
- "packageManager": "pnpm@10.14.0",
60
+ "packageManager": "pnpm@10.15.0",
61
61
  "engines": {
62
62
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
63
63
  "npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
@@ -224,13 +224,18 @@ let SchematicsCommandModule = (() => {
224
224
  ? {
225
225
  name: item,
226
226
  value: item,
227
- checked: item === definition.default,
227
+ checked: definition.multiselect && Array.isArray(definition.default)
228
+ ? definition.default?.includes(item)
229
+ : item === definition.default,
228
230
  }
229
231
  : {
230
232
  ...item,
231
233
  name: item.label,
232
234
  value: item.value,
233
- checked: item.value === definition.default,
235
+ checked: definition.multiselect && Array.isArray(definition.default)
236
+ ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
237
+ definition.default?.includes(item.value)
238
+ : item.value === definition.default,
234
239
  }),
235
240
  });
236
241
  break;
@@ -120,11 +120,15 @@ async function parseJsonSchemaToOptions(registry, schema, interactive = true) {
120
120
  if (current.default !== undefined) {
121
121
  switch (types[0]) {
122
122
  case 'string':
123
- case 'array':
124
123
  if (typeof current.default == 'string') {
125
124
  defaultValue = current.default;
126
125
  }
127
126
  break;
127
+ case 'array':
128
+ if (Array.isArray(current.default)) {
129
+ defaultValue = current.default;
130
+ }
131
+ break;
128
132
  case 'number':
129
133
  if (typeof current.default == 'number') {
130
134
  defaultValue = current.default;
@@ -47,11 +47,9 @@ function shouldWrapSchematic(schematicFile, schematicEncapsulation) {
47
47
  }
48
48
  // Check for first-party Angular schematic packages
49
49
  // Angular schematics are safe to use in the wrapped VM context
50
- if (/\/node_modules\/@(?:angular|schematics|nguniversal)\//.test(normalizedSchematicFile)) {
51
- return true;
52
- }
53
- // Otherwise use the value of the schematic collection's encapsulation option (current default of false)
54
- return schematicEncapsulation;
50
+ const isFirstParty = /\/node_modules\/@(?:angular|schematics|nguniversal)\//.test(normalizedSchematicFile);
51
+ // Use value of defined option if present, otherwise default to first-party usage.
52
+ return schematicEncapsulation ?? isFirstParty;
55
53
  }
56
54
  class SchematicEngineHost extends tools_1.NodeModulesEngineHost {
57
55
  _resolveReferenceString(refString, parentPath, collectionDescription) {
@@ -60,7 +58,7 @@ class SchematicEngineHost extends tools_1.NodeModulesEngineHost {
60
58
  const fullPath = path[0] === '.' ? (0, node_path_1.resolve)(parentPath ?? process.cwd(), path) : path;
61
59
  const referenceRequire = (0, node_module_1.createRequire)(__filename);
62
60
  const schematicFile = referenceRequire.resolve(fullPath, { paths: [parentPath] });
63
- if (shouldWrapSchematic(schematicFile, !!collectionDescription?.encapsulation)) {
61
+ if (shouldWrapSchematic(schematicFile, collectionDescription?.encapsulation)) {
64
62
  const schematicPath = (0, node_path_1.dirname)(schematicFile);
65
63
  const moduleCache = new Map();
66
64
  const factoryInitializer = wrap(schematicFile, schematicPath, moduleCache, name || 'default');
@@ -22,11 +22,6 @@ const TRANSFORMATIONS = [
22
22
  description: 'Converts tags for elements with no content to be self-closing (e.g., `<app-foo></app-foo>` becomes `<app-foo />`).',
23
23
  documentationUrl: 'https://angular.dev/reference/migrations/self-closing-tags',
24
24
  },
25
- {
26
- name: 'test-bed-get',
27
- description: 'Updates `TestBed.get` to the preferred and type-safe `TestBed.inject` in TypeScript test files.',
28
- documentationUrl: 'https://angular.dev/guide/testing/dependency-injection',
29
- },
30
25
  {
31
26
  name: 'inject',
32
27
  description: 'Converts usages of constructor-based injection to the inject() function.',
@@ -59,11 +54,6 @@ const TRANSFORMATIONS = [
59
54
  '3. Run `ng g @angular/core:standalone` and select "Bootstrap the project using standalone APIs"',
60
55
  documentationUrl: 'https://angular.dev/reference/migrations/standalone',
61
56
  },
62
- {
63
- name: 'zoneless',
64
- description: 'Migrates the application to be zoneless.',
65
- documentationUrl: 'https://angular.dev/guide/zoneless',
66
- },
67
57
  ];
68
58
  const modernizeInputSchema = zod_1.z.object({
69
59
  // Casting to [string, ...string[]] since the enum definition requires a nonempty array.
@@ -22,4 +22,4 @@ class Version {
22
22
  this.patch = patch;
23
23
  }
24
24
  }
25
- exports.VERSION = new Version('20.2.0');
25
+ exports.VERSION = new Version('20.2.1');