Skip to content

Commit 36a8882

Browse files
alan-agius4clydin
authored andcommitted
refactor(@schematics/angular): remove migration of non LTS versions
With this change we remove migrations for non LTS version of Angular CLI.
1 parent 3705483 commit 36a8882

23 files changed

+6
-3657
lines changed

packages/schematics/angular/migrations/migration-collection.json

+2-42
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,13 @@
11
{
22
"schematics": {
3-
"migration-01": {
4-
"version": "6.0.0-beta.8",
5-
"factory": "./update-6",
6-
"description": "Update an Angular CLI project to version 6."
7-
},
8-
"migration-02": {
9-
"version": "7.0.0-beta.0",
10-
"factory": "./update-7",
11-
"description": "Update an Angular CLI project to version 7."
12-
},
13-
"migration-03": {
14-
"version": "7.0.0-rc.0",
15-
"factory": "./update-7/index#polyfillMetadataRule",
16-
"description": "Update an Angular CLI project to version 7."
17-
},
18-
"migration-04": {
19-
"version": "7.1.0-beta.0",
20-
"factory": "./update-7/index#typeScriptHelpersRule",
21-
"description": "Update an Angular CLI project to version 7."
22-
},
23-
"migration-05": {
24-
"version": "7.0.4",
25-
"factory": "./update-7",
26-
"description": "Update an Angular CLI project to version 7."
27-
},
28-
"migration-06": {
29-
"version": "7.0.3",
30-
"factory": "./update-7/index#updateDevkitBuildNgPackagr",
31-
"description": "Update an Angular CLI project to version 7."
32-
},
33-
"migration-07": {
34-
"version": "8.0.0-beta.12",
35-
"factory": "./update-8",
36-
"description": "Update an Angular CLI project to version 8."
37-
},
38-
"migration-08": {
39-
"version": "8.0.0-beta.14",
40-
"factory": "./update-8/#updateLazyModulePaths",
41-
"description": "Update an Angular CLI project to version 8."
42-
},
433
"workspace-version-9": {
444
"version": "9.0.0-beta.0",
455
"factory": "./update-9",
466
"description": "Angular Workspace migration. Update an Angular CLI workspace to version 9."
477
},
488
"lazy-loading-syntax": {
499
"version": "9.0.0-next.6",
50-
"factory": "./update-8/#updateLazyModulePaths",
10+
"factory": "./update-12/update-lazy-module-paths",
5111
"description": "Lazy loading syntax migration. Update lazy loading syntax to use dynamic imports."
5212
},
5313
"schematic-options-9": {
@@ -142,7 +102,7 @@
142102
},
143103
"lazy-loading-string-syntax": {
144104
"version": "12.0.0-next.4",
145-
"factory": "./update-8/#updateLazyModulePaths",
105+
"factory": "./update-12/update-lazy-module-paths",
146106
"description": "Lazy loading syntax migration. Update lazy loading string syntax to use dynamic imports."
147107
},
148108
"remove-deprecated-i18n-options": {

packages/schematics/angular/migrations/update-8/update-lazy-module-paths.ts renamed to packages/schematics/angular/migrations/update-12/update-lazy-module-paths.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function* visit(directory: DirEntry): IterableIterator<ts.SourceFile> {
3737
}
3838
}
3939

40-
export function updateLazyModulePaths(): Rule {
40+
export default function(): Rule {
4141
return tree => {
4242
for (const sourceFile of visit(tree.root)) {
4343
let recorder: UpdateRecorder | undefined;

packages/schematics/angular/migrations/update-8/update-lazy-module-paths_spec.ts renamed to packages/schematics/angular/migrations/update-12/update-lazy-module-paths_spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Migration to version 8', () => {
5050
it('should replace the module path string', async () => {
5151
tree.create(lazyRoutePath, Buffer.from(lazyRoute));
5252

53-
await schematicRunner.runSchematicAsync('migration-08', {}, tree).toPromise();
53+
await schematicRunner.runSchematicAsync('lazy-loading-string-syntax', {}, tree).toPromise();
5454
await schematicRunner.engine.executePostTasks().toPromise();
5555

5656
const routes = tree.readContent(lazyRoutePath);
@@ -63,7 +63,7 @@ describe('Migration to version 8', () => {
6363
it('should replace the module path string in a child path', async () => {
6464
tree.create(lazyRoutePath, Buffer.from(lazyChildRoute));
6565

66-
await schematicRunner.runSchematicAsync('migration-08', {}, tree).toPromise();
66+
await schematicRunner.runSchematicAsync('lazy-loading-string-syntax', {}, tree).toPromise();
6767
await schematicRunner.engine.executePostTasks().toPromise();
6868

6969
const routes = tree.readContent(lazyRoutePath);
@@ -77,7 +77,7 @@ describe('Migration to version 8', () => {
7777
it('should replace the module path string when file has BOM', async () => {
7878
tree.create(lazyRoutePath, '\uFEFF' + Buffer.from(lazyRoute).toString());
7979

80-
await schematicRunner.runSchematicAsync('migration-08', {}, tree).toPromise();
80+
await schematicRunner.runSchematicAsync('lazy-loading-string-syntax', {}, tree).toPromise();
8181
await schematicRunner.engine.executePostTasks().toPromise();
8282

8383
const routes = tree.readContent(lazyRoutePath);

0 commit comments

Comments
 (0)