@angular/cli 17.0.0-rc.1 → 17.0.0-rc.3

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": "17.0.0-rc.1",
3
+ "version": "17.0.0-rc.3",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,14 +25,14 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.1700.0-rc.1",
29
- "@angular-devkit/core": "17.0.0-rc.1",
30
- "@angular-devkit/schematics": "17.0.0-rc.1",
31
- "@schematics/angular": "17.0.0-rc.1",
28
+ "@angular-devkit/architect": "0.1700.0-rc.3",
29
+ "@angular-devkit/core": "17.0.0-rc.3",
30
+ "@angular-devkit/schematics": "17.0.0-rc.3",
31
+ "@schematics/angular": "17.0.0-rc.3",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "ini": "4.1.1",
35
- "inquirer": "8.2.6",
35
+ "inquirer": "9.2.11",
36
36
  "jsonc-parser": "3.2.0",
37
37
  "npm-package-arg": "11.0.1",
38
38
  "npm-pick-manifest": "9.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": "17.0.0-rc.1",
51
- "@angular/ssr": "17.0.0-rc.1",
52
- "@angular-devkit/architect": "0.1700.0-rc.1",
53
- "@angular-devkit/build-angular": "17.0.0-rc.1",
54
- "@angular-devkit/build-webpack": "0.1700.0-rc.1",
55
- "@angular-devkit/core": "17.0.0-rc.1",
56
- "@angular-devkit/schematics": "17.0.0-rc.1"
50
+ "@angular/cli": "17.0.0-rc.3",
51
+ "@angular/ssr": "17.0.0-rc.3",
52
+ "@angular-devkit/architect": "0.1700.0-rc.3",
53
+ "@angular-devkit/build-angular": "17.0.0-rc.3",
54
+ "@angular-devkit/build-webpack": "0.1700.0-rc.3",
55
+ "@angular-devkit/core": "17.0.0-rc.3",
56
+ "@angular-devkit/schematics": "17.0.0-rc.3"
57
57
  }
58
58
  },
59
59
  "engines": {
60
- "node": ">=18.13.0",
60
+ "node": "^18.13.0 || >=20.9.0",
61
61
  "npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
62
62
  "yarn": ">= 1.13.0"
63
63
  }
@@ -6,29 +6,6 @@
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.io/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 (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
9
  Object.defineProperty(exports, "__esModule", { value: true });
33
10
  exports.getAnalyticsInfoString = exports.getAnalyticsUserId = exports.promptAnalytics = exports.setAnalyticsConfig = exports.isPackageNameSafeForAnalytics = exports.analyticsPackageSafelist = void 0;
34
11
  const core_1 = require("@angular-devkit/core");
@@ -36,6 +13,7 @@ const crypto_1 = require("crypto");
36
13
  const color_1 = require("../utilities/color");
37
14
  const config_1 = require("../utilities/config");
38
15
  const environment_options_1 = require("../utilities/environment-options");
16
+ const load_esm_1 = require("../utilities/load-esm");
39
17
  const tty_1 = require("../utilities/tty");
40
18
  /* eslint-disable no-console */
41
19
  /**
@@ -89,8 +67,8 @@ async function promptAnalytics(context, global, force = false) {
89
67
  throw new Error(`Could not find a ${level} workspace. Are you in a project?`);
90
68
  }
91
69
  if (force || (0, tty_1.isTTY)()) {
92
- const { prompt } = await Promise.resolve().then(() => __importStar(require('inquirer')));
93
- const answers = await prompt([
70
+ const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
71
+ const answers = await inquirer.prompt([
94
72
  {
95
73
  type: 'confirm',
96
74
  name: 'analytics',
@@ -6,35 +6,12 @@
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.io/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
9
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
26
10
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
27
11
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
28
12
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
29
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
30
14
  };
31
- var __importStar = (this && this.__importStar) || function (mod) {
32
- if (mod && mod.__esModule) return mod;
33
- var result = {};
34
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
35
- __setModuleDefault(result, mod);
36
- return result;
37
- };
38
15
  var __metadata = (this && this.__metadata) || function (k, v) {
39
16
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
40
17
  };
@@ -48,6 +25,7 @@ const analytics_1 = require("../analytics/analytics");
48
25
  const analytics_parameters_1 = require("../analytics/analytics-parameters");
49
26
  const config_1 = require("../utilities/config");
50
27
  const error_1 = require("../utilities/error");
28
+ const load_esm_1 = require("../utilities/load-esm");
51
29
  const memoize_1 = require("../utilities/memoize");
52
30
  const tty_1 = require("../utilities/tty");
53
31
  const command_module_1 = require("./command-module");
@@ -203,8 +181,8 @@ class SchematicsCommandModule extends command_module_1.CommandModule {
203
181
  return question;
204
182
  });
205
183
  if (questions.length) {
206
- const { prompt } = await Promise.resolve().then(() => __importStar(require('inquirer')));
207
- return prompt(questions);
184
+ const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
185
+ return inquirer.prompt(questions);
208
186
  }
209
187
  else {
210
188
  return {};
@@ -143,6 +143,7 @@ function _validateReversePeerDependencies(name, version, infoMap, logger, next)
143
143
  '@schematics/update',
144
144
  '@angular-devkit/build-ng-packagr',
145
145
  'tsickle',
146
+ '@nguniversal/builders',
146
147
  ];
147
148
  if (ignoredPackages.includes(installed)) {
148
149
  continue;
@@ -18,7 +18,7 @@ const command_config_1 = require("../command-config");
18
18
  /**
19
19
  * Major versions of Node.js that are officially supported by Angular.
20
20
  */
21
- const SUPPORTED_NODE_MAJORS = [18];
21
+ const SUPPORTED_NODE_MAJORS = [18, 20];
22
22
  const PACKAGE_PATTERNS = [
23
23
  /^@angular\/.*/,
24
24
  /^@angular-devkit\/.*/,
@@ -41,6 +41,7 @@ const config_1 = require("../utilities/config");
41
41
  const environment_options_1 = require("../utilities/environment-options");
42
42
  const tty_1 = require("../utilities/tty");
43
43
  const error_1 = require("./error");
44
+ const load_esm_1 = require("./load-esm");
44
45
  /**
45
46
  * Checks if it is appropriate to prompt the user to setup autocompletion. If not, does nothing. If
46
47
  * so prompts and sets up autocompletion for the user. Returns an exit code if the program should
@@ -160,8 +161,8 @@ async function shouldPromptForAutocompletionSetup(command, config) {
160
161
  async function promptForAutocompletion() {
161
162
  // Dynamically load `inquirer` so users don't have to pay the cost of parsing and executing it for
162
163
  // the 99% of builds that *don't* prompt for autocompletion.
163
- const { prompt } = await Promise.resolve().then(() => __importStar(require('inquirer')));
164
- const { autocomplete } = await prompt([
164
+ const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
165
+ const { autocomplete } = await inquirer.prompt([
165
166
  {
166
167
  name: 'autocomplete',
167
168
  type: 'confirm',
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ /**
9
+ * This uses a dynamic import to load a module which may be ESM.
10
+ * CommonJS code can load ESM code via a dynamic import. Unfortunately, TypeScript
11
+ * will currently, unconditionally downlevel dynamic import into a require call.
12
+ * require calls cannot load ESM code and will result in a runtime error. To workaround
13
+ * this, a Function constructor is used to prevent TypeScript from changing the dynamic import.
14
+ * Once TypeScript provides support for keeping the dynamic import this workaround can
15
+ * be dropped.
16
+ *
17
+ * @param modulePath The path of the module to load.
18
+ * @returns A Promise that resolves to the dynamically imported module.
19
+ */
20
+ export declare function loadEsmModule<T>(modulePath: string | URL): Promise<T>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.loadEsmModule = void 0;
11
+ /**
12
+ * This uses a dynamic import to load a module which may be ESM.
13
+ * CommonJS code can load ESM code via a dynamic import. Unfortunately, TypeScript
14
+ * will currently, unconditionally downlevel dynamic import into a require call.
15
+ * require calls cannot load ESM code and will result in a runtime error. To workaround
16
+ * this, a Function constructor is used to prevent TypeScript from changing the dynamic import.
17
+ * Once TypeScript provides support for keeping the dynamic import this workaround can
18
+ * be dropped.
19
+ *
20
+ * @param modulePath The path of the module to load.
21
+ * @returns A Promise that resolves to the dynamically imported module.
22
+ */
23
+ function loadEsmModule(modulePath) {
24
+ return new Function('modulePath', `return import(modulePath);`)(modulePath);
25
+ }
26
+ exports.loadEsmModule = loadEsmModule;
@@ -6,31 +6,9 @@
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.io/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 (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
9
  Object.defineProperty(exports, "__esModule", { value: true });
33
10
  exports.askChoices = exports.askQuestion = exports.askConfirmation = void 0;
11
+ const load_esm_1 = require("./load-esm");
34
12
  const tty_1 = require("./tty");
35
13
  async function askConfirmation(message, defaultResponse, noTTYResponse) {
36
14
  if (!(0, tty_1.isTTY)()) {
@@ -43,8 +21,8 @@ async function askConfirmation(message, defaultResponse, noTTYResponse) {
43
21
  message,
44
22
  default: defaultResponse,
45
23
  };
46
- const { prompt } = await Promise.resolve().then(() => __importStar(require('inquirer')));
47
- const answers = await prompt([question]);
24
+ const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
25
+ const answers = await inquirer.prompt([question]);
48
26
  return answers['confirmation'];
49
27
  }
50
28
  exports.askConfirmation = askConfirmation;
@@ -60,8 +38,8 @@ async function askQuestion(message, choices, defaultResponseIndex, noTTYResponse
60
38
  choices,
61
39
  default: defaultResponseIndex,
62
40
  };
63
- const { prompt } = await Promise.resolve().then(() => __importStar(require('inquirer')));
64
- const answers = await prompt([question]);
41
+ const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
42
+ const answers = await inquirer.prompt([question]);
65
43
  return answers['answer'];
66
44
  }
67
45
  exports.askQuestion = askQuestion;
@@ -76,8 +54,8 @@ async function askChoices(message, choices, noTTYResponse) {
76
54
  message,
77
55
  choices,
78
56
  };
79
- const { prompt } = await Promise.resolve().then(() => __importStar(require('inquirer')));
80
- const answers = await prompt([question]);
57
+ const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
58
+ const answers = await inquirer.prompt([question]);
81
59
  return answers['answer'];
82
60
  }
83
61
  exports.askChoices = askChoices;
@@ -25,5 +25,5 @@ class Version {
25
25
  }
26
26
  }
27
27
  // TODO(bazel): Convert this to use build-time version stamping after flipping the build script to use bazel
28
- // export const VERSION = new Version('17.0.0-rc.1');
28
+ // export const VERSION = new Version('17.0.0-rc.3');
29
29
  exports.VERSION = new Version(JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../../package.json'), 'utf-8')).version);