mirror of
https://github.com/denoland/deno.git
synced 2025-07-22 20:55:08 +00:00
Revert "Create an old program to be used in snapshot. (#3644)"
Ref #3712. This change allowed the deno_typescript crate to reference
cli/js/lib.deno_runtime.d.ts which breaks "cargo package". We intend to
reintroduce a revised version of this patch later once "cargo
package" is working and tested.
This reverts commit 737ab94ea1
.
This commit is contained in:
parent
7fd50065a7
commit
fa7f34eb8c
14 changed files with 59 additions and 84 deletions
|
@ -6,7 +6,6 @@ import "./globals.ts";
|
|||
import "./ts_global.d.ts";
|
||||
|
||||
import { TranspileOnlyResult } from "./compiler_api.ts";
|
||||
import { oldProgram } from "./compiler_bootstrap.ts";
|
||||
import { setRootExports } from "./compiler_bundler.ts";
|
||||
import {
|
||||
defaultBundlerOptions,
|
||||
|
@ -143,12 +142,7 @@ self.bootstrapTsCompiler = function tsCompilerMain(): void {
|
|||
// to generate the program and possibly emit it.
|
||||
if (!diagnostics || (diagnostics && diagnostics.length === 0)) {
|
||||
const options = host.getCompilationSettings();
|
||||
const program = ts.createProgram({
|
||||
rootNames,
|
||||
options,
|
||||
host,
|
||||
oldProgram
|
||||
});
|
||||
const program = ts.createProgram(rootNames, options, host);
|
||||
|
||||
diagnostics = ts
|
||||
.getPreEmitDiagnostics(program)
|
||||
|
@ -226,12 +220,11 @@ self.bootstrapTsCompiler = function tsCompilerMain(): void {
|
|||
}
|
||||
host.mergeOptions(...compilerOptions);
|
||||
|
||||
const program = ts.createProgram({
|
||||
const program = ts.createProgram(
|
||||
rootNames,
|
||||
options: host.getCompilationSettings(),
|
||||
host,
|
||||
oldProgram
|
||||
});
|
||||
host.getCompilationSettings(),
|
||||
host
|
||||
);
|
||||
|
||||
if (bundle) {
|
||||
setRootExports(program, rootNames[0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue