Skip to content

Commit 236229c

Browse files
authored
fix(migrations): changes version (#13985)
1 parent 16f32b0 commit 236229c

File tree

5 files changed

+64
-13
lines changed

5 files changed

+64
-13
lines changed

projects/igniteui-angular/migrations/migration-collection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@
166166
"version": "17.1.0",
167167
"description": "Updates Ignite UI for Angular from v17.0.x to v17.1.0",
168168
"factory": "./update-17_1_0"
169+
},
170+
"migration-34": {
171+
"version": "17.1.4",
172+
"description": "Updates Ignite UI for Angular from v17.1.x to v17.1.4",
173+
"factory": "./update-17_1_4"
169174
}
170175
}
171176
}

projects/igniteui-angular/migrations/update-17_1_0/index.spec.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,4 @@ describe(`Update to ${version}`, () => {
153153
`
154154
);
155155
});
156-
157-
it('should rename the expansion-panel $disabled-color property to $disabled-text-color', async () => {
158-
appTree.create(
159-
`/testSrc/appPrefix/component/test.component.scss`,
160-
`$custom-expansion-panel: expansion-panel-theme($disabled-color: color($default-palette, 'gray', 200));`
161-
);
162-
163-
const tree = await schematicRunner.runSchematic(migrationName, { shouldInvokeLS: false }, appTree);
164-
165-
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
166-
`$custom-expansion-panel: expansion-panel-theme($disabled-text-color: color($default-palette, 'gray', 200));`
167-
);
168-
});
169156
});

projects/igniteui-angular/migrations/update-17_1_0/changes/theme-changes.json renamed to projects/igniteui-angular/migrations/update-17_1_4/changes/theme-changes.json

File renamed without changes.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import * as path from 'path';
2+
3+
import { EmptyTree } from '@angular-devkit/schematics';
4+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
5+
6+
const version = '17.1.4';
7+
8+
describe(`Update to ${version}`, () => {
9+
let appTree: UnitTestTree;
10+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
11+
12+
const configJson = {
13+
projects: {
14+
testProj: {
15+
root: '/',
16+
sourceRoot: '/testSrc'
17+
}
18+
},
19+
schematics: {
20+
'@schematics/angular:component': {
21+
prefix: 'appPrefix'
22+
}
23+
}
24+
};
25+
26+
beforeEach(() => {
27+
appTree = new UnitTestTree(new EmptyTree());
28+
appTree.create('/angular.json', JSON.stringify(configJson));
29+
});
30+
31+
const migrationName = 'migration-34';
32+
33+
it('should rename the expansion-panel $disabled-color property to $disabled-text-color', async () => {
34+
appTree.create(
35+
`/testSrc/appPrefix/component/test.component.scss`,
36+
`$custom-expansion-panel: expansion-panel-theme($disabled-color: color($default-palette, 'gray', 200));`
37+
);
38+
39+
const tree = await schematicRunner.runSchematic(migrationName, { shouldInvokeLS: false }, appTree);
40+
41+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
42+
`$custom-expansion-panel: expansion-panel-theme($disabled-text-color: color($default-palette, 'gray', 200));`
43+
);
44+
});
45+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '17.1.4';
9+
10+
export default (): Rule => async (host: Tree, context: SchematicContext) => {
11+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
12+
const update = new UpdateChanges(__dirname, host, context);
13+
update.applyChanges();
14+
};

0 commit comments

Comments
 (0)