@schematics/angular 10.1.0-rc.0 → 10.1.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.
@@ -261,7 +261,7 @@ function default_1(options) {
261
261
  const isRootApp = options.projectRoot !== undefined;
262
262
  const appDir = isRootApp
263
263
  ? core_1.normalize(options.projectRoot || '')
264
- : core_1.join(core_1.normalize(newProjectRoot), options.name);
264
+ : core_1.join(core_1.normalize(newProjectRoot), core_1.strings.dasherize(options.name));
265
265
  const sourceDir = `${appDir}/src/app`;
266
266
  const e2eOptions = {
267
267
  relatedAppName: options.name,
@@ -25,7 +25,7 @@ export class <%= classify(name) %>Guard implements <%= implementations %> {
25
25
  }
26
26
  <% } %><% if (implements.includes('CanLoad')) { %>canLoad(
27
27
  route: Route,
28
- segments: UrlSegment[]): Observable<boolean> | Promise<boolean> | boolean {
28
+ segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
29
29
  return true;
30
30
  }<% } %>
31
31
  }
@@ -30,14 +30,22 @@ function* visitExtendedJsonFiles(directory) {
30
30
  function default_1() {
31
31
  return (host, context) => {
32
32
  const logger = context.logger;
33
- const files = new json_file_1.JSONFile(host, 'tsconfig.json').get(['files']);
34
- if (!(Array.isArray(files) && files.length === 0)) {
35
- logger.info('Migration has already been executed.');
36
- return;
33
+ const tsConfigExists = host.exists('tsconfig.json');
34
+ if (tsConfigExists) {
35
+ const files = new json_file_1.JSONFile(host, 'tsconfig.json').get(['files']);
36
+ if (!(Array.isArray(files) && files.length === 0)) {
37
+ logger.info('Migration has already been executed.');
38
+ return;
39
+ }
37
40
  }
38
41
  if (host.exists('tsconfig.base.json')) {
39
- host.overwrite('tsconfig.json', host.read('tsconfig.base.json') || '');
40
- host.delete('tsconfig.base.json');
42
+ if (tsConfigExists) {
43
+ host.overwrite('tsconfig.json', host.read('tsconfig.base.json') || '');
44
+ host.delete('tsconfig.base.json');
45
+ }
46
+ else {
47
+ host.rename('tsconfig.base.json', 'tsconfig.json');
48
+ }
41
49
  }
42
50
  // Iterate over all tsconfig files and change the extends from 'tsconfig.base.json' to 'tsconfig.json'.
43
51
  const extendsJsonPath = ['extends'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "10.1.0-rc.0",
3
+ "version": "10.1.3",
4
4
  "description": "Schematics specific to Angular",
5
5
  "keywords": [
6
6
  "angular",
@@ -14,8 +14,8 @@
14
14
  ],
15
15
  "schematics": "./collection.json",
16
16
  "dependencies": {
17
- "@angular-devkit/core": "10.1.0-rc.0",
18
- "@angular-devkit/schematics": "10.1.0-rc.0",
17
+ "@angular-devkit/core": "10.1.3",
18
+ "@angular-devkit/schematics": "10.1.3",
19
19
  "jsonc-parser": "2.3.0"
20
20
  },
21
21
  "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: '~10.1.0-rc.0',
13
+ Angular: '~10.1.3',
14
14
  RxJs: '~6.6.0',
15
15
  ZoneJs: '~0.10.2',
16
16
  TypeScript: '~4.0.2',
@@ -19,8 +19,8 @@ exports.latestVersions = {
19
19
  // For our e2e tests, these versions must match the latest tag present on the branch.
20
20
  // During RC periods they will not match the latest RC until there's a new git tag, and
21
21
  // should not be updated.
22
- DevkitBuildAngular: '~0.1001.0-rc.0',
23
- DevkitBuildNgPackagr: '~0.1001.0-rc.0',
24
- DevkitBuildWebpack: '~0.1001.0-rc.0',
25
- ngPackagr: '^10.0.0',
22
+ DevkitBuildAngular: '~0.1001.3',
23
+ DevkitBuildNgPackagr: '~0.1001.3',
24
+ DevkitBuildWebpack: '~0.1001.3',
25
+ ngPackagr: '^10.1.0',
26
26
  };