@angular/cli 20.0.0-next.0 → 20.0.0-next.2

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.
@@ -1023,10 +1023,6 @@
1023
1023
  "type": "boolean",
1024
1024
  "default": false
1025
1025
  },
1026
- "serverRouting": {
1027
- "description": "Set up a server application using the Server Routing and App Engine APIs (Developer Preview).",
1028
- "type": "boolean"
1029
- },
1030
1026
  "experimentalZoneless": {
1031
1027
  "description": "Generate an application that does not use `zone.js`.",
1032
1028
  "type": "boolean",
@@ -1176,8 +1172,7 @@
1176
1172
  },
1177
1173
  "type": {
1178
1174
  "type": "string",
1179
- "description": "Append a custom type to the component's filename. For example, if you set the type to `container`, the file will be named `my-component.container.ts`.",
1180
- "default": "Component"
1175
+ "description": "Append a custom type to the component's filename. For example, if you set the type to `container`, the file will be named `my-component.container.ts`."
1181
1176
  },
1182
1177
  "skipTests": {
1183
1178
  "type": "boolean",
@@ -1218,6 +1213,11 @@
1218
1213
  "type": "boolean",
1219
1214
  "default": false,
1220
1215
  "description": "Use a default export for the component in its TypeScript file instead of a named export."
1216
+ },
1217
+ "ngHtml": {
1218
+ "type": "boolean",
1219
+ "default": true,
1220
+ "description": "Generate component template files with an '.ng.html' file extension instead of '.html'. The '.ng.html' file extension is recommended by the Angular style guide."
1221
1221
  }
1222
1222
  }
1223
1223
  },
@@ -1299,6 +1299,10 @@
1299
1299
  "type": "boolean",
1300
1300
  "default": false,
1301
1301
  "description": "Automatically export the directive from the specified NgModule, making it accessible to other modules in the application."
1302
+ },
1303
+ "type": {
1304
+ "type": "string",
1305
+ "description": "Append a custom type to the directive's filename. For example, if you set the type to `directive`, the file will be named `example.directive.ts`."
1302
1306
  }
1303
1307
  }
1304
1308
  },
@@ -1759,10 +1763,6 @@
1759
1763
  "description": "Configure the initial application for Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering).",
1760
1764
  "type": "boolean"
1761
1765
  },
1762
- "serverRouting": {
1763
- "description": "Create a server application in the initial project using the Server Routing and App Engine APIs (Developer Preview).",
1764
- "type": "boolean"
1765
- },
1766
1766
  "experimentalZoneless": {
1767
1767
  "description": "Create an initial application that does not utilize `zone.js`.",
1768
1768
  "type": "boolean",
@@ -1855,6 +1855,10 @@
1855
1855
  "type": "boolean",
1856
1856
  "description": "Skip the generation of a unit test file `spec.ts` for the service.",
1857
1857
  "default": false
1858
+ },
1859
+ "type": {
1860
+ "type": "string",
1861
+ "description": "Append a custom type to the service's filename. For example, if you set the type to `service`, the file will be named `my-service.service.ts`."
1858
1862
  }
1859
1863
  }
1860
1864
  },
@@ -2095,7 +2099,7 @@
2095
2099
  "additionalProperties": false
2096
2100
  },
2097
2101
  "externalDependencies": {
2098
- "description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.",
2102
+ "description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime. Note: `@foo/bar` marks all paths within the `@foo/bar` package as external, including sub-paths like `@foo/bar/baz`.",
2099
2103
  "type": "array",
2100
2104
  "items": {
2101
2105
  "type": "string"
@@ -3919,7 +3923,7 @@
3919
3923
  "type": "object",
3920
3924
  "properties": {
3921
3925
  "exclude": {
3922
- "description": "List of package imports that should not be prebundled by the development server. The packages will be bundled into the application code itself.",
3926
+ "description": "List of package imports that should not be prebundled by the development server. The packages will be bundled into the application code itself. Note: specifying `@foo/bar` marks all paths within the `@foo/bar` package as excluded, including sub-paths like `@foo/bar/baz`.",
3923
3927
  "type": "array",
3924
3928
  "items": {
3925
3929
  "type": "string"
@@ -4044,7 +4048,7 @@
4044
4048
  },
4045
4049
  "forceEsbuild": {
4046
4050
  "type": "boolean",
4047
- "description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.",
4051
+ "description": "Force the development server to use the 'browser-esbuild' builder when building.",
4048
4052
  "default": false
4049
4053
  },
4050
4054
  "prebundle": {
@@ -148,11 +148,6 @@ export type AngularApplicationOptionsSchema = {
148
148
  * and modules for managing navigation between different views in your application.
149
149
  */
150
150
  routing?: boolean;
151
- /**
152
- * Set up a server application using the Server Routing and App Engine APIs (Developer
153
- * Preview).
154
- */
155
- serverRouting?: boolean;
156
151
  /**
157
152
  * Skip the automatic installation of packages. You will need to manually install the
158
153
  * dependencies later.
@@ -303,6 +298,11 @@ export type AngularComponentOptionsSchema = {
303
298
  * `my-component.component.css`.
304
299
  */
305
300
  name: string;
301
+ /**
302
+ * Generate component template files with an '.ng.html' file extension instead of '.html'.
303
+ * The '.ng.html' file extension is recommended by the Angular style guide.
304
+ */
305
+ ngHtml?: boolean;
306
306
  /**
307
307
  * The path where the component files should be created, relative to the current workspace.
308
308
  * If not provided, a folder with the same name as the component will be created in the
@@ -437,6 +437,11 @@ export type AngularDirectiveOptionsSchema = {
437
437
  * other standalone components or directives.
438
438
  */
439
439
  standalone?: boolean;
440
+ /**
441
+ * Append a custom type to the directive's filename. For example, if you set the type to
442
+ * `directive`, the file will be named `example.directive.ts`.
443
+ */
444
+ type?: string;
440
445
  };
441
446
  /**
442
447
  * Creates a new enum in your project. Enums (enumerations) are a way to define a set of
@@ -703,11 +708,6 @@ export type AngularNgNewOptionsSchema = {
703
708
  * modules for managing navigation between different views in your application.
704
709
  */
705
710
  routing?: boolean;
706
- /**
707
- * Create a server application in the initial project using the Server Routing and App
708
- * Engine APIs (Developer Preview).
709
- */
710
- serverRouting?: boolean;
711
711
  /**
712
712
  * Do not initialize a Git repository in the new workspace. By default, a Git repository is
713
713
  * initialized to help you track changes to your project.
@@ -882,6 +882,11 @@ export type AngularServiceOptionsSchema = {
882
882
  * Skip the generation of a unit test file `spec.ts` for the service.
883
883
  */
884
884
  skipTests?: boolean;
885
+ /**
886
+ * Append a custom type to the service's filename. For example, if you set the type to
887
+ * `service`, the file will be named `my-service.service.ts`.
888
+ */
889
+ type?: string;
885
890
  };
886
891
  /**
887
892
  * Creates a new web worker in your project. Web workers allow you to run JavaScript code in
package/lib/init.js CHANGED
@@ -42,7 +42,7 @@ var __importStar = (this && this.__importStar) || (function () {
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
43
  require("symbol-observable");
44
44
  // symbol polyfill must go first
45
- const node_fs_1 = require("node:fs");
45
+ const promises_1 = require("node:fs/promises");
46
46
  const node_module_1 = require("node:module");
47
47
  const path = __importStar(require("node:path"));
48
48
  const semver_1 = require("semver");
@@ -89,7 +89,7 @@ let forceExit = false;
89
89
  let localVersion = cli.VERSION?.full;
90
90
  if (!localVersion) {
91
91
  try {
92
- const localPackageJson = await node_fs_1.promises.readFile(path.join(path.dirname(projectLocalCli), '../../package.json'), 'utf-8');
92
+ const localPackageJson = await (0, promises_1.readFile)(path.join(path.dirname(projectLocalCli), '../../package.json'), 'utf-8');
93
93
  localVersion = JSON.parse(localPackageJson).version;
94
94
  }
95
95
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "20.0.0-next.0",
3
+ "version": "20.0.0-next.2",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.2000.0-next.0",
29
- "@angular-devkit/core": "20.0.0-next.0",
30
- "@angular-devkit/schematics": "20.0.0-next.0",
31
- "@inquirer/prompts": "7.3.2",
28
+ "@angular-devkit/architect": "0.2000.0-next.2",
29
+ "@angular-devkit/core": "20.0.0-next.2",
30
+ "@angular-devkit/schematics": "20.0.0-next.2",
31
+ "@inquirer/prompts": "7.4.0",
32
32
  "@listr2/prompt-adapter-inquirer": "2.0.18",
33
- "@schematics/angular": "20.0.0-next.0",
33
+ "@schematics/angular": "20.0.0-next.2",
34
34
  "@yarnpkg/lockfile": "1.1.0",
35
35
  "ini": "5.0.0",
36
36
  "jsonc-parser": "3.3.1",
@@ -46,16 +46,17 @@
46
46
  "ng-update": {
47
47
  "migrations": "@schematics/angular/migrations/migration-collection.json",
48
48
  "packageGroup": {
49
- "@angular/cli": "20.0.0-next.0",
50
- "@angular/build": "20.0.0-next.0",
51
- "@angular/ssr": "20.0.0-next.0",
52
- "@angular-devkit/architect": "0.2000.0-next.0",
53
- "@angular-devkit/build-angular": "20.0.0-next.0",
54
- "@angular-devkit/build-webpack": "0.2000.0-next.0",
55
- "@angular-devkit/core": "20.0.0-next.0",
56
- "@angular-devkit/schematics": "20.0.0-next.0"
49
+ "@angular/cli": "20.0.0-next.2",
50
+ "@angular/build": "20.0.0-next.2",
51
+ "@angular/ssr": "20.0.0-next.2",
52
+ "@angular-devkit/architect": "0.2000.0-next.2",
53
+ "@angular-devkit/build-angular": "20.0.0-next.2",
54
+ "@angular-devkit/build-webpack": "0.2000.0-next.2",
55
+ "@angular-devkit/core": "20.0.0-next.2",
56
+ "@angular-devkit/schematics": "20.0.0-next.2"
57
57
  }
58
58
  },
59
+ "packageManager": "pnpm@9.15.6",
59
60
  "engines": {
60
61
  "node": "^20.11.1 || >=22.0.0",
61
62
  "npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
@@ -178,21 +178,16 @@ let SchematicsCommandModule = (() => {
178
178
  workflow.registry.addSmartDefaultProvider('projectName', () => this.getProjectName());
179
179
  const workingDir = (0, core_1.normalize)((0, node_path_1.relative)(this.context.root, process.cwd()));
180
180
  workflow.registry.addSmartDefaultProvider('workingDirectory', () => workingDir === '' ? undefined : workingDir);
181
- let shouldReportAnalytics = true;
182
181
  workflow.engineHost.registerOptionsTransform(async (schematic, options) => {
183
- // Report analytics
184
- if (shouldReportAnalytics) {
185
- shouldReportAnalytics = false;
186
- const { collection: { name: collectionName }, name: schematicName, } = schematic;
187
- const analytics = (0, analytics_1.isPackageNameSafeForAnalytics)(collectionName)
188
- ? await this.getAnalytics()
189
- : undefined;
190
- analytics?.reportSchematicRunEvent({
191
- [analytics_parameters_1.EventCustomDimension.SchematicCollectionName]: collectionName,
192
- [analytics_parameters_1.EventCustomDimension.SchematicName]: schematicName,
193
- ...this.getAnalyticsParameters(options),
194
- });
195
- }
182
+ const { collection: { name: collectionName }, name: schematicName, } = schematic;
183
+ const analytics = (0, analytics_1.isPackageNameSafeForAnalytics)(collectionName)
184
+ ? await this.getAnalytics()
185
+ : undefined;
186
+ analytics?.reportSchematicRunEvent({
187
+ [analytics_parameters_1.EventCustomDimension.SchematicCollectionName]: collectionName,
188
+ [analytics_parameters_1.EventCustomDimension.SchematicName]: schematicName,
189
+ ...this.getAnalyticsParameters(options),
190
+ });
196
191
  return options;
197
192
  });
198
193
  if (options.interactive !== false && (0, tty_1.isTTY)()) {
@@ -8,7 +8,7 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.CacheCleanModule = void 0;
11
- const node_fs_1 = require("node:fs");
11
+ const promises_1 = require("node:fs/promises");
12
12
  const command_module_1 = require("../../../command-builder/command-module");
13
13
  const utilities_1 = require("../utilities");
14
14
  class CacheCleanModule extends command_module_1.CommandModule {
@@ -21,7 +21,7 @@ class CacheCleanModule extends command_module_1.CommandModule {
21
21
  }
22
22
  run() {
23
23
  const { path } = (0, utilities_1.getCacheConfig)(this.context.workspace);
24
- return node_fs_1.promises.rm(path, {
24
+ return (0, promises_1.rm)(path, {
25
25
  force: true,
26
26
  recursive: true,
27
27
  maxRetries: 3,
@@ -6,10 +6,43 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
9
42
  Object.defineProperty(exports, "__esModule", { value: true });
10
43
  exports.CacheInfoCommandModule = void 0;
11
44
  const core_1 = require("@angular-devkit/core");
12
- const node_fs_1 = require("node:fs");
45
+ const fs = __importStar(require("node:fs/promises"));
13
46
  const node_path_1 = require("node:path");
14
47
  const command_module_1 = require("../../../command-builder/command-module");
15
48
  const environment_options_1 = require("../../../utilities/environment-options");
@@ -40,12 +73,12 @@ class CacheInfoCommandModule extends command_module_1.CommandModule {
40
73
  const dirPath = directoriesStack.pop();
41
74
  let entries = [];
42
75
  try {
43
- entries = await node_fs_1.promises.readdir(dirPath);
76
+ entries = await fs.readdir(dirPath);
44
77
  }
45
78
  catch { }
46
79
  for (const entry of entries) {
47
80
  const entryPath = (0, node_path_1.join)(dirPath, entry);
48
- const stats = await node_fs_1.promises.stat(entryPath);
81
+ const stats = await fs.stat(entryPath);
49
82
  if (stats.isDirectory()) {
50
83
  directoriesStack.push(entryPath);
51
84
  }
@@ -45,7 +45,7 @@ exports.initializeAutocomplete = initializeAutocomplete;
45
45
  exports.hasGlobalCliInstall = hasGlobalCliInstall;
46
46
  const core_1 = require("@angular-devkit/core");
47
47
  const node_child_process_1 = require("node:child_process");
48
- const node_fs_1 = require("node:fs");
48
+ const fs = __importStar(require("node:fs/promises"));
49
49
  const path = __importStar(require("node:path"));
50
50
  const node_process_1 = require("node:process");
51
51
  const color_1 = require("../utilities/color");
@@ -162,7 +162,7 @@ async function shouldPromptForAutocompletionSetup(command, config) {
162
162
  }
163
163
  // Check each RC file if they already use `ng completion script` in any capacity and don't prompt.
164
164
  for (const rcFile of rcFiles) {
165
- const contents = await node_fs_1.promises.readFile(rcFile, 'utf-8').catch(() => undefined);
165
+ const contents = await fs.readFile(rcFile, 'utf-8').catch(() => undefined);
166
166
  if (contents?.includes('ng completion script')) {
167
167
  return false;
168
168
  }
@@ -206,11 +206,11 @@ async function initializeAutocomplete() {
206
206
  throw new Error(`Unknown \`$SHELL\` environment variable value (${shell}). Angular CLI autocompletion only supports Bash or Zsh.`);
207
207
  }
208
208
  // Get the first file that already exists or fallback to a new file of the first candidate.
209
- const candidates = await Promise.allSettled(runCommandCandidates.map((rcFile) => node_fs_1.promises.access(rcFile).then(() => rcFile)));
209
+ const candidates = await Promise.allSettled(runCommandCandidates.map((rcFile) => fs.access(rcFile).then(() => rcFile)));
210
210
  const rcFile = candidates.find((result) => result.status === 'fulfilled')?.value ?? runCommandCandidates[0];
211
211
  // Append Angular autocompletion setup to RC file.
212
212
  try {
213
- await node_fs_1.promises.appendFile(rcFile, '\n\n# Load Angular CLI autocompletion.\nsource <(ng completion script)\n');
213
+ await fs.appendFile(rcFile, '\n\n# Load Angular CLI autocompletion.\nsource <(ng completion script)\n');
214
214
  }
215
215
  catch (err) {
216
216
  (0, error_1.assertIsError)(err);
@@ -22,4 +22,4 @@ class Version {
22
22
  this.patch = patch;
23
23
  }
24
24
  }
25
- exports.VERSION = new Version('20.0.0-next.0');
25
+ exports.VERSION = new Version('20.0.0-next.2');