-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(store): add ngrx-store-freeze migration (#1901)
Closes #1896
- Loading branch information
1 parent
5a09844
commit 4146650
Showing
39 changed files
with
1,343 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import * as ts from 'typescript'; | ||
import { Tree } from '@angular-devkit/schematics'; | ||
|
||
export function visitTSSourceFiles<Result = void>( | ||
tree: Tree, | ||
visitor: ( | ||
sourceFile: ts.SourceFile, | ||
tree: Tree, | ||
result?: Result | ||
) => Result | undefined | ||
): Result | undefined { | ||
let result: Result | undefined = undefined; | ||
|
||
tree.visit(path => { | ||
if (!path.endsWith('.ts')) { | ||
return; | ||
} | ||
|
||
const sourceFile = ts.createSourceFile( | ||
path, | ||
tree.read(path)!.toString(), | ||
ts.ScriptTarget.Latest | ||
); | ||
|
||
if (sourceFile.isDeclarationFile) { | ||
return; | ||
} | ||
|
||
result = visitor(sourceFile, tree, result); | ||
}); | ||
|
||
return result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import * as ts from 'typescript'; | ||
import { Tree } from '@angular-devkit/schematics'; | ||
|
||
export function visitTSSourceFiles<Result = void>( | ||
tree: Tree, | ||
visitor: ( | ||
sourceFile: ts.SourceFile, | ||
tree: Tree, | ||
result?: Result | ||
) => Result | undefined | ||
): Result | undefined { | ||
let result: Result | undefined = undefined; | ||
|
||
tree.visit(path => { | ||
if (!path.endsWith('.ts')) { | ||
return; | ||
} | ||
|
||
const sourceFile = ts.createSourceFile( | ||
path, | ||
tree.read(path)!.toString(), | ||
ts.ScriptTarget.Latest | ||
); | ||
|
||
if (sourceFile.isDeclarationFile) { | ||
return; | ||
} | ||
|
||
result = visitor(sourceFile, tree, result); | ||
}); | ||
|
||
return result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.