Skip to content

Commit a6a27ab

Browse files
authored
Do not inline sourcemaps in jake - source-map-support can't handle it (#17732)
* Do not inline sourcemaps - sourcemap support cant handle it * Run gulp silently
1 parent 08fbcd8 commit a6a27ab

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

Jakefile.js

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,6 @@ var tscFile = path.join(builtLocalDirectory, compilerFilename);
533533
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);
534534

535535
var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
536-
var servicesFileInBrowserTest = path.join(builtLocalDirectory, "typescriptServicesInBrowserTest.js");
537536
var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
538537
var nodePackageFile = path.join(builtLocalDirectory, "typescript.js");
539538
var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
@@ -572,22 +571,6 @@ compileFile(servicesFile, servicesSources, [builtLocalDirectory, copyright].conc
572571
fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents);
573572
});
574573

575-
compileFile(
576-
servicesFileInBrowserTest,
577-
servicesSources,
578-
[builtLocalDirectory, copyright].concat(servicesSources),
579-
/*prefixes*/[copyright],
580-
/*useBuiltCompiler*/ true,
581-
{
582-
noOutFile: false,
583-
generateDeclarations: true,
584-
preserveConstEnums: true,
585-
keepComments: true,
586-
noResolve: false,
587-
stripInternal: true,
588-
inlineSourceMap: true
589-
});
590-
591574
file(typescriptServicesDts, [servicesFile]);
592575

593576
var cancellationTokenFile = path.join(builtLocalDirectory, "cancellationToken.js");
@@ -725,7 +708,7 @@ compileFile(
725708
/*prereqs*/[builtLocalDirectory, tscFile].concat(libraryTargets).concat(servicesSources).concat(harnessSources),
726709
/*prefixes*/[],
727710
/*useBuiltCompiler:*/ true,
728-
/*opts*/ { inlineSourceMap: true, types: ["node", "mocha", "chai"], lib: "es6" });
711+
/*opts*/ { types: ["node", "mocha", "chai"], lib: "es6" });
729712

730713
var internalTests = "internal/";
731714

@@ -961,13 +944,14 @@ var nodeServerInFile = "tests/webTestServer.ts";
961944
compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile], [], /*useBuiltCompiler:*/ true, { noOutFile: true, lib: "es6" });
962945

963946
desc("Runs browserify on run.js to produce a file suitable for running tests in the browser");
964-
task("browserify", ["tests", run, builtLocalDirectory, nodeServerOutFile], function() {
965-
var cmd = 'browserify built/local/run.js -t ./scripts/browserify-optional -d -o built/local/bundle.js';
947+
task("browserify", [], function() {
948+
// Shell out to `gulp`, since we do the work to handle sourcemaps correctly w/o inline maps there
949+
var cmd = 'gulp browserify --silent';
966950
exec(cmd);
967951
}, { async: true });
968952

969953
desc("Runs the tests using the built run.js file like 'jake runtests'. Syntax is jake runtests-browser. Additional optional parameters tests=[regex], browser=[chrome|IE]");
970-
task("runtests-browser", ["tests", "browserify", builtLocalDirectory, servicesFileInBrowserTest], function () {
954+
task("runtests-browser", ["browserify", nodeServerOutFile], function () {
971955
cleanTestDirs();
972956
host = "node";
973957
browser = process.env.browser || process.env.b || (os.platform() === "linux" ? "chrome" : "IE");

0 commit comments

Comments
 (0)