-
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.
Make deno_cli installable via crates.io (#2946)
- Fixes cargo publish on deno_typescript, deno_cli_snapshots, and deno_cli. - Combines cli_snapshots and js into one directory. - Extracts TS version at compile time rather than runtime - Bumps version awkwardly - it was necessary to test end-to-end publishing. Sorry. - Adds git submodule deno_typescript/typescript
- Loading branch information
Showing
29 changed files
with
163 additions
and
106 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,5 4,5 @@ members = [ | |
"core", | ||
"tools/hyper_hello", | ||
"deno_typescript", | ||
"cli_snapshots", | ||
"js", | ||
] |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 1,7 @@ | ||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. | ||
use serde_json; | ||
pub const DENO: &str = env!("CARGO_PKG_VERSION"); | ||
pub const TYPESCRIPT: &str = deno_cli_snapshots::TS_VERSION; | ||
|
||
pub fn v8() -> &'static str { | ||
deno::v8_version() | ||
} | ||
|
||
pub fn typescript() -> String { | ||
// TODO: By using include_str! we are including the package.json into | ||
// the deno binary using serde to decode it at runtime. This is suboptimal | ||
// in space and time. We need to extract the TypeScript version at compile | ||
// time instead. This will be easier after #2608. | ||
let data = include_str!("../node_modules/typescript/package.json"); | ||
let pkg: serde_json::Value = serde_json::from_str(data).unwrap(); | ||
pkg["version"].as_str().unwrap().to_string() | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -5,7 5,7 @@ name = "deno" | |
version = "0.18.0" | ||
edition = "2018" | ||
description = "A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio" | ||
authors = ["The deno authors <[email protected]>"] | ||
authors = ["the Deno authors"] | ||
license = "MIT" | ||
readme = "README.md" | ||
repository = "https://github.com/denoland/deno" | ||
|
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 |
---|---|---|
@@ -1,16 1,24 @@ | ||
[package] | ||
name = "deno_typescript" | ||
version = "0.18.0" | ||
version = "0.18.3" | ||
license = "MIT" | ||
description = "To compile TypeScript to a snapshot during build.rs" | ||
repository = "https://github.com/ry/deno_typescript" | ||
authors = ["Ryan Dahl <[email protected]>"] | ||
authors = ["the Deno authors"] | ||
edition = "2018" | ||
|
||
exclude = [ | ||
"typescript/tests/*", | ||
"typescript/src/*", | ||
"typescript/scripts/*", | ||
"typescript/doc/*", | ||
"typescript/lib/*/*.json", | ||
] | ||
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[dependencies] | ||
deno = { path = "../core" } | ||
deno = { path = "../core", version = "0.18.0" } | ||
serde_json = "1.0.40" | ||
serde = { version = "1.0.100", features = ["derive"] } |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Submodule typescript
added at
cf7b2d
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,25 @@ | ||
[package] | ||
name = "deno_cli_snapshots" | ||
version = "0.18.3" | ||
license = "MIT" | ||
authors = ["the Deno authors"] | ||
edition = "2018" | ||
description = "Provides snapshots for the deno CLI" | ||
repository = "https://github.com/denoland/deno" | ||
exclude = [ | ||
"deps/https/deno.land/std/fs/testdata/0-link.ts", | ||
"deps/https/deno.land/std/fs/testdata/copy_dir_link_file/0.txt", | ||
] | ||
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[dependencies] | ||
deno_typescript = { path = "../deno_typescript", version = "0.18.3" } | ||
|
||
[dev-dependencies] | ||
deno = { path = "../core", version = "0.18.0" } | ||
|
||
[build-dependencies] | ||
deno_typescript = { path = "../deno_typescript", version = "0.18.3" } | ||
|
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 |
---|---|---|
@@ -1,9 1,10 @@ | ||
# Crate: `deno_cli_snapshots` | ||
|
||
## AKA `cli_snapshots` AKA `//js` | ||
|
||
This is a small crate which exports just a few static blobs. It contains a | ||
build.rs file which compiles Deno's internal JavaScript and TypeScript code | ||
first into a single AMD bundle, and then into a binary V8 Snapshot. | ||
|
||
The main Deno executable crate ("cli") depends on this crate and has access to | ||
all the runtime code. | ||
|
||
The //js/ directory should be moved as a sub-directory of this crate, to denote | ||
the dependency structure. However, that is left to future work. |
Oops, something went wrong.