Merge pull request #7027 from Microsoft/fixTestsAndLinter
fix falling tests and linter issues
This commit is contained in:
commit
e4f7add568
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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",
|
||||
|
@ -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) => {
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue