deno -v should report typescript version

Fixes #993
This commit is contained in:
Jinho Bang 2018-10-16 09:52:33 +09:00 committed by Ryan Dahl
parent fb90c6f525
commit 1322f3de9f
5 changed files with 25 additions and 10 deletions

View file

@ -8,6 +8,7 @@ import { libdeno } from "./libdeno";
import { args } from "./deno";
import { sendSync, handleAsyncMsgFromRust } from "./dispatch";
import { promiseErrorExaminer, promiseRejectHandler } from "./promise_util";
import { version } from "typescript";
function sendStart(): msg.StartRes {
const builder = new flatbuffers.Builder();
@ -59,6 +60,14 @@ export default function denoMain() {
os.exit(0);
}
// handle `--version`
if (startResMsg.versionFlag()) {
console.log("deno:", startResMsg.denoVersion());
console.log("v8:", startResMsg.v8Version());
console.log("typescript:", version);
os.exit(0);
}
const cwd = startResMsg.cwd();
log("cwd", cwd);