Skip to content

Commit e0eb8e1

Browse files
committed
fix(igx-ts-legacy): revert migrations changes
1 parent 48296e8 commit e0eb8e1

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

packages/cli/migrations/update-2/index.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe("Update 2.0.0", () => {
1515

1616
it("should update router event rxjs subscription", async () => {
1717
appTree.create(
18-
"/src/app/app.ts",
18+
"/src/app/app.component.ts",
1919
`import { Component, OnInit, ViewChild } from '@angular/core';
2020
import { NavigationStart, Router } from '@angular/router';
2121
import 'rxjs/add/operator/filter';
@@ -25,10 +25,10 @@ import { IgxNavigationDrawerComponent } from 'igniteui-angular';
2525
2626
@Component({
2727
selector: 'app-root',
28-
templateUrl: './app.html',
29-
styleUrl: './app.css'
28+
templateUrl: './app.component.html',
29+
styleUrls: ['./app.component.css']
3030
})
31-
export class App implements OnInit {
31+
export class AppComponent implements OnInit {
3232
@ViewChild(IgxNavigationDrawerComponent, { static: true }) public navdrawer: IgxNavigationDrawerComponent;
3333
3434
constructor(private router: Router) {}
@@ -47,7 +47,7 @@ export class App implements OnInit {
4747
);
4848

4949
const tree = await schematicRunner.runSchematic("migration-01", {}, appTree);
50-
expect(tree.readContent("/src/app/app.ts"))
50+
expect(tree.readContent("/src/app/app.component.ts"))
5151
.toEqual(
5252
`import { Component, OnInit, ViewChild } from '@angular/core';
5353
import { NavigationStart, Router } from '@angular/router';
@@ -58,10 +58,10 @@ import { IgxNavigationDrawerComponent } from 'igniteui-angular';
5858
5959
@Component({
6060
selector: 'app-root',
61-
templateUrl: './app.html',
62-
styleUrl: './app.css'
61+
templateUrl: './app.component.html',
62+
styleUrls: ['./app.component.css']
6363
})
64-
export class App implements OnInit {
64+
export class AppComponent implements OnInit {
6565
@ViewChild(IgxNavigationDrawerComponent, { static: true }) public navdrawer: IgxNavigationDrawerComponent;
6666
6767
constructor(private router: Router) {}

packages/cli/migrations/update-2/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function(): Rule {
55
return (host: Tree, context: SchematicContext) => {
66
context.logger.info("Updating project to Ignite UI CLI 2.0.0");
77

8-
const appComponentPath = "src/app/app.ts";
8+
const appComponentPath = "src/app/app.component.ts";
99

1010
if (host.exists(appComponentPath)) {
1111
let content = host.read(appComponentPath).toString();

packages/cli/migrations/update-3/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ h3 {
7272
});
7373

7474
it("should remove forRoot() from IgxGridModule", async () => {
75-
const indexFile = "/src/app/app-module.ts";
75+
const indexFile = "/src/app/app.module.ts";
7676
appTree.create(indexFile,
7777
`@NgModule({
7878
imports: [

packages/cli/migrations/update-3/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ h3 {
2424
}
2525

2626
function removeGridForRoot(host: Tree) {
27-
const appModulePath = "src/app/app-module.ts";
27+
const appModulePath = "src/app/app.module.ts";
2828
if (host.exists(appModulePath)) {
2929
let content = host.read(appModulePath).toString();
3030
if (content.indexOf("IgxGridModule.forRoot()") !== -1) {

packages/cli/migrations/update-5_0_0/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ indent_size = 2
3232
});
3333

3434
it("should add HammerModule", async () => {
35-
const indexFile = "/src/app/app-module.ts";
35+
const indexFile = "/src/app/app.module.ts";
3636
appTree.create(indexFile,
3737
`import { BrowserModule } from '@angular/platform-browser';
3838
@NgModule({

packages/cli/migrations/update-5_0_0/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function(): Rule {
4242
workspace.projects.get(workspace.extensions.defaultProject as string) :
4343
workspace.projects.values().next().value as workspaces.ProjectDefinition;
4444

45-
const moduleFile = `${project.sourceRoot}/${project.prefix}/app-module.ts`;
45+
const moduleFile = `${project.sourceRoot}/${project.prefix}/app.module.ts`;
4646

4747
context.logger.info(`Applying migration for Ignite UI CLI 5.0.0`);
4848

0 commit comments

Comments
 (0)