(writeFileCallback, customTransformers)
| 124715 | return emitDiagnostics; |
| 124716 | } |
| 124717 | function emitBundle(writeFileCallback, customTransformers) { |
| 124718 | var _a, _b; |
| 124719 | ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle); |
| 124720 | if (state.options.dry) { |
| 124721 | reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project); |
| 124722 | buildResult = BuildResultFlags.Success; |
| 124723 | step = BuildStep.QueueReferencingProjects; |
| 124724 | return undefined; |
| 124725 | } |
| 124726 | if (state.options.verbose) |
| 124727 | reportStatus(state, ts.Diagnostics.Updating_output_of_project_0, project); |
| 124728 | // Update js, and source map |
| 124729 | var compilerHost = state.compilerHost; |
| 124730 | state.projectCompilerOptions = config.options; |
| 124731 | var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) { |
| 124732 | var refName = resolveProjectName(state, ref.path); |
| 124733 | return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName)); |
| 124734 | }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); |
| 124735 | if (ts.isString(outputFiles)) { |
| 124736 | reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles)); |
| 124737 | step = BuildStep.BuildInvalidatedProjectOfBundle; |
| 124738 | return invalidatedProjectOfBundle = createBuildOrUpdateInvalidedProject(InvalidatedProjectKind.Build, state, project, projectPath, projectIndex, config, buildOrder); |
| 124739 | } |
| 124740 | // Actual Emit |
| 124741 | ts.Debug.assert(!!outputFiles.length); |
| 124742 | var emitterDiagnostics = ts.createDiagnosticCollection(); |
| 124743 | var emittedOutputs = new ts.Map(); |
| 124744 | outputFiles.forEach(function (_a) { |
| 124745 | var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark; |
| 124746 | emittedOutputs.set(toPath(state, name), name); |
| 124747 | ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); |
| 124748 | }); |
| 124749 | var emitDiagnostics = finishEmit(emitterDiagnostics, emittedOutputs, minimumDate, |
| 124750 | /*newestDeclarationFileContentChangedTimeIsMaximumDate*/ false, outputFiles[0].name, BuildResultFlags.DeclarationOutputUnchanged); |
| 124751 | return { emitSkipped: false, diagnostics: emitDiagnostics }; |
| 124752 | } |
| 124753 | function executeSteps(till, cancellationToken, writeFile, customTransformers) { |
| 124754 | while (step <= till && step < BuildStep.Done) { |
| 124755 | var currentStep = step; |
no test coverage detected
searching dependent graphs…