diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-10-26 14:03:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 14:03:03 +0100 |
commit | 57cad539457dff7fc273bed5ecaf08bd3dc40d1b (patch) | |
tree | 1b0c01aeaaf2c0a1723712d6b9b5baf91bfeecff /cli/tsc/99_main_compiler.js | |
parent | aebbdd5cc2c75151be28c839878b0dee915147ef (diff) |
refactor(cli): rewrite Deno.transpileOnly() to use SWC (#8090)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tsc/99_main_compiler.js')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index ee03ff6ff..470c1fcee 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -599,7 +599,6 @@ delete Object.prototype.__proto__; const CompilerRequestType = { RuntimeCompile: 2, RuntimeBundle: 3, - RuntimeTranspile: 4, }; function createBundleWriteFile(state) { @@ -999,31 +998,6 @@ delete Object.prototype.__proto__; }; } - function runtimeTranspile(request) { - const result = {}; - const { sources, compilerOptions } = request; - - const parseResult = parseCompilerOptions( - compilerOptions, - ); - const options = parseResult.options; - // TODO(bartlomieju): this options is excluded by `ts.convertCompilerOptionsFromJson` - // however stuff breaks if it's not passed (type_directives_js_main.js, compiler_js_error.ts) - options.allowNonTsExtensions = true; - - for (const [fileName, inputText] of Object.entries(sources)) { - const { outputText: source, sourceMapText: map } = ts.transpileModule( - inputText, - { - fileName, - compilerOptions: options, - }, - ); - result[fileName] = { source, map }; - } - return result; - } - function opCompilerRespond(msg) { core.jsonOpSync("op_compiler_respond", msg); } @@ -1041,11 +1015,6 @@ delete Object.prototype.__proto__; opCompilerRespond(result); break; } - case CompilerRequestType.RuntimeTranspile: { - const result = runtimeTranspile(request); - opCompilerRespond(result); - break; - } default: throw new Error( `!!! unhandled CompilerRequestType: ${request.type} (${ |