@angular/cli 11.1.3 → 11.1.4

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.
@@ -35,7 +35,7 @@ class AddCommand extends schematic_command_1.SchematicCommand {
35
35
  }
36
36
  async run(options) {
37
37
  var _a;
38
- package_manager_1.ensureCompatibleNpm();
38
+ await package_manager_1.ensureCompatibleNpm(this.context.root);
39
39
  if (!options.collection) {
40
40
  this.logger.fatal(`The "ng add" command requires a name argument to be specified eg. ` +
41
41
  `${color_1.colors.yellow('ng add [name] ')}. For more details, use "ng help".`);
@@ -14,7 +14,7 @@ class NewCommand extends schematic_command_1.SchematicCommand {
14
14
  return super.initialize(options);
15
15
  }
16
16
  async run(options) {
17
- package_manager_1.ensureCompatibleNpm();
17
+ await package_manager_1.ensureCompatibleNpm(this.context.root);
18
18
  // Register the version of the CLI in the registry.
19
19
  const packageJson = require('../package.json');
20
20
  const version = packageJson.version;
@@ -188,7 +188,7 @@ class UpdateCommand extends command_1.Command {
188
188
  // tslint:disable-next-line:no-big-function
189
189
  async run(options) {
190
190
  var _a;
191
- package_manager_1.ensureCompatibleNpm();
191
+ await package_manager_1.ensureCompatibleNpm(this.context.root);
192
192
  // Check if the @angular-devkit/schematics package can be resolved from the workspace root
193
193
  // This works around issues with packages containing migrations that cannot directly depend on the package
194
194
  // This check can be removed once the schematic runtime handles this situation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "11.1.3",
3
+ "version": "11.1.4",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "homepage": "https://github.com/angular/angular-cli",
30
30
  "dependencies": {
31
- "@angular-devkit/architect": "0.1101.3",
32
- "@angular-devkit/core": "11.1.3",
33
- "@angular-devkit/schematics": "11.1.3",
34
- "@schematics/angular": "11.1.3",
35
- "@schematics/update": "0.1101.3",
31
+ "@angular-devkit/architect": "0.1101.4",
32
+ "@angular-devkit/core": "11.1.4",
33
+ "@angular-devkit/schematics": "11.1.4",
34
+ "@schematics/angular": "11.1.4",
35
+ "@schematics/update": "0.1101.4",
36
36
  "@yarnpkg/lockfile": "1.1.0",
37
37
  "ansi-colors": "4.1.1",
38
38
  "debug": "4.3.1",
@@ -53,12 +53,12 @@
53
53
  "ng-update": {
54
54
  "migrations": "@schematics/angular/migrations/migration-collection.json",
55
55
  "packageGroup": {
56
- "@angular/cli": "11.1.3",
57
- "@angular-devkit/architect": "0.1101.3",
58
- "@angular-devkit/build-angular": "0.1101.3",
59
- "@angular-devkit/build-webpack": "0.1101.3",
60
- "@angular-devkit/core": "11.1.3",
61
- "@angular-devkit/schematics": "11.1.3"
56
+ "@angular/cli": "11.1.4",
57
+ "@angular-devkit/architect": "0.1101.4",
58
+ "@angular-devkit/build-angular": "0.1101.4",
59
+ "@angular-devkit/build-webpack": "0.1101.4",
60
+ "@angular-devkit/core": "11.1.4",
61
+ "@angular-devkit/schematics": "11.1.4"
62
62
  }
63
63
  },
64
64
  "engines": {
@@ -5,4 +5,4 @@ export declare function getPackageManager(root: string): Promise<PackageManager>
5
5
  /**
6
6
  * Checks if the npm version is version 6.x. If not, display a message and exit.
7
7
  */
8
- export declare function ensureCompatibleNpm(): void;
8
+ export declare function ensureCompatibleNpm(root: string): Promise<void>;
@@ -59,8 +59,11 @@ exports.getPackageManager = getPackageManager;
59
59
  /**
60
60
  * Checks if the npm version is version 6.x. If not, display a message and exit.
61
61
  */
62
- function ensureCompatibleNpm() {
62
+ async function ensureCompatibleNpm(root) {
63
63
  var _a;
64
+ if ((await getPackageManager(root)) !== schema_1.PackageManager.Npm) {
65
+ return;
66
+ }
64
67
  try {
65
68
  const version = child_process_1.execSync('npm --version', { encoding: 'utf8', stdio: 'pipe' }).trim();
66
69
  const major = Number((_a = version.match(/^(\d+)\./)) === null || _a === void 0 ? void 0 : _a[1]);