File tree 2 files changed +8
-10
lines changed
packages/core/schematics/utils/tsurge 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.dev/license
7
7
*/
8
8
9
- import { absoluteFrom , FileSystem } from '@angular/compiler-cli/src/ngtsc/file_system' ;
10
9
import { NgCompilerOptions } from '@angular/compiler-cli/src/ngtsc/core/api' ;
11
- import { getRootDirs } from '@angular/compiler-cli/src/ngtsc/util/src/typescript' ;
12
- import { isShim } from '@angular/compiler-cli/src/ngtsc/shims' ;
13
- import { ProgramInfo } from './program_info' ;
14
- import { Serializable } from './helpers/serializable' ;
10
+ import { FileSystem } from '@angular/compiler-cli/src/ngtsc/file_system' ;
15
11
import { createBaseProgramInfo , getProgramInfoFromBaseInfo } from './helpers/create_program' ;
12
+ import { Serializable } from './helpers/serializable' ;
13
+ import { ProgramInfo } from './program_info' ;
16
14
17
15
/** Type helper extracting the stats type of a migration. */
18
16
export type MigrationStats < T > =
Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ import {createPlainTsProgram} from './ts_program';
25
25
/** Creates the base program info for the given tsconfig path. */
26
26
export function createBaseProgramInfo (
27
27
absoluteTsconfigPath : string ,
28
- fs ? : FileSystem ,
28
+ fs : FileSystem ,
29
29
optionOverrides : NgCompilerOptions = { } ,
30
30
) : BaseProgramInfo {
31
- if ( fs === undefined ) {
32
- fs = new NodeJSFileSystem ( ) ;
33
- setFileSystem ( fs ) ;
34
- }
31
+ // Make sure the FS becomes globally available. Some code paths
32
+ // of the Angular compiler, or tsconfig parsing aren't leveraging
33
+ // the specified file system.
34
+ setFileSystem ( fs ) ;
35
35
36
36
const tsconfig = parseTsconfigOrDie ( absoluteTsconfigPath , fs ) ;
37
37
const tsHost = new NgtscCompilerHost ( fs , tsconfig . options ) ;
You can’t perform that action at this time.
0 commit comments