@igniteui/angular-schematics 17.0.1301 → 17.1.1310-beta.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": "@igniteui/angular-schematics",
3
- "version": "17.0.1301",
3
+ "version": "17.1.1310-beta.0",
4
4
  "description": "Ignite UI for Angular Schematics for ng new and ng generate",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,8 @@
22
22
  "dependencies": {
23
23
  "@angular-devkit/core": "~14.0.0",
24
24
  "@angular-devkit/schematics": "~14.0.0",
25
- "@igniteui/angular-templates": "~17.0.1301",
26
- "@igniteui/cli-core": "~13.0.1",
25
+ "@igniteui/angular-templates": "~17.1.1310-beta.0",
26
+ "@igniteui/cli-core": "~13.1.0-beta.0",
27
27
  "@schematics/angular": "~14.0.0",
28
28
  "rxjs": "^6.6.3"
29
29
  },
@@ -10,9 +10,7 @@ class SchematicsTemplateManager extends cli_core_1.BaseTemplateManager {
10
10
  this.frameworks.push({
11
11
  id: "angular",
12
12
  name: "angular",
13
- projectLibraries: [
14
- require("@igniteui/angular-templates").default
15
- ]
13
+ projectLibraries: require("@igniteui/angular-templates").default
16
14
  });
17
15
  }
18
16
  loadFromConfig(filePath) {
@@ -1,5 +1,10 @@
1
1
  {
2
2
  "$schema": "../../../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
3
  "schematics": {
4
+ "migration-01": {
5
+ "version": "XXX",
6
+ "description": "Updates Ignite UI for Angular Schematics project from XXX to XXX",
7
+ "factory": "./update-1"
8
+ }
4
9
  }
5
10
  }
@@ -0,0 +1,2 @@
1
+ import { Rule } from "@angular-devkit/schematics";
2
+ export default function (): Rule;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function default_1() {
4
+ return (host, context) => {
5
+ var _a;
6
+ context.logger.info("Updating project to Ignite UI CLI XXX");
7
+ const igConfig = "./igniteui-cli.json";
8
+ if (host.exists(igConfig)) {
9
+ const content = JSON.parse(host.read(igConfig).toString());
10
+ if (((_a = content === null || content === void 0 ? void 0 : content.project) === null || _a === void 0 ? void 0 : _a.projectType) === "igx-ts") {
11
+ content.project.projectType = "igx-ts-legacy";
12
+ host.overwrite(igConfig, JSON.stringify(content, null, 4));
13
+ }
14
+ }
15
+ };
16
+ }
17
+ exports.default = default_1;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const path = require("path");
13
+ const schematics_1 = require("@angular-devkit/schematics");
14
+ const testing_1 = require("@angular-devkit/schematics/testing");
15
+ describe("Update XXX", () => {
16
+ let appTree;
17
+ const schematicRunner = new testing_1.SchematicTestRunner("ig-migrate", path.join(__dirname, "../migration-collection.json"));
18
+ beforeEach(() => {
19
+ appTree = new testing_1.UnitTestTree(new schematics_1.EmptyTree());
20
+ });
21
+ it("change projectType to legacy", (done) => __awaiter(void 0, void 0, void 0, function* () {
22
+ appTree.create("./igniteui-cli.json", `{
23
+ "igPackageRegistry": "https://packages.infragistics.com/npm/js-licensed/",
24
+ "customTemplates": [],
25
+ "skipGit": false,
26
+ "skipAnalytic": false,
27
+ "version": "13.0.1",
28
+ "project": {
29
+ "defaultPort": 4200,
30
+ "framework": "angular",
31
+ "projectType": "igx-ts",
32
+ "projectTemplate": "side-nav",
33
+ "theme": "Default",
34
+ "themePath": "node_modules/igniteui-angular/styles/igniteui-angular.css",
35
+ "isBundle": false,
36
+ "bundleFilePath": "",
37
+ "igniteuiSource": "",
38
+ "components": [],
39
+ "sourceFiles": [],
40
+ "isShowcase": false,
41
+ "version": ""
42
+ },
43
+ "build": {}
44
+ }
45
+ `);
46
+ const tree = yield schematicRunner.runSchematicAsync("migration-01", {}, appTree).toPromise();
47
+ expect(tree.readContent("./igniteui-cli.json"))
48
+ .toEqual(`{
49
+ "igPackageRegistry": "https://packages.infragistics.com/npm/js-licensed/",
50
+ "customTemplates": [],
51
+ "skipGit": false,
52
+ "skipAnalytic": false,
53
+ "version": "13.0.1",
54
+ "project": {
55
+ "defaultPort": 4200,
56
+ "framework": "angular",
57
+ "projectType": "igx-ts-legacy",
58
+ "projectTemplate": "side-nav",
59
+ "theme": "Default",
60
+ "themePath": "node_modules/igniteui-angular/styles/igniteui-angular.css",
61
+ "isBundle": false,
62
+ "bundleFilePath": "",
63
+ "igniteuiSource": "",
64
+ "components": [],
65
+ "sourceFiles": [],
66
+ "isShowcase": false,
67
+ "version": ""
68
+ },
69
+ "build": {}
70
+ }`);
71
+ done();
72
+ }));
73
+ });