Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (host: Tree) => {
visitTSSourceFiles(host, sourceFile => {
const ngrxDataImports = sourceFile.statements
.filter(ts.isImportDeclaration)
.filter(
({ moduleSpecifier }) =>
moduleSpecifier.getText(sourceFile) === "'ngrx-data'"
);
if (ngrxDataImports.length === 0) {
return;
}
const changes = [
...findNgrxDataImports(sourceFile, ngrxDataImports),
...findNgrxDataImportDeclarations(sourceFile, ngrxDataImports),
...findNgrxDataReplacements(sourceFile),
];