Skip to content

Commit

Permalink
fix(component-store): applying changes due to code review
Browse files Browse the repository at this point in the history
  • Loading branch information
rainerhahnekamp committed Jun 17, 2024
1 parent 845f117 commit 252f677
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class SomeEffects {}
expect(logEntries[0]).toMatchObject({
message:
'[@ngrx/component-store] Skipping because of multiple `tapResponse` imports',
level: 'warn',
level: 'info',
});
});

Expand Down
5 changes: 2 additions & 3 deletions modules/component-store/migrations/18_0_0-beta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
visitTSSourceFiles,
} from '../../schematics-core';
import { createRemoveChange } from '../../schematics-core/utility/change';
import * as os from 'node:os';

export function migrateTapResponseImport(): Rule {
return (tree: Tree, ctx: SchematicContext) => {
Expand Down Expand Up @@ -47,7 +46,7 @@ export function migrateTapResponseImport(): Rule {
if (componentStoreImportsAndDeclarations.length === 0) {
return;
} else if (componentStoreImportsAndDeclarations.length > 1) {
ctx.logger.warn(
ctx.logger.info(
'[@ngrx/component-store] Skipping because of multiple `tapResponse` imports'
);
return;
Expand Down Expand Up @@ -125,7 +124,7 @@ export function migrateTapResponseImport(): Rule {
new InsertChange(
sourceFile.fileName,
componentStoreImportDeclaration.getEnd() + 1,
`${newOperatorsImport}${os.EOL}`
`${newOperatorsImport}\n` // not os-independent for snapshot tests
)
);
}
Expand Down

0 comments on commit 252f677

Please sign in to comment.