Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/TypeScript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.3.3
Choose a base ref
...
head repository: microsoft/TypeScript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.3.4
Choose a head ref
  • 2 commits
  • 17 files changed
  • 2 contributors

Commits on Jun 16, 2021

  1. Add SolutionBuilderHostBase.getCustomTransformers to be used when emi…

    …tting. (#44496)
    
    This allows not having to specify the transformers during normal watch scneario
    Builds on top of #43984
    sheetalkamat authored Jun 16, 2021
    Copy the full SHA
    6d8fd79 View commit details

Commits on Jun 17, 2021

  1. Copy the full SHA
    3221035 View commit details
53 changes: 20 additions & 33 deletions lib/tsc.js
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
var ts;
(function (ts) {
ts.versionMajorMinor = "4.3";
ts.version = "4.3.3";
ts.version = "4.3.4";
var NativeCollections;
(function (NativeCollections) {
function tryGetNativeMap() {
@@ -13497,56 +13497,43 @@ var ts;
}
return __assign(__assign({}, writer), { writeTrailingSemicolon: function () {
pendingTrailingSemicolon = true;
},
writeLiteral: function (s) {
}, writeLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeLiteral(s);
},
writeStringLiteral: function (s) {
}, writeStringLiteral: function (s) {
commitPendingTrailingSemicolon();
writer.writeStringLiteral(s);
},
writeSymbol: function (s, sym) {
}, writeSymbol: function (s, sym) {
commitPendingTrailingSemicolon();
writer.writeSymbol(s, sym);
},
writePunctuation: function (s) {
}, writePunctuation: function (s) {
commitPendingTrailingSemicolon();
writer.writePunctuation(s);
},
writeKeyword: function (s) {
}, writeKeyword: function (s) {
commitPendingTrailingSemicolon();
writer.writeKeyword(s);
},
writeOperator: function (s) {
}, writeOperator: function (s) {
commitPendingTrailingSemicolon();
writer.writeOperator(s);
},
writeParameter: function (s) {
}, writeParameter: function (s) {
commitPendingTrailingSemicolon();
writer.writeParameter(s);
},
writeSpace: function (s) {
}, writeSpace: function (s) {
commitPendingTrailingSemicolon();
writer.writeSpace(s);
},
writeProperty: function (s) {
}, writeProperty: function (s) {
commitPendingTrailingSemicolon();
writer.writeProperty(s);
},
writeComment: function (s) {
}, writeComment: function (s) {
commitPendingTrailingSemicolon();
writer.writeComment(s);
},
writeLine: function () {
}, writeLine: function () {
commitPendingTrailingSemicolon();
writer.writeLine();
},
increaseIndent: function () {
}, increaseIndent: function () {
commitPendingTrailingSemicolon();
writer.increaseIndent();
},
decreaseIndent: function () {
}, decreaseIndent: function () {
commitPendingTrailingSemicolon();
writer.decreaseIndent();
} });
@@ -32857,9 +32844,7 @@ var ts;
var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
var packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName);
return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName,
clear: clear,
update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, clear: clear, update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
function clear() {
preDirectoryResolutionCache.clear();
moduleNameToDirectoryMap.clear();
@@ -96307,7 +96292,7 @@ var ts;
},
emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
if (targetSourceFile || emitOnlyDtsFiles) {
return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); });
}
executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
if (step === BuildStep.EmitBuildInfo) {
@@ -96389,13 +96374,14 @@ var ts;
}
function emit(writeFileCallback, cancellationToken, customTransformers) {
var _a;
var _b, _c;
ts.Debug.assertIsDefined(program);
ts.Debug.assert(step === BuildStep.Emit);
program.backupState();
var declDiagnostics;
var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
var outputFiles = [];
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers).emitResult;
var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
if (declDiagnostics) {
program.restoreState();
(_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
@@ -96472,6 +96458,7 @@ var ts;
return emitDiagnostics;
}
function emitBundle(writeFileCallback, customTransformers) {
var _a, _b;
ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
if (state.options.dry) {
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -96486,7 +96473,7 @@ var ts;
var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
var refName = resolveProjectName(state, ref.path);
return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
}, customTransformers);
}, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
if (ts.isString(outputFiles)) {
reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
step = BuildStep.BuildInvalidatedProjectOfBundle;
Loading