summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-04-06 12:55:05 +0200
committerGitHub <noreply@github.com>2021-04-06 12:55:05 +0200
commit00e63306cbcc295a87ba662f9f63311a3c6c49ce (patch)
tree88020a85a0f1d64803841386d2c5711b7ee008dc /cli
parentff5d072702aee52882787ea85dd73573a8f8f316 (diff)
refactor: add deno_file op crate (#10019)
Also enables WPT for FileReader.
Diffstat (limited to 'cli')
-rw-r--r--cli/build.rs6
-rw-r--r--cli/dts/lib.deno.shared_globals.d.ts1
-rw-r--r--cli/main.rs3
-rw-r--r--cli/tsc.rs1
4 files changed, 10 insertions, 1 deletions
diff --git a/cli/build.rs b/cli/build.rs
index 6606242e2..1b1e913d2 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -11,6 +11,7 @@ use deno_core::RuntimeOptions;
use deno_runtime::deno_console;
use deno_runtime::deno_crypto;
use deno_runtime::deno_fetch;
+use deno_runtime::deno_file;
use deno_runtime::deno_url;
use deno_runtime::deno_web;
use deno_runtime::deno_webgpu;
@@ -66,6 +67,7 @@ fn create_compiler_snapshot(
op_crate_libs.insert("deno.console", deno_console::get_declaration());
op_crate_libs.insert("deno.url", deno_url::get_declaration());
op_crate_libs.insert("deno.web", deno_web::get_declaration());
+ op_crate_libs.insert("deno.file", deno_file::get_declaration());
op_crate_libs.insert("deno.fetch", deno_fetch::get_declaration());
op_crate_libs.insert("deno.webgpu", deno_webgpu::get_declaration());
op_crate_libs.insert("deno.websocket", deno_websocket::get_declaration());
@@ -271,6 +273,10 @@ fn main() {
deno_web::get_declaration().display()
);
println!(
+ "cargo:rustc-env=DENO_FILE_LIB_PATH={}",
+ deno_file::get_declaration().display()
+ );
+ println!(
"cargo:rustc-env=DENO_FETCH_LIB_PATH={}",
deno_fetch::get_declaration().display()
);
diff --git a/cli/dts/lib.deno.shared_globals.d.ts b/cli/dts/lib.deno.shared_globals.d.ts
index 84272caeb..d96d06830 100644
--- a/cli/dts/lib.deno.shared_globals.d.ts
+++ b/cli/dts/lib.deno.shared_globals.d.ts
@@ -6,6 +6,7 @@
/// <reference no-default-lib="true" />
/// <reference lib="esnext" />
/// <reference lib="deno.console" />
+/// <reference lib="deno.file" />
/// <reference lib="deno.url" />
/// <reference lib="deno.web" />
/// <reference lib="deno.fetch" />
diff --git a/cli/main.rs b/cli/main.rs
index 6833665c1..e9e29c9db 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -275,11 +275,12 @@ fn print_cache_info(
pub fn get_types(unstable: bool) -> String {
let mut types = format!(
- "{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}",
+ "{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}",
crate::tsc::DENO_NS_LIB,
crate::tsc::DENO_CONSOLE_LIB,
crate::tsc::DENO_URL_LIB,
crate::tsc::DENO_WEB_LIB,
+ crate::tsc::DENO_FILE_LIB,
crate::tsc::DENO_FETCH_LIB,
crate::tsc::DENO_WEBGPU_LIB,
crate::tsc::DENO_WEBSOCKET_LIB,
diff --git a/cli/tsc.rs b/cli/tsc.rs
index dd97cb6b7..7c54905c5 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -32,6 +32,7 @@ pub static DENO_NS_LIB: &str = include_str!("dts/lib.deno.ns.d.ts");
pub static DENO_CONSOLE_LIB: &str = include_str!(env!("DENO_CONSOLE_LIB_PATH"));
pub static DENO_URL_LIB: &str = include_str!(env!("DENO_URL_LIB_PATH"));
pub static DENO_WEB_LIB: &str = include_str!(env!("DENO_WEB_LIB_PATH"));
+pub static DENO_FILE_LIB: &str = include_str!(env!("DENO_FILE_LIB_PATH"));
pub static DENO_FETCH_LIB: &str = include_str!(env!("DENO_FETCH_LIB_PATH"));
pub static DENO_WEBGPU_LIB: &str = include_str!(env!("DENO_WEBGPU_LIB_PATH"));
pub static DENO_WEBSOCKET_LIB: &str =