@schematics/angular 12.0.0-rc.2 → 12.0.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.
@@ -67,16 +67,7 @@ function addAppToWorkspaceFile(options, appDir) {
67
67
  schematics['@schematics/angular:component'] = componentSchematicsOptions;
68
68
  }
69
69
  if (options.skipTests || options.minimal) {
70
- [
71
- 'class',
72
- 'component',
73
- 'directive',
74
- 'guard',
75
- 'interceptor',
76
- 'module',
77
- 'pipe',
78
- 'service',
79
- ].forEach((type) => {
70
+ ['class', 'component', 'directive', 'guard', 'interceptor', 'pipe', 'service'].forEach((type) => {
80
71
  if (!(`@schematics/angular:${type}` in schematics)) {
81
72
  schematics[`@schematics/angular:${type}`] = {};
82
73
  }
@@ -115,6 +115,11 @@
115
115
  "factory": "./update-12/update-web-workers",
116
116
  "description": "Updates Web Worker consumer usage to use the new syntax supported directly by Webpack 5."
117
117
  },
118
+ "schematic-options-12": {
119
+ "version": "12.0.1",
120
+ "factory": "./update-12/schematic-options",
121
+ "description": "Remove invalid 'skipTests' option in '@schematics/angular:module' Angular schematic options."
122
+ },
118
123
  "production-by-default": {
119
124
  "version": "9999.0.0",
120
125
  "factory": "./update-12/production-default-config",
@@ -0,0 +1,9 @@
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
+ import { Rule } from '@angular-devkit/schematics';
9
+ export default function (): Rule;
@@ -0,0 +1,38 @@
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
+ const core_1 = require("@angular-devkit/core");
11
+ const workspace_1 = require("../../utility/workspace");
12
+ function default_1() {
13
+ return workspace_1.updateWorkspace((workspace) => {
14
+ // Update root level schematics options if present
15
+ const rootSchematics = workspace.extensions.schematics;
16
+ if (rootSchematics && core_1.json.isJsonObject(rootSchematics)) {
17
+ updateSchematicsField(rootSchematics);
18
+ }
19
+ // Update project level schematics options if present
20
+ for (const [, project] of workspace.projects) {
21
+ const projectSchematics = project.extensions.schematics;
22
+ if (projectSchematics && core_1.json.isJsonObject(projectSchematics)) {
23
+ updateSchematicsField(projectSchematics);
24
+ }
25
+ }
26
+ });
27
+ }
28
+ exports.default = default_1;
29
+ function updateSchematicsField(schematics) {
30
+ for (const [schematicName, schematicOptions] of Object.entries(schematics)) {
31
+ if (!core_1.json.isJsonObject(schematicOptions)) {
32
+ continue;
33
+ }
34
+ if (schematicName === '@schematics/angular:module') {
35
+ delete schematicOptions.skipTests;
36
+ }
37
+ }
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "12.0.0-rc.2",
3
+ "version": "12.0.2",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -15,8 +15,8 @@
15
15
  ],
16
16
  "schematics": "./collection.json",
17
17
  "dependencies": {
18
- "@angular-devkit/core": "12.0.0-rc.2",
19
- "@angular-devkit/schematics": "12.0.0-rc.2",
18
+ "@angular-devkit/core": "12.0.2",
19
+ "@angular-devkit/schematics": "12.0.2",
20
20
  "jsonc-parser": "3.0.0"
21
21
  },
22
22
  "repository": {
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.latestVersions = void 0;
11
11
  exports.latestVersions = {
12
12
  // These versions should be kept up to date with latest Angular peer dependencies.
13
- Angular: '~12.0.0-rc.2',
13
+ Angular: '~12.0.2',
14
14
  RxJs: '~6.6.0',
15
15
  ZoneJs: '~0.11.4',
16
16
  TypeScript: '~4.2.3',
@@ -19,5 +19,5 @@ exports.latestVersions = {
19
19
  // published together from the same monorepo, and they are both
20
20
  // non-experimental, they will always have the same version.
21
21
  DevkitBuildAngular: '~' + require('../package.json')['version'],
22
- ngPackagr: '^12.0.0-next.8',
22
+ ngPackagr: '^12.0.0',
23
23
  };
@@ -12,7 +12,7 @@ Run `ng generate component component-name` to generate a new component. You can
12
12
 
13
13
  ## Build
14
14
 
15
- Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
15
+ Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16
16
 
17
17
  ## Running unit tests
18
18
 
@@ -20,7 +20,7 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
20
20
 
21
21
  ## Running end-to-end tests
22
22
 
23
- Run `ng e2e` to execute the end-to-end tests via a platform of your choice.
23
+ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24
24
 
25
25
  ## Further help
26
26