Skip to content

Commit 674ff68

Browse files
committed
Find and replace on upgrade
1 parent 1062278 commit 674ff68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/schematics/update/v7/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ export const ngUpdate = (): Rule => (
4646
return;
4747
}
4848
// TODO clean this up
49-
content.replace(/(?<key>import|export)\s+(?:(?<alias>[\w,{}\s\*]+)\s+from)?\s*(?:(["'])?firebase\/(?<ref>[@\w\s\\\/.-]+)\3?)\s*;/, "$1 $2 from $3firebase/compat/$4$3;");
50-
content.replace(/(?<key>import|export)\s+(?:(?<alias>[\w,{}\s\*]+)\s+from)?\s*(?:(["'])?@firebase\/(?<ref>[@\w\s\\\/.-]+)\3?)\s*;/, "$1 $2 from $3@firebase/compat/$4$3;");
51-
content.replace(/(?<key>import|export)\s+(?:(?<alias>[\w,{}\s\*]+)\s+from)?\s*(?:(["'])?@angular\/fire\/(?<ref>[@\w\s\\\/.-]+)\3?)\s*;/, "$1 $2 from $3@angular/fire/compat/$4$3;");
49+
content.replace(/(?<key>import|export)\s+(?:(?<alias>[\w,{}\s\*]+)\s+from)?\s*(?:(["'])?firebase\/(?<ref>[@\w\s\\\/.-]+)\3?)\s*;/, '$1 $2 from $3firebase/compat/$4$3;');
50+
content.replace(/(?<key>import|export)\s+(?:(?<alias>[\w,{}\s\*]+)\s+from)?\s*(?:(["'])?@firebase\/(?<ref>[@\w\s\\\/.-]+)\3?)\s*;/, '$1 $2 from $3@firebase/compat/$4$3;');
51+
content.replace(/(?<key>import|export)\s+(?:(?<alias>[\w,{}\s\*]+)\s+from)?\s*(?:(["'])?@angular\/fire\/(?<ref>[@\w\s\\\/.-]+)\3?)\s*;/, '$1 $2 from $3@angular/fire/compat/$4$3;');
5252
host.overwrite(filePath, content);
5353
console.log(filePath);
5454
});

0 commit comments

Comments
 (0)