@angular-devkit/schematics 8.0.0-rc.1 → 8.0.0

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": "@angular-devkit/schematics",
3
- "version": "8.0.0-rc.1",
3
+ "version": "8.0.0",
4
4
  "description": "Angular Schematics - Library",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "schematics"
19
19
  ],
20
20
  "dependencies": {
21
- "@angular-devkit/core": "8.0.0-rc.1",
21
+ "@angular-devkit/core": "8.0.0",
22
22
  "rxjs": "6.4.0"
23
23
  },
24
24
  "repository": {
@@ -23,8 +23,20 @@ export declare class SchematicTestRunner {
23
23
  readonly logger: logging.Logger;
24
24
  readonly tasks: TaskConfiguration[];
25
25
  runSchematicAsync<SchematicSchemaT>(schematicName: string, opts?: SchematicSchemaT, tree?: Tree): Observable<UnitTestTree>;
26
+ /**
27
+ * @deprecated Since v8.0.0 - Use {@link SchematicTestRunner.runSchematicAsync} instead.
28
+ * All schematics can potentially be async.
29
+ * This synchronous variant will fail if the schematic, any of its rules, or any schematics
30
+ * it calls are async.
31
+ */
26
32
  runSchematic<SchematicSchemaT>(schematicName: string, opts?: SchematicSchemaT, tree?: Tree): UnitTestTree;
27
33
  runExternalSchematicAsync<SchematicSchemaT>(collectionName: string, schematicName: string, opts?: SchematicSchemaT, tree?: Tree): Observable<UnitTestTree>;
34
+ /**
35
+ * @deprecated Since v8.0.0 - Use {@link SchematicTestRunner.runExternalSchematicAsync} instead.
36
+ * All schematics can potentially be async.
37
+ * This synchronous variant will fail if the schematic, any of its rules, or any schematics
38
+ * it calls are async.
39
+ */
28
40
  runExternalSchematic<SchematicSchemaT>(collectionName: string, schematicName: string, opts?: SchematicSchemaT, tree?: Tree): UnitTestTree;
29
41
  callRule(rule: Rule, tree: Tree, parentContext?: Partial<SchematicContext>): Observable<Tree>;
30
42
  }
@@ -55,6 +55,12 @@ class SchematicTestRunner {
55
55
  return schematic.call(opts || {}, host, { logger: this._logger })
56
56
  .pipe(operators_1.map(tree => new UnitTestTree(tree)));
57
57
  }
58
+ /**
59
+ * @deprecated Since v8.0.0 - Use {@link SchematicTestRunner.runSchematicAsync} instead.
60
+ * All schematics can potentially be async.
61
+ * This synchronous variant will fail if the schematic, any of its rules, or any schematics
62
+ * it calls are async.
63
+ */
58
64
  runSchematic(schematicName, opts, tree) {
59
65
  const schematic = this._collection.createSchematic(schematicName, true);
60
66
  let result = null;
@@ -79,6 +85,12 @@ class SchematicTestRunner {
79
85
  return schematic.call(opts || {}, host, { logger: this._logger })
80
86
  .pipe(operators_1.map(tree => new UnitTestTree(tree)));
81
87
  }
88
+ /**
89
+ * @deprecated Since v8.0.0 - Use {@link SchematicTestRunner.runExternalSchematicAsync} instead.
90
+ * All schematics can potentially be async.
91
+ * This synchronous variant will fail if the schematic, any of its rules, or any schematics
92
+ * it calls are async.
93
+ */
82
94
  runExternalSchematic(collectionName, schematicName, opts, tree) {
83
95
  const externalCollection = this._engine.createCollection(collectionName);
84
96
  const schematic = externalCollection.createSchematic(schematicName, true);
@@ -224,7 +224,7 @@ class FileSystemEngineHostBase {
224
224
  return (rxjs_1.of(options)
225
225
  .pipe(...this._transforms.map(tFn => operators_1.mergeMap(opt => {
226
226
  const newOptions = tFn(schematic, opt, context);
227
- if (core_1.isObservable(newOptions)) {
227
+ if (rxjs_1.isObservable(newOptions)) {
228
228
  return newOptions;
229
229
  }
230
230
  else if (core_1.isPromise(newOptions)) {