diff --git a/Cargo.lock b/Cargo.lock
index 098c2799b5..022a609b85 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -535,7 +535,6 @@ dependencies = [
"deno_crypto",
"deno_doc",
"deno_fetch",
- "deno_file",
"deno_lint",
"deno_runtime",
"deno_timers",
@@ -674,7 +673,7 @@ dependencies = [
"bytes",
"data-url",
"deno_core",
- "deno_file",
+ "deno_web",
"http",
"reqwest",
"serde",
@@ -683,14 +682,6 @@ dependencies = [
"tokio-util",
]
-[[package]]
-name = "deno_file"
-version = "0.7.0"
-dependencies = [
- "deno_core",
- "uuid",
-]
-
[[package]]
name = "deno_lint"
version = "0.6.1"
@@ -722,7 +713,6 @@ dependencies = [
"deno_core",
"deno_crypto",
"deno_fetch",
- "deno_file",
"deno_timers",
"deno_url",
"deno_web",
@@ -790,6 +780,7 @@ dependencies = [
"encoding_rs",
"futures",
"serde",
+ "uuid",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 5f60ac6602..26ea136477 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,6 @@ members = [
"extensions/console",
"extensions/crypto",
"extensions/fetch",
- "extensions/file",
"extensions/timers",
"extensions/url",
"extensions/web",
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 305b19c9b4..64f261c7b7 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -25,7 +25,6 @@ deno_console = { version = "0.8.0", path = "../extensions/console" }
deno_core = { version = "0.89.0", path = "../core" }
deno_crypto = { version = "0.22.0", path = "../extensions/crypto" }
deno_fetch = { version = "0.30.0", path = "../extensions/fetch" }
-deno_file = { version = "0.7.0", path = "../extensions/file" }
deno_timers = { version = "0.6.0", path = "../extensions/timers" }
deno_url = { version = "0.8.0", path = "../extensions/url" }
deno_web = { version = "0.39.0", path = "../extensions/web" }
diff --git a/cli/build.rs b/cli/build.rs
index 053d05395f..c88c003760 100644
--- a/cli/build.rs
+++ b/cli/build.rs
@@ -59,7 +59,6 @@ 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());
@@ -275,10 +274,6 @@ fn main() {
"cargo:rustc-env=DENO_WEB_LIB_PATH={}",
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 e35de2e774..a59a7af364 100644
--- a/cli/dts/lib.deno.shared_globals.d.ts
+++ b/cli/dts/lib.deno.shared_globals.d.ts
@@ -6,7 +6,6 @@
///
///
///
-///
///
///
///
diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs
index 8403c660d0..bd16cb1e1c 100644
--- a/cli/file_fetcher.rs
+++ b/cli/file_fetcher.rs
@@ -19,7 +19,7 @@ use deno_core::futures;
use deno_core::futures::future::FutureExt;
use deno_core::ModuleSpecifier;
use deno_runtime::deno_fetch::reqwest;
-use deno_runtime::deno_file::BlobUrlStore;
+use deno_runtime::deno_web::BlobUrlStore;
use deno_runtime::permissions::Permissions;
use log::debug;
use log::info;
@@ -579,7 +579,7 @@ mod tests {
use deno_core::error::get_custom_error_class;
use deno_core::resolve_url;
use deno_core::resolve_url_or_path;
- use deno_runtime::deno_file::Blob;
+ use deno_runtime::deno_web::Blob;
use std::rc::Rc;
use tempfile::TempDir;
diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs
index 29ec3258ba..83b322eab5 100644
--- a/cli/lsp/registries.rs
+++ b/cli/lsp/registries.rs
@@ -26,7 +26,7 @@ use deno_core::serde_json::json;
use deno_core::url::Position;
use deno_core::url::Url;
use deno_core::ModuleSpecifier;
-use deno_runtime::deno_file::BlobUrlStore;
+use deno_runtime::deno_web::BlobUrlStore;
use deno_runtime::permissions::Permissions;
use log::error;
use lspower::lsp;
diff --git a/cli/main.rs b/cli/main.rs
index 23b51219f0..5827203ce3 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -330,12 +330,11 @@ 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{}\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/program_state.rs b/cli/program_state.rs
index c3c399b690..95362165f5 100644
--- a/cli/program_state.rs
+++ b/cli/program_state.rs
@@ -16,7 +16,7 @@ use crate::source_maps::SourceMapGetter;
use crate::specifier_handler::FetchHandler;
use crate::version;
use deno_runtime::deno_broadcast_channel::InMemoryBroadcastChannel;
-use deno_runtime::deno_file::BlobUrlStore;
+use deno_runtime::deno_web::BlobUrlStore;
use deno_runtime::inspector_server::InspectorServer;
use deno_runtime::permissions::Permissions;
diff --git a/cli/specifier_handler.rs b/cli/specifier_handler.rs
index 900b918ab5..cd27e45cc9 100644
--- a/cli/specifier_handler.rs
+++ b/cli/specifier_handler.rs
@@ -574,7 +574,7 @@ pub mod tests {
use crate::file_fetcher::CacheSetting;
use crate::http_cache::HttpCache;
use deno_core::resolve_url_or_path;
- use deno_runtime::deno_file::BlobUrlStore;
+ use deno_runtime::deno_web::BlobUrlStore;
use tempfile::TempDir;
macro_rules! map (
diff --git a/cli/standalone.rs b/cli/standalone.rs
index 7216a5fd6f..8cb21f7106 100644
--- a/cli/standalone.rs
+++ b/cli/standalone.rs
@@ -23,7 +23,7 @@ use deno_core::ModuleLoader;
use deno_core::ModuleSpecifier;
use deno_core::OpState;
use deno_runtime::deno_broadcast_channel::InMemoryBroadcastChannel;
-use deno_runtime::deno_file::BlobUrlStore;
+use deno_runtime::deno_web::BlobUrlStore;
use deno_runtime::permissions::Permissions;
use deno_runtime::permissions::PermissionsOptions;
use deno_runtime::worker::MainWorker;
diff --git a/cli/tsc.rs b/cli/tsc.rs
index 9d7b2a5ff7..f87682fcab 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -33,7 +33,6 @@ 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 =
diff --git a/extensions/fetch/20_headers.js b/extensions/fetch/20_headers.js
index 5f865749ae..24dcdb74a5 100644
--- a/extensions/fetch/20_headers.js
+++ b/extensions/fetch/20_headers.js
@@ -3,8 +3,7 @@
// @ts-check
///
///
-///
-///
+///
///
///
///
diff --git a/extensions/fetch/21_formdata.js b/extensions/fetch/21_formdata.js
index beae69aca7..32a4e69a76 100644
--- a/extensions/fetch/21_formdata.js
+++ b/extensions/fetch/21_formdata.js
@@ -3,8 +3,7 @@
// @ts-check
///
///
-///
-///
+///
///
///
///
diff --git a/extensions/fetch/22_body.js b/extensions/fetch/22_body.js
index dcf1128a70..5039ab9103 100644
--- a/extensions/fetch/22_body.js
+++ b/extensions/fetch/22_body.js
@@ -5,8 +5,7 @@
///
///
///
-///
-///
+///
///
///
///
diff --git a/extensions/fetch/22_http_client.js b/extensions/fetch/22_http_client.js
index 770080cc9e..9900cfb587 100644
--- a/extensions/fetch/22_http_client.js
+++ b/extensions/fetch/22_http_client.js
@@ -4,8 +4,7 @@
///
///
///
-///
-///
+///
///
///
///
diff --git a/extensions/fetch/23_request.js b/extensions/fetch/23_request.js
index d030236873..ad05b5cd8b 100644
--- a/extensions/fetch/23_request.js
+++ b/extensions/fetch/23_request.js
@@ -3,8 +3,7 @@
// @ts-check
///
///
-///
-///
+///
///
///
///
diff --git a/extensions/fetch/23_response.js b/extensions/fetch/23_response.js
index b1b037187a..a8fd52162e 100644
--- a/extensions/fetch/23_response.js
+++ b/extensions/fetch/23_response.js
@@ -4,8 +4,7 @@
///
///
///
-///
-///
+///
///
///
///
diff --git a/extensions/fetch/Cargo.toml b/extensions/fetch/Cargo.toml
index c01af459a7..27ab2e05d1 100644
--- a/extensions/fetch/Cargo.toml
+++ b/extensions/fetch/Cargo.toml
@@ -17,7 +17,7 @@ path = "lib.rs"
bytes = "1.0.1"
data-url = "0.1.0"
deno_core = { version = "0.89.0", path = "../../core" }
-deno_file = { version = "0.7.0", path = "../file" }
+deno_web = { version = "0.39.0", path = "../web" }
http = "0.2.4"
reqwest = { version = "0.11.3", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli"] }
serde = { version = "1.0.125", features = ["derive"] }
diff --git a/extensions/fetch/lib.rs b/extensions/fetch/lib.rs
index 2fbd38b3a9..5638b1f334 100644
--- a/extensions/fetch/lib.rs
+++ b/extensions/fetch/lib.rs
@@ -25,7 +25,7 @@ use deno_core::ResourceId;
use deno_core::ZeroCopyBuf;
use data_url::DataUrl;
-use deno_file::BlobUrlStore;
+use deno_web::BlobUrlStore;
use reqwest::header::HeaderMap;
use reqwest::header::HeaderName;
use reqwest::header::HeaderValue;
diff --git a/extensions/file/Cargo.toml b/extensions/file/Cargo.toml
deleted file mode 100644
index da70cf1b8a..0000000000
--- a/extensions/file/Cargo.toml
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-
-[package]
-name = "deno_file"
-version = "0.7.0"
-edition = "2018"
-description = "File API implementation for Deno"
-authors = ["the Deno authors"]
-license = "MIT"
-readme = "README.md"
-repository = "https://github.com/denoland/deno"
-
-[lib]
-path = "lib.rs"
-
-[dependencies]
-deno_core = { version = "0.89.0", path = "../../core" }
-uuid = { version = "0.8.2", features = ["v4"] }
diff --git a/extensions/file/README.md b/extensions/file/README.md
deleted file mode 100644
index c421bf0047..0000000000
--- a/extensions/file/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# deno_file
-
-This crate implements the File API.
-
-Spec: https://w3c.github.io/FileAPI
diff --git a/extensions/file/internal.d.ts b/extensions/file/internal.d.ts
deleted file mode 100644
index dd892e7360..0000000000
--- a/extensions/file/internal.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-
-///
-///
-
-declare namespace globalThis {
- declare namespace __bootstrap {
- declare var file: {
- Blob: typeof Blob & {
- [globalThis.__bootstrap.file._byteSequence]: Uint8Array;
- };
- readonly _byteSequence: unique symbol;
- File: typeof File & {
- [globalThis.__bootstrap.file._byteSequence]: Uint8Array;
- };
- };
- }
-}
diff --git a/extensions/file/lib.deno_file.d.ts b/extensions/file/lib.deno_file.d.ts
deleted file mode 100644
index a907c3f509..0000000000
--- a/extensions/file/lib.deno_file.d.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-
-///
-///
-
-type BlobPart = BufferSource | Blob | string;
-
-interface BlobPropertyBag {
- type?: string;
- endings?: "transparent" | "native";
-}
-
-/** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */
-declare class Blob {
- constructor(blobParts?: BlobPart[], options?: BlobPropertyBag);
-
- readonly size: number;
- readonly type: string;
- arrayBuffer(): Promise;
- slice(start?: number, end?: number, contentType?: string): Blob;
- stream(): ReadableStream;
- text(): Promise;
-}
-
-interface FilePropertyBag extends BlobPropertyBag {
- lastModified?: number;
-}
-
-/** Provides information about files and allows JavaScript in a web page to
- * access their content. */
-declare class File extends Blob {
- constructor(
- fileBits: BlobPart[],
- fileName: string,
- options?: FilePropertyBag,
- );
-
- readonly lastModified: number;
- readonly name: string;
-}
diff --git a/extensions/file/lib.rs b/extensions/file/lib.rs
deleted file mode 100644
index 1dcc02d27c..0000000000
--- a/extensions/file/lib.rs
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-
-use deno_core::error::null_opbuf;
-use deno_core::error::AnyError;
-use deno_core::include_js_files;
-use deno_core::op_sync;
-use deno_core::url::Url;
-use deno_core::Extension;
-use deno_core::ModuleSpecifier;
-use deno_core::ZeroCopyBuf;
-use std::collections::HashMap;
-use std::path::PathBuf;
-use std::sync::Arc;
-use std::sync::Mutex;
-use uuid::Uuid;
-
-#[derive(Debug, Clone)]
-pub struct Blob {
- pub data: Vec,
- pub media_type: String,
-}
-
-pub struct Location(pub Url);
-
-#[derive(Debug, Default, Clone)]
-pub struct BlobUrlStore(Arc>>);
-
-impl BlobUrlStore {
- pub fn get(&self, mut url: Url) -> Result