Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,14 @@ namespace ts {
const filesSeen: Map<boolean> = {};

let exclude: string[] = [];
if(json["exclude"] instanceof Array){
if (json["exclude"] instanceof Array) {
exclude = json["exclude"];
}
else {
// by default exclude node_modules, and any specificied output directory
exclude = ["node_modules"]
let outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
if(outDir) {
exclude = ["node_modules"];
const outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
if (outDir) {
exclude.push(outDir);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,6 @@ namespace ts {
const languageVersion = options.target || ScriptTarget.ES3;
const outFile = options.outFile || options.out;

const firstExternalModuleSourceFile = forEach(files, f => isExternalModule(f) ? f : undefined);
if (options.isolatedModules) {
const firstNonExternalModuleSourceFile = forEach(files, f => !isExternalModule(f) && !isDeclarationFile(f) ? f : undefined);
if (firstNonExternalModuleSourceFile) {
Expand Down
12 changes: 11 additions & 1 deletion tests/cases/unittests/cachingInServerLSHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ module ts {
}

function createDefaultServerHost(fileMap: Map<File>): server.ServerHost {
let existingDirectories: Map<boolean> = {};
forEachValue(fileMap, v => {
let dir = getDirectoryPath(v.name);
let previous: string;
do {
existingDirectories[dir] = true;
previous = dir;
dir = getDirectoryPath(dir);
} while (dir !== previous);
});
return {
args: <string[]>[],
newLine: "\r\n",
Expand All @@ -26,7 +36,7 @@ module ts {
return hasProperty(fileMap, path);
},
directoryExists: (path: string): boolean => {
throw new Error("NYI");
return hasProperty(existingDirectories, path);
},
createDirectory: (path: string) => {
},
Expand Down