@angular/cli 8.0.2 → 8.0.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.
@@ -1,14 +1,18 @@
1
- Uses the [webpack](https://webpack.js.org/) build tool, with default configuration options specified in the workspace configuration file (`angular.json`) or with a named alternative configuration.
2
- A "production" configuration is created by default when you use the CLI to create the project, and you can use that configuration by specifying the `--prod` option.
1
+ The command can be used to build a project of type "application" or "library".
2
+ When used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, and `watch` options are applied.
3
+ All other options apply only to building applications.
4
+
5
+ The application builder uses the [webpack](https://webpack.js.org/) build tool, with default configuration options specified in the workspace configuration file (`angular.json`) or with a named alternative configuration.
6
+ A "production" configuration is created by default when you use the CLI to create the project, and you can use that configuration by specifying the `--configuration="production"` or the `--prod="true"` option.
3
7
 
4
8
  The configuration options generally correspond to the command options.
5
- You can override individual configuration defaults by specifying the corresponding options on the command line.
9
+ You can override individual configuration defaults by specifying the corresponding options on the command line.
6
10
  The command can accept option names given in either dash-case or camelCase.
7
11
  Note that in the configuration file, you must specify names in camelCase.
8
12
 
9
13
  Some additional options can only be set through the configuration file,
10
14
  either by direct editing or with the `ng config` command.
11
- These include `assets`, `styles`, and `scripts` objects that provide runtime-global resources to include in the project.
15
+ These include `assets`, `styles`, and `scripts` objects that provide runtime-global resources to include in the project.
12
16
  Resources in CSS, such as images and fonts, are automatically written and fingerprinted at the root of the output folder.
13
17
 
14
18
  For further details, see [Workspace Configuration](guide/workspace-config).
@@ -12,7 +12,6 @@ const fs = require("fs");
12
12
  const path = require("path");
13
13
  const semver = require("semver");
14
14
  const schematic_command_1 = require("../models/schematic-command");
15
- const find_up_1 = require("../utilities/find-up");
16
15
  const package_manager_1 = require("../utilities/package-manager");
17
16
  const package_metadata_1 = require("../utilities/package-metadata");
18
17
  const package_tree_1 = require("../utilities/package-tree");
@@ -79,14 +78,15 @@ class UpdateCommand extends schematic_command_1.SchematicCommand {
79
78
  const packageManager = package_manager_1.getPackageManager(this.workspace.root);
80
79
  this.logger.info(`Using package manager: '${packageManager}'`);
81
80
  // Special handling for Angular CLI 1.x migrations
82
- if (options.migrateOnly === undefined && options.from === undefined) {
83
- if (!options.all && packages.length === 1 && packages[0].name === '@angular/cli') {
84
- const oldConfigFilePath = find_up_1.findUp(oldConfigFileNames, process.cwd());
85
- if (oldConfigFilePath) {
86
- options.migrateOnly = true;
87
- options.from = '1.0.0';
88
- }
89
- }
81
+ if (options.migrateOnly === undefined &&
82
+ options.from === undefined &&
83
+ !options.all &&
84
+ packages.length === 1 &&
85
+ packages[0].name === '@angular/cli' &&
86
+ this.workspace.configFile &&
87
+ oldConfigFileNames.includes(this.workspace.configFile)) {
88
+ options.migrateOnly = true;
89
+ options.from = '1.0.0';
90
90
  }
91
91
  this.logger.info('Collecting installed dependencies...');
92
92
  const packageTree = await package_tree_1.readPackageTree(this.workspace.root);
@@ -273,11 +273,19 @@ class UpdateCommand extends schematic_command_1.SchematicCommand {
273
273
  checkCleanGit() {
274
274
  try {
275
275
  const result = child_process_1.execSync('git status --porcelain', { encoding: 'utf8', stdio: 'pipe' });
276
- return result.trim().length === 0;
277
- }
278
- catch (_a) {
279
- return true;
276
+ if (result.trim().length === 0) {
277
+ return true;
278
+ }
279
+ // Only files inside the workspace root are relevant
280
+ for (const entry of result.split('\n')) {
281
+ const relativeEntry = path.relative(path.resolve(this.workspace.root), path.resolve(entry.slice(3).trim()));
282
+ if (!relativeEntry.startsWith('..') && !path.isAbsolute(relativeEntry)) {
283
+ return false;
284
+ }
285
+ }
280
286
  }
287
+ catch (_a) { }
288
+ return true;
281
289
  }
282
290
  }
283
291
  exports.UpdateCommand = UpdateCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "8.0.2",
3
+ "version": "8.0.3",
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.800.2",
32
- "@angular-devkit/core": "8.0.2",
33
- "@angular-devkit/schematics": "8.0.2",
34
- "@schematics/angular": "8.0.2",
35
- "@schematics/update": "0.800.2",
31
+ "@angular-devkit/architect": "0.800.3",
32
+ "@angular-devkit/core": "8.0.3",
33
+ "@angular-devkit/schematics": "8.0.3",
34
+ "@schematics/angular": "8.0.3",
35
+ "@schematics/update": "0.800.3",
36
36
  "@yarnpkg/lockfile": "1.1.0",
37
37
  "debug": "^4.1.1",
38
38
  "ini": "1.3.5",
@@ -49,10 +49,10 @@
49
49
  "ng-update": {
50
50
  "migrations": "@schematics/angular/migrations/migration-collection.json",
51
51
  "packageGroup": {
52
- "@angular/cli": "8.0.2",
53
- "@angular-devkit/build-angular": "0.800.2",
54
- "@angular-devkit/build-ng-packagr": "0.800.2",
55
- "@angular-devkit/build-webpack": "0.800.2"
52
+ "@angular/cli": "8.0.3",
53
+ "@angular-devkit/build-angular": "0.800.3",
54
+ "@angular-devkit/build-ng-packagr": "0.800.3",
55
+ "@angular-devkit/build-webpack": "0.800.3"
56
56
  }
57
57
  },
58
58
  "engines": {