@schematics/angular 9.0.3 → 9.0.7

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,6 +1,6 @@
1
1
  import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
2
 
3
- import { <%= classify(name) %><%= classify(type) %> } from './<%= dasherize(name) %>.<%= dasherize(type) %>';
3
+ import { <%= classify(name) %><%= classify(type) %> } from './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>';
4
4
 
5
5
  describe('<%= classify(name) %><%= classify(type) %>', () => {
6
6
  let component: <%= classify(name) %><%= classify(type) %>;
@@ -7,9 +7,9 @@ import { Component, OnInit<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }
7
7
  <%= dasherize(name) %> works!
8
8
  </p>
9
9
  `,<% } else { %>
10
- templateUrl: './<%= dasherize(name) %>.<%= dasherize(type) %>.html',<% } if(inlineStyle) { %>
10
+ templateUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.html',<% } if(inlineStyle) { %>
11
11
  styles: []<% } else { %>
12
- styleUrls: ['./<%= dasherize(name) %>.<%= dasherize(type) %>.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>,
12
+ styleUrls: ['./<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>,
13
13
  encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
14
14
  changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
15
15
  })
@@ -30,13 +30,13 @@ function addDeclarationToNgModule(options) {
30
30
  if (options.skipImport || !options.module) {
31
31
  return host;
32
32
  }
33
- options.type = !!options.type ? options.type : 'Component';
33
+ options.type = options.type != null ? options.type : 'Component';
34
34
  const modulePath = options.module;
35
35
  const source = readIntoSourceFile(host, modulePath);
36
36
  const componentPath = `/${options.path}/`
37
37
  + (options.flat ? '' : core_1.strings.dasherize(options.name) + '/')
38
38
  + core_1.strings.dasherize(options.name)
39
- + '.'
39
+ + (options.type ? '.' : '')
40
40
  + core_1.strings.dasherize(options.type);
41
41
  const relativePath = find_module_1.buildRelativePath(modulePath, componentPath);
42
42
  const classifiedName = core_1.strings.classify(options.name) + core_1.strings.classify(options.type);
@@ -108,6 +108,17 @@ function default_1(options) {
108
108
  'if-flat': (s) => options.flat ? '' : s,
109
109
  ...options,
110
110
  }),
111
+ !options.type ? schematics_1.forEach((file => {
112
+ if (!!file.path.match(new RegExp('..'))) {
113
+ return {
114
+ content: file.content,
115
+ path: file.path.replace('..', '.'),
116
+ };
117
+ }
118
+ else {
119
+ return file;
120
+ }
121
+ })) : schematics_1.noop(),
111
122
  schematics_1.move(parsedPath.path),
112
123
  ]);
113
124
  return schematics_1.chain([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "9.0.3",
3
+ "version": "9.0.7",
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": "9.0.3",
18
- "@angular-devkit/schematics": "9.0.3"
17
+ "@angular-devkit/core": "9.0.7",
18
+ "@angular-devkit/schematics": "9.0.7"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -9,7 +9,7 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.latestVersions = {
11
11
  // These versions should be kept up to date with latest Angular peer dependencies.
12
- Angular: '~9.0.2',
12
+ Angular: '~9.0.7',
13
13
  RxJs: '~6.5.4',
14
14
  ZoneJs: '~0.10.2',
15
15
  TypeScript: '~3.7.5',
@@ -17,8 +17,8 @@ exports.latestVersions = {
17
17
  // The versions below must be manually updated when making a new devkit release.
18
18
  // For our e2e tests, these versions must match the latest tag present on the branch.
19
19
  // During RC periods they will not match the latest RC though, and should not be updated.
20
- DevkitBuildAngular: '~0.900.3',
21
- DevkitBuildNgPackagr: '~0.900.3',
22
- DevkitBuildWebpack: '~0.900.3',
20
+ DevkitBuildAngular: '~0.900.7',
21
+ DevkitBuildNgPackagr: '~0.900.7',
22
+ DevkitBuildWebpack: '~0.900.7',
23
23
  ngPackagr: '^9.0.0',
24
24
  };
@@ -16,9 +16,6 @@
16
16
  "moduleResolution": "node",
17
17
  "importHelpers": true,
18
18
  "target": "es2015",
19
- "typeRoots": [
20
- "node_modules/@types"
21
- ],
22
19
  "lib": [
23
20
  "es2018",
24
21
  "dom"