-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add back typescript version number and add Deno.version object. (#1788)
- Loading branch information
Showing
9 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. | ||
interface Version { | ||
deno: string; | ||
v8: string; | ||
typescript: string; | ||
} | ||
|
||
export const version: Version = { | ||
deno: "", | ||
v8: "", | ||
typescript: "TS_VERSION" // This string will be replaced by rollup | ||
}; | ||
|
||
/** | ||
* Sets the deno and v8 versions and freezes the version object. | ||
* @internal | ||
*/ | ||
export function setVersions(denoVersion: string, v8Version: string): void { | ||
version.deno = denoVersion; | ||
version.v8 = v8Version; | ||
|
||
Object.freeze(version); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { test, assert } from "./test_util.ts"; | ||
|
||
test(function version() { | ||
const pattern = /^\d+\.\d+\.\d+$/; | ||
assert(pattern.test(Deno.version.deno)); | ||
assert(pattern.test(Deno.version.v8)); | ||
assert(pattern.test(Deno.version.typescript)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule third_party
updated
26 files