@angular/cli 8.3.19 → 8.3.23

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/lib/init.js CHANGED
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  */
10
10
  require("symbol-observable");
11
11
  // symbol polyfill must go first
12
- // tslint:disable: no-console
13
12
  // tslint:disable-next-line:ordered-imports import-groups
14
13
  const core_1 = require("@angular-devkit/core");
15
14
  const fs = require("fs");
@@ -36,6 +35,13 @@ function _fromPackageJson(cwd = process.cwd()) {
36
35
  } while (cwd != path.dirname(cwd));
37
36
  return null;
38
37
  }
38
+ /**
39
+ * Disable Browserslist old data warning as otherwise with every release we'd need to update this dependency
40
+ * which is cumbersome considering we pin versions and the warning is not user actionable.
41
+ * `Browserslist: caniuse-lite is outdated. Please run next command `npm update`
42
+ * See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
43
+ */
44
+ process.env.BROWSERSLIST_IGNORE_OLD_DATA = '1';
39
45
  // Check if we need to profile this CLI run.
40
46
  if (process.env['NG_CLI_PROFILING']) {
41
47
  let profiler;
@@ -84,7 +90,7 @@ else {
84
90
  shouldWarn = localVersion != null && globalVersion.compare(localVersion) > 0;
85
91
  }
86
92
  catch (e) {
87
- // eslint-disable-next-line no-console
93
+ // tslint:disable-next-line no-console
88
94
  console.error(e);
89
95
  shouldWarn = true;
90
96
  }
@@ -97,11 +103,11 @@ else {
97
103
  `);
98
104
  // Don't show warning colorised on `ng completion`
99
105
  if (process.argv[2] !== 'completion') {
100
- // eslint-disable-next-line no-console
106
+ // tslint:disable-next-line no-console
101
107
  console.error(warning);
102
108
  }
103
109
  else {
104
- // eslint-disable-next-line no-console
110
+ // tslint:disable-next-line no-console
105
111
  console.error(warning);
106
112
  process.exit(1);
107
113
  }
@@ -140,6 +146,7 @@ cli({
140
146
  process.exit(exitCode);
141
147
  })
142
148
  .catch((err) => {
149
+ // tslint:disable-next-line no-console
143
150
  console.error('Unknown error: ' + err.toString());
144
151
  process.exit(127);
145
152
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "8.3.19",
3
+ "version": "8.3.23",
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.803.19",
32
- "@angular-devkit/core": "8.3.19",
33
- "@angular-devkit/schematics": "8.3.19",
34
- "@schematics/angular": "8.3.19",
35
- "@schematics/update": "0.803.19",
31
+ "@angular-devkit/architect": "0.803.23",
32
+ "@angular-devkit/core": "8.3.23",
33
+ "@angular-devkit/schematics": "8.3.23",
34
+ "@schematics/angular": "8.3.23",
35
+ "@schematics/update": "0.803.23",
36
36
  "@yarnpkg/lockfile": "1.1.0",
37
37
  "ansi-colors": "4.1.1",
38
38
  "debug": "^4.1.1",
@@ -52,10 +52,10 @@
52
52
  "ng-update": {
53
53
  "migrations": "@schematics/angular/migrations/migration-collection.json",
54
54
  "packageGroup": {
55
- "@angular/cli": "8.3.19",
56
- "@angular-devkit/build-angular": "0.803.19",
57
- "@angular-devkit/build-ng-packagr": "0.803.19",
58
- "@angular-devkit/build-webpack": "0.803.19"
55
+ "@angular/cli": "8.3.23",
56
+ "@angular-devkit/build-angular": "0.803.23",
57
+ "@angular-devkit/build-ng-packagr": "0.803.23",
58
+ "@angular-devkit/build-webpack": "0.803.23"
59
59
  }
60
60
  },
61
61
  "engines": {
@@ -23,16 +23,18 @@ function installPackage(packageName, logger, packageManager = schema_1.PackageMa
23
23
  packageManagerArgs.noLockfile,
24
24
  ];
25
25
  logger.info(color_1.colors.green(`Installing packages for tooling via ${packageManager}.`));
26
- const { status } = child_process_1.spawnSync(packageManager, [
27
- ...installArgs,
28
- ...extraArgs,
29
- ], {
30
- stdio: 'inherit',
26
+ const { status, stderr, stdout, error } = child_process_1.spawnSync(packageManager, [...installArgs, ...extraArgs], {
27
+ stdio: 'pipe',
28
+ encoding: 'utf8',
31
29
  shell: true,
32
30
  cwd,
33
31
  });
34
32
  if (status !== 0) {
35
- throw new Error('Package install failed, see above.');
33
+ let errorMessage = ((error && error.message) || stderr || stdout || '').trim();
34
+ if (errorMessage) {
35
+ errorMessage += '\n';
36
+ }
37
+ throw new Error(errorMessage + `Package install failed${errorMessage ? ', see above' : ''}.`);
36
38
  }
37
39
  logger.info(color_1.colors.green(`Installed packages for tooling via ${packageManager}.`));
38
40
  }
@@ -46,6 +48,20 @@ function installTempPackage(packageName, logger, packageManager = schema_1.Packa
46
48
  }
47
49
  catch (_a) { }
48
50
  });
51
+ // NPM will warn when a `package.json` is not found in the install directory
52
+ // Example:
53
+ // npm WARN enoent ENOENT: no such file or directory, open '/tmp/.ng-temp-packages-84Qi7y/package.json'
54
+ // npm WARN .ng-temp-packages-84Qi7y No description
55
+ // npm WARN .ng-temp-packages-84Qi7y No repository field.
56
+ // npm WARN .ng-temp-packages-84Qi7y No license field.
57
+ // While we can use `npm init -y` we will end up needing to update the 'package.json' anyways
58
+ // because of missing fields.
59
+ fs_1.writeFileSync(path_1.join(tempPath, 'package.json'), JSON.stringify({
60
+ name: 'temp-cli-install',
61
+ description: 'temp-cli-install',
62
+ repository: 'temp-cli-install',
63
+ license: 'MIT',
64
+ }));
49
65
  // setup prefix/global modules path
50
66
  const packageManagerArgs = getPackageManagerArguments(packageManager);
51
67
  const tempNodeModules = path_1.join(tempPath, 'node_modules');
@@ -85,10 +101,7 @@ function runTempPackageBin(packageName, logger, packageManager = schema_1.Packag
85
101
  if (!binPath) {
86
102
  throw new Error(`Cannot locate bin for temporary package: ${packageNameNoVersion}.`);
87
103
  }
88
- const argv = [
89
- binPath,
90
- ...args,
91
- ];
104
+ const argv = [binPath, ...args];
92
105
  const { status, error } = child_process_1.spawnSync('node', argv, {
93
106
  stdio: 'inherit',
94
107
  shell: true,