Skip to content

Commit d8047b6

Browse files
committed
Renamed API
1 parent 5a45c44 commit d8047b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/compiler/program.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ namespace ts {
13831383
getSourceFile: program.getSourceFile,
13841384
getSourceFileByPath: program.getSourceFileByPath,
13851385
getSourceFiles: program.getSourceFiles,
1386-
isSourceFileFromNodeModules: (file: SourceFile) => !!lookUp(sourceFilesFoundSearchingNodeModules, file.path),
1386+
isSourceFileFromExternalLibrary: (file: SourceFile) => !!lookUp(sourceFilesFoundSearchingNodeModules, file.path),
13871387
writeFile: writeFileCallback || (
13881388
(fileName, data, writeByteOrderMark, onError, sourceFiles) => host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles)),
13891389
isEmitBlocked,

src/compiler/utilities.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace ts {
3636
getSourceFiles(): SourceFile[];
3737

3838
/* @internal */
39-
isSourceFileFromNodeModules(file: SourceFile): boolean;
39+
isSourceFileFromExternalLibrary(file: SourceFile): boolean;
4040

4141
getCommonSourceDirectory(): string;
4242
getCanonicalFileName(fileName: string): string;
@@ -2279,7 +2279,7 @@ namespace ts {
22792279
const sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile];
22802280
for (const sourceFile of sourceFiles) {
22812281
// Don't emit if source file is a declaration file, or was located under node_modules
2282-
if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromNodeModules(sourceFile)) {
2282+
if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromExternalLibrary(sourceFile)) {
22832283
onSingleFileEmit(host, sourceFile);
22842284
}
22852285
}
@@ -2315,7 +2315,7 @@ namespace ts {
23152315
// --module or --target es6 specified. Files included by searching under node_modules are also not emitted.
23162316
const bundledSources = filter(host.getSourceFiles(),
23172317
sourceFile => !isDeclarationFile(sourceFile) &&
2318-
!host.isSourceFileFromNodeModules(sourceFile) &&
2318+
!host.isSourceFileFromExternalLibrary(sourceFile) &&
23192319
(!isExternalModule(sourceFile) ||
23202320
!!getEmitModuleKind(options)));
23212321
if (bundledSources.length) {

0 commit comments

Comments
 (0)