@schematics/angular 11.1.0-next.3 → 11.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "11.1.0-next.3",
3
+ "version": "11.1.1",
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": "11.1.0-next.3",
18
- "@angular-devkit/schematics": "11.1.0-next.3",
17
+ "@angular-devkit/core": "11.1.1",
18
+ "@angular-devkit/schematics": "11.1.1",
19
19
  "jsonc-parser": "3.0.0"
20
20
  },
21
21
  "repository": {
@@ -58,15 +58,7 @@ export declare function findNode(node: ts.Node, kind: ts.SyntaxKind, text: strin
58
58
  * @throw Error if toInsert is first occurence but fall back is not set
59
59
  */
60
60
  export declare function insertAfterLastOccurrence(nodes: ts.Node[], toInsert: string, file: string, fallbackPos: number, syntaxKind?: ts.SyntaxKind): Change;
61
- export declare function getContentOfKeyLiteral(_source: ts.SourceFile, node: ts.Node): string | null;
62
61
  export declare function getDecoratorMetadata(source: ts.SourceFile, identifier: string, module: string): ts.Node[];
63
- /**
64
- * Given a source file with @NgModule class(es), find the name of the first @NgModule class.
65
- *
66
- * @param source source file containing one or more @NgModule
67
- * @returns the name of the first @NgModule, or `undefined` if none is found
68
- */
69
- export declare function getFirstNgModuleName(source: ts.SourceFile): string | undefined;
70
62
  export declare function getMetadataField(node: ts.ObjectLiteralExpression, metadataField: string): ts.ObjectLiteralElement[];
71
63
  export declare function addSymbolToNgModuleMetadata(source: ts.SourceFile, ngModulePath: string, metadataField: string, symbolName: string, importPath?: string | null): Change[];
72
64
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addRouteDeclarationToModule = exports.getRouterModuleDeclaration = exports.getEnvironmentExportName = exports.isImported = exports.addEntryComponentToModule = exports.addBootstrapToModule = exports.addExportToModule = exports.addProviderToModule = exports.addImportToModule = exports.addDeclarationToModule = exports.addSymbolToNgModuleMetadata = exports.getMetadataField = exports.getFirstNgModuleName = exports.getDecoratorMetadata = exports.getContentOfKeyLiteral = exports.insertAfterLastOccurrence = exports.findNode = exports.getSourceNodes = exports.findNodes = exports.insertImport = void 0;
3
+ exports.addRouteDeclarationToModule = exports.getRouterModuleDeclaration = exports.getEnvironmentExportName = exports.isImported = exports.addEntryComponentToModule = exports.addBootstrapToModule = exports.addExportToModule = exports.addProviderToModule = exports.addImportToModule = exports.addDeclarationToModule = exports.addSymbolToNgModuleMetadata = exports.getMetadataField = exports.getDecoratorMetadata = exports.insertAfterLastOccurrence = exports.findNode = exports.getSourceNodes = exports.findNodes = exports.insertImport = void 0;
4
4
  /**
5
5
  * @license
6
6
  * Copyright Google Inc. All Rights Reserved.
@@ -167,18 +167,6 @@ function insertAfterLastOccurrence(nodes, toInsert, file, fallbackPos, syntaxKin
167
167
  return new change_1.InsertChange(file, lastItemPosition, toInsert);
168
168
  }
169
169
  exports.insertAfterLastOccurrence = insertAfterLastOccurrence;
170
- function getContentOfKeyLiteral(_source, node) {
171
- if (node.kind == ts.SyntaxKind.Identifier) {
172
- return node.text;
173
- }
174
- else if (node.kind == ts.SyntaxKind.StringLiteral) {
175
- return node.text;
176
- }
177
- else {
178
- return null;
179
- }
180
- }
181
- exports.getContentOfKeyLiteral = getContentOfKeyLiteral;
182
170
  function _angularImportsFromNode(node, _sourceFile) {
183
171
  const ms = node.moduleSpecifier;
184
172
  let modulePath;
@@ -261,42 +249,13 @@ function getDecoratorMetadata(source, identifier, module) {
261
249
  .map(expr => expr.arguments[0]);
262
250
  }
263
251
  exports.getDecoratorMetadata = getDecoratorMetadata;
264
- function findClassDeclarationParent(node) {
265
- if (ts.isClassDeclaration(node)) {
266
- return node;
267
- }
268
- return node.parent && findClassDeclarationParent(node.parent);
269
- }
270
- /**
271
- * Given a source file with @NgModule class(es), find the name of the first @NgModule class.
272
- *
273
- * @param source source file containing one or more @NgModule
274
- * @returns the name of the first @NgModule, or `undefined` if none is found
275
- */
276
- function getFirstNgModuleName(source) {
277
- // First, find the @NgModule decorators.
278
- const ngModulesMetadata = getDecoratorMetadata(source, 'NgModule', '@angular/core');
279
- if (ngModulesMetadata.length === 0) {
280
- return undefined;
281
- }
282
- // Then walk parent pointers up the AST, looking for the ClassDeclaration parent of the NgModule
283
- // metadata.
284
- const moduleClass = findClassDeclarationParent(ngModulesMetadata[0]);
285
- if (!moduleClass || !moduleClass.name) {
286
- return undefined;
287
- }
288
- // Get the class name of the module ClassDeclaration.
289
- return moduleClass.name.text;
290
- }
291
- exports.getFirstNgModuleName = getFirstNgModuleName;
292
252
  function getMetadataField(node, metadataField) {
293
253
  return node.properties
294
254
  .filter(ts.isPropertyAssignment)
295
255
  // Filter out every fields that's not "metadataField". Also handles string literals
296
256
  // (but not expressions).
297
257
  .filter(({ name }) => {
298
- return (ts.isIdentifier(name) || ts.isStringLiteral(name))
299
- && name.getText() === metadataField;
258
+ return (ts.isIdentifier(name) || ts.isStringLiteral(name)) && name.text === metadataField;
300
259
  });
301
260
  }
302
261
  exports.getMetadataField = getMetadataField;
@@ -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: '~11.1.0-next.3',
13
+ Angular: '~11.1.0',
14
14
  RxJs: '~6.6.0',
15
15
  ZoneJs: '~0.11.3',
16
16
  TypeScript: '~4.1.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.1101.0-next.3',
23
- DevkitBuildNgPackagr: '~0.1101.0-next.3',
24
- DevkitBuildWebpack: '~0.1101.0-next.3',
22
+ DevkitBuildAngular: '~0.1101.1',
23
+ DevkitBuildNgPackagr: '~0.1101.1',
24
+ DevkitBuildWebpack: '~0.1101.1',
25
25
  ngPackagr: '^11.0.0',
26
26
  };
@@ -4,9 +4,9 @@
4
4
  "scripts": {
5
5
  "ng": "ng",
6
6
  "start": "ng serve",
7
- "build": "ng build",
7
+ "build": "ng build"<% if (!minimal) { %>,
8
8
  "test": "ng test",
9
- "lint": "ng lint"
9
+ "lint": "ng lint"<% } %>
10
10
  },
11
11
  "private": true,
12
12
  "dependencies": {
@@ -35,9 +35,9 @@
35
35
  "karma-coverage": "~2.0.3",
36
36
  "karma-jasmine": "~4.0.0",
37
37
  "karma-jasmine-html-reporter": "^1.5.0",
38
- "protractor": "~7.0.0",<% } %>
38
+ "protractor": "~7.0.0",
39
39
  "ts-node": "~8.3.0",
40
- "tslint": "~6.1.0",
40
+ "tslint": "~6.1.0",<% } %>
41
41
  "typescript": "<%= latestVersions.TypeScript %>"
42
42
  }
43
43
  }