@igniteui/angular-schematics 17.1.1310-beta.0 → 17.1.1310-beta.4
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 +3 -3
- package/src/migrations/interfaces/options.d.ts +4 -0
- package/src/migrations/interfaces/options.js +2 -0
- package/src/migrations/migration-collection.json +4 -3
- package/src/migrations/schema.json +14 -0
- package/src/migrations/update-1/index.d.ts +2 -1
- package/src/migrations/update-1/index.js +7 -4
- package/src/migrations/update-1/index.spec.js +46 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igniteui/angular-schematics",
|
|
3
|
-
"version": "17.1.1310-beta.
|
|
3
|
+
"version": "17.1.1310-beta.4",
|
|
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.1.1310-beta.
|
|
26
|
-
"@igniteui/cli-core": "~13.1.0-beta.
|
|
25
|
+
"@igniteui/angular-templates": "~17.1.1310-beta.4",
|
|
26
|
+
"@igniteui/cli-core": "~13.1.0-beta.4",
|
|
27
27
|
"@schematics/angular": "~14.0.0",
|
|
28
28
|
"rxjs": "^6.6.3"
|
|
29
29
|
},
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
"$schema": "../../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
3
|
"schematics": {
|
|
4
4
|
"migration-01": {
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "Updates Ignite UI for Angular Schematics project from
|
|
7
|
-
"factory": "./update-1"
|
|
5
|
+
"version": "17.1.0",
|
|
6
|
+
"description": "Updates Ignite UI for Angular Schematics project from 17.0.x to 17.1.x",
|
|
7
|
+
"factory": "./update-1",
|
|
8
|
+
"schema": "./schema.json"
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "igniteui-angular--schematics",
|
|
4
|
+
"title": "IgniteUI for Angular Schematics",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"applyMigrations": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"description": "We've updated our view templates to use Standalone Components. Those are compatible with your project and you can start using them now or remain with `NgModule` dependencies.",
|
|
10
|
+
"default": true,
|
|
11
|
+
"x-prompt": "Would you like to continue with Standalone Components for new views?"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function default_1() {
|
|
3
|
+
function default_1(options) {
|
|
4
4
|
return (host, context) => {
|
|
5
5
|
var _a;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
if (!options.applyMigrations) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
context.logger.info("We've updated your project type to `igx-ts-legacy` to continue using `NgModule`-s. You can always change back to `igx-ts` should you want to start using Standalone Components.");
|
|
10
|
+
const igConfig = "./ignite-ui-cli.json";
|
|
8
11
|
if (host.exists(igConfig)) {
|
|
9
12
|
const content = JSON.parse(host.read(igConfig).toString());
|
|
10
13
|
if (((_a = content === null || content === void 0 ? void 0 : content.project) === null || _a === void 0 ? void 0 : _a.projectType) === "igx-ts") {
|
|
11
14
|
content.project.projectType = "igx-ts-legacy";
|
|
12
|
-
host.overwrite(igConfig, JSON.stringify(content, null,
|
|
15
|
+
host.overwrite(igConfig, JSON.stringify(content, null, 2));
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
};
|
|
@@ -12,61 +12,61 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const path = require("path");
|
|
13
13
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
14
|
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
15
|
-
describe("Update
|
|
15
|
+
describe("Update 17.1.0", () => {
|
|
16
16
|
let appTree;
|
|
17
17
|
const schematicRunner = new testing_1.SchematicTestRunner("ig-migrate", path.join(__dirname, "../migration-collection.json"));
|
|
18
18
|
beforeEach(() => {
|
|
19
19
|
appTree = new testing_1.UnitTestTree(new schematics_1.EmptyTree());
|
|
20
20
|
});
|
|
21
21
|
it("change projectType to legacy", (done) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
-
appTree.create("./
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
22
|
+
appTree.create("./ignite-ui-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
44
|
}
|
|
45
45
|
`);
|
|
46
|
-
const tree = yield schematicRunner.runSchematicAsync("migration-01", {}, appTree).toPromise();
|
|
47
|
-
expect(tree.readContent("./
|
|
46
|
+
const tree = yield schematicRunner.runSchematicAsync("migration-01", { applyMigrations: true }, appTree).toPromise();
|
|
47
|
+
expect(tree.readContent("./ignite-ui-cli.json"))
|
|
48
48
|
.toEqual(`{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
70
|
}`);
|
|
71
71
|
done();
|
|
72
72
|
}));
|