Merge pull request #7027 from Microsoft/fixTestsAndLinter
fix falling tests and linter issues
This commit is contained in:
commit
e4f7add568
3 changed files with 15 additions and 6 deletions
|
@ -527,14 +527,14 @@ namespace ts {
|
||||||
const filesSeen: Map<boolean> = {};
|
const filesSeen: Map<boolean> = {};
|
||||||
|
|
||||||
let exclude: string[] = [];
|
let exclude: string[] = [];
|
||||||
if(json["exclude"] instanceof Array){
|
if (json["exclude"] instanceof Array) {
|
||||||
exclude = json["exclude"];
|
exclude = json["exclude"];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// by default exclude node_modules, and any specificied output directory
|
// by default exclude node_modules, and any specificied output directory
|
||||||
exclude = ["node_modules"]
|
exclude = ["node_modules"];
|
||||||
let outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
|
const outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
|
||||||
if(outDir) {
|
if (outDir) {
|
||||||
exclude.push(outDir);
|
exclude.push(outDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1288,7 +1288,6 @@ namespace ts {
|
||||||
const languageVersion = options.target || ScriptTarget.ES3;
|
const languageVersion = options.target || ScriptTarget.ES3;
|
||||||
const outFile = options.outFile || options.out;
|
const outFile = options.outFile || options.out;
|
||||||
|
|
||||||
const firstExternalModuleSourceFile = forEach(files, f => isExternalModule(f) ? f : undefined);
|
|
||||||
if (options.isolatedModules) {
|
if (options.isolatedModules) {
|
||||||
const firstNonExternalModuleSourceFile = forEach(files, f => !isExternalModule(f) && !isDeclarationFile(f) ? f : undefined);
|
const firstNonExternalModuleSourceFile = forEach(files, f => !isExternalModule(f) && !isDeclarationFile(f) ? f : undefined);
|
||||||
if (firstNonExternalModuleSourceFile) {
|
if (firstNonExternalModuleSourceFile) {
|
||||||
|
|
|
@ -7,6 +7,16 @@ module ts {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createDefaultServerHost(fileMap: Map<File>): server.ServerHost {
|
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 {
|
return {
|
||||||
args: <string[]>[],
|
args: <string[]>[],
|
||||||
newLine: "\r\n",
|
newLine: "\r\n",
|
||||||
|
@ -26,7 +36,7 @@ module ts {
|
||||||
return hasProperty(fileMap, path);
|
return hasProperty(fileMap, path);
|
||||||
},
|
},
|
||||||
directoryExists: (path: string): boolean => {
|
directoryExists: (path: string): boolean => {
|
||||||
throw new Error("NYI");
|
return hasProperty(existingDirectories, path);
|
||||||
},
|
},
|
||||||
createDirectory: (path: string) => {
|
createDirectory: (path: string) => {
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue