Skip to content

Commit c7b4afd

Browse files
committed
feat(exporters): added comma to migration comment
1 parent d2ca3c5 commit c7b4afd

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

projects/igniteui-angular/migrations/update-13_0_0/index.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ import { FormsModule } from "@angular/forms";
208208
import { BrowserModule } from "@angular/platform-browser";
209209
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
210210
import { AppComponent } from "./app.component";
211-
import { IgxExcelExporterService } from "igniteui-angular";
211+
import { IgxExcelExporterService, OtherService } from "igniteui-angular";
212212
import { ExcelExportComponent } from "./services/export-excel/excel-export.component";
213213
214214
@NgModule({
@@ -222,7 +222,7 @@ imports: [
222222
BrowserAnimationsModule,
223223
FormsModule
224224
],
225-
providers: [IgxExcelExporterService],
225+
providers: [IgxExcelExporterService , OtherService],
226226
entryComponents: [],
227227
schemas: []
228228
})
@@ -242,7 +242,7 @@ import { BrowserModule } from "@angular/platform-browser";
242242
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
243243
import { AppComponent } from "./app.component";
244244
// IgxExcelExporterService has been removed. Exporter services can now be used without providing.
245-
import { /*IgxExcelExporterService*/ } from "igniteui-angular";
245+
import { /*IgxExcelExporterService,*/ OtherService } from "igniteui-angular";
246246
import { ExcelExportComponent } from "./services/export-excel/excel-export.component";
247247
248248
@NgModule({
@@ -257,7 +257,7 @@ imports: [
257257
FormsModule
258258
],
259259
// IgxExcelExporterService has been removed. Exporter services can now be used without providing.
260-
providers: [/*IgxExcelExporterService*/],
260+
providers: [/*IgxExcelExporterService,*/ OtherService],
261261
entryComponents: [],
262262
schemas: []
263263
})

projects/igniteui-angular/migrations/update-13_0_0/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ export default (): Rule => (host: Tree, context: SchematicContext) => {
6969
SERVICES.forEach(service => {
7070
if (content.indexOf(service) > -1) {
7171
const commentedService = '/*' + service + '*/';
72+
const commentedServiceWithComa = '/*' + service + ',*/';
7273
content = content.replace(new RegExp(service, 'gi'), commentedService);
73-
const indexes = getIndicesOf(commentedService, content);
74+
content = content.replace(new RegExp('[/][*]' + service + '[*][/]\\s*[,]', 'gi'), commentedServiceWithComa);
75+
const indexes = getIndicesOf('/*' + service, content);
7476
indexes.reverse().forEach(index => {
7577
const preceedingContent = content.substring(0, index);
7678
const newLineIndex = preceedingContent.lastIndexOf('\n');

0 commit comments

Comments
 (0)