Merge branch 'master' into vfs

This commit is contained in:
Ron Buckton 2018-01-31 15:41:47 -08:00
commit 3de96306de
4 changed files with 17 additions and 12 deletions

View File

@ -9,7 +9,6 @@ var child_process = require("child_process");
var fold = require("travis-fold");
var ts = require("./lib/typescript");
// Variables
var compilerDirectory = "src/compiler/";
var serverDirectory = "src/server/";
@ -87,7 +86,7 @@ var servicesSources = filesFromConfig("./src/services/tsconfig.json");
var cancellationTokenSources = filesFromConfig(path.join(serverDirectory, "cancellationToken/tsconfig.json"));
var typingsInstallerSources = filesFromConfig(path.join(serverDirectory, "typingsInstaller/tsconfig.json"));
var watchGuardSources = filesFromConfig(path.join(serverDirectory, "watchGuard/tsconfig.json"));
var serverSources = filesFromConfig(path.join(serverDirectory, "tsconfig.json"))
var serverSources = filesFromConfig(path.join(serverDirectory, "tsconfig.json"));
var languageServiceLibrarySources = filesFromConfig(path.join(serverDirectory, "tsconfig.library.json"));
var typesMapOutputPath = path.join(builtLocalDirectory, 'typesMap.json');
@ -361,14 +360,14 @@ function compile(outFile, sources, prefixes, useBuiltCompiler, opts, callback) {
options.push("--target", opts.target);
}
else {
options.push("--target es5");
options.push("--target", "es5");
}
if (opts.lib) {
options.push("--lib", opts.lib);
}
else {
options.push("--lib es5");
options.push("--lib", "es5");
}
execCompiler(useBuiltCompiler, options.concat(sources), function (error) {
@ -526,7 +525,7 @@ file(buildProtocolDts, [buildProtocolTs, buildProtocolJs, typescriptServicesDts]
complete();
});
ex.run();
}, { async: true })
}, { async: true });
// The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task
file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson], function () {
@ -646,7 +645,7 @@ compileFile(servicesFile, servicesSources, [builtLocalDirectory, copyright].conc
// Stanalone/web definition file using global 'ts' namespace
jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, { silent: true });
var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString();
definitionFileContents = removeConstModifierFromEnumDeclarations(definitionFileContents)
definitionFileContents = removeConstModifierFromEnumDeclarations(definitionFileContents);
fs.writeFileSync(standaloneDefinitionsFile, definitionFileContents);
// Official node package definition file, pointed to by 'typings' in package.json
@ -1288,7 +1287,7 @@ task("build-rules-end", [], function () {
var lintTargets = compilerSources
.concat(harnessSources)
// Other harness sources
.concat(["instrumenter.ts"].map(function (f) { return path.join(harnessDirectory, f) }))
.concat(["instrumenter.ts"].map(function (f) { return path.join(harnessDirectory, f); }))
.concat(serverSources)
.concat(tslintRulesFiles)
.concat(servicesSources)
@ -1296,7 +1295,7 @@ var lintTargets = compilerSources
.concat(cancellationTokenSources)
.concat(["Gulpfile.ts"])
.concat([nodeServerInFile, perftscPath, "tests/perfsys.ts", webhostPath])
.map(function (p) { return path.resolve(p) });
.map(function (p) { return path.resolve(p); });
// keep only unique items
lintTargets = Array.from(new Set(lintTargets));
@ -1338,9 +1337,10 @@ desc("Runs tslint on the compiler sources. Optional arguments are: f[iles]=regex
task("lint", ["build-rules"], () => {
if (fold.isTravis()) console.log(fold.start("lint"));
const fileMatcher = process.env.f || process.env.file || process.env.files;
const files = fileMatcher
? `src/**/${fileMatcher}`
: "Gulpfile.ts 'scripts/generateLocalizedDiagnosticMessages.ts' 'scripts/tslint/**/*.ts' 'src/**/*.ts' --exclude 'src/lib/*.d.ts'";
: `Gulpfile.ts scripts/generateLocalizedDiagnosticMessages.ts "scripts/tslint/**/*.ts" "src/**/*.ts" --exclude "src/lib/*.d.ts"`;
const cmd = `node node_modules/tslint/bin/tslint ${files} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish`;
console.log("Linting: " + cmd);
jake.exec([cmd], () => {

View File

@ -1796,7 +1796,7 @@ namespace ts {
function getDefaultCompilerOptions(configFileName?: string) {
const options: CompilerOptions = getBaseFileName(configFileName) === "jsconfig.json"
? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true }
? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true, noEmit: true }
: {};
return options;
}

View File

@ -459,6 +459,7 @@ namespace ts {
maxNodeModuleJsDepth: 2,
allowSyntheticDefaultImports: true,
skipLibCheck: true,
noEmit: true,
module: ModuleKind.CommonJS,
target: ScriptTarget.ES5,
noImplicitAny: false,
@ -488,6 +489,7 @@ namespace ts {
maxNodeModuleJsDepth: 2,
allowSyntheticDefaultImports: true,
skipLibCheck: true,
noEmit: true,
module: ModuleKind.CommonJS,
target: ScriptTarget.ES5,
noImplicitAny: false,
@ -512,7 +514,8 @@ namespace ts {
allowJs: true,
maxNodeModuleJsDepth: 2,
allowSyntheticDefaultImports: true,
skipLibCheck: true
skipLibCheck: true,
noEmit: true
},
errors: [{
file: undefined,
@ -534,7 +537,8 @@ namespace ts {
allowJs: true,
maxNodeModuleJsDepth: 2,
allowSyntheticDefaultImports: true,
skipLibCheck: true
skipLibCheck: true,
noEmit: true
},
errors: []
}

View File

@ -205,6 +205,7 @@ namespace ts.projectSystem {
allowSyntheticDefaultImports: true,
maxNodeModuleJsDepth: 2,
skipLibCheck: true,
noEmit: true
};
it("sends telemetry for typeAcquisition settings", () => {