1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00

chore(cli/cache): Remove CacheType::Declaration (#14873)

This commit is contained in:
Nayeem Rahman 2022-06-15 15:25:25 +01:00 committed by GitHub
parent b2109a12aa
commit 0b90e966c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 9 deletions

View file

@ -23,7 +23,6 @@ pub struct EmitMetadata {
} }
pub enum CacheType { pub enum CacheType {
Declaration,
Emit, Emit,
SourceMap, SourceMap,
TypeScriptBuildInfo, TypeScriptBuildInfo,
@ -181,7 +180,6 @@ impl Cacher for FetchCacher {
specifier: &ModuleSpecifier, specifier: &ModuleSpecifier,
) -> Option<String> { ) -> Option<String> {
let extension = match cache_type { let extension = match cache_type {
CacheType::Declaration => "d.ts",
CacheType::Emit => "js", CacheType::Emit => "js",
CacheType::SourceMap => "js.map", CacheType::SourceMap => "js.map",
CacheType::TypeScriptBuildInfo => "buildinfo", CacheType::TypeScriptBuildInfo => "buildinfo",
@ -206,7 +204,6 @@ impl Cacher for FetchCacher {
value: String, value: String,
) -> Result<(), AnyError> { ) -> Result<(), AnyError> {
let extension = match cache_type { let extension = match cache_type {
CacheType::Declaration => "d.ts",
CacheType::Emit => "js", CacheType::Emit => "js",
CacheType::SourceMap => "js.map", CacheType::SourceMap => "js.map",
CacheType::TypeScriptBuildInfo => "buildinfo", CacheType::TypeScriptBuildInfo => "buildinfo",

View file

@ -443,11 +443,6 @@ pub fn check_and_maybe_emit(
MediaType::SourceMap => { MediaType::SourceMap => {
cache.set(CacheType::SourceMap, &specifier, emit.data)?; cache.set(CacheType::SourceMap, &specifier, emit.data)?;
} }
// this only occurs with the runtime emit, but we are using the same
// code paths, so we handle it here.
MediaType::Dts | MediaType::Dcts | MediaType::Dmts => {
cache.set(CacheType::Declaration, &specifier, emit.data)?;
}
_ => unreachable!( _ => unreachable!(
"unexpected media_type {} {}", "unexpected media_type {} {}",
emit.media_type, specifier emit.media_type, specifier

View file

@ -81,7 +81,6 @@
"op_dgram_recv": ["receive a datagram message", "awaiting the result of `Deno.DatagramConn#receive` call, or not breaking out of a for await loop looping over a `Deno.DatagramConn`"], "op_dgram_recv": ["receive a datagram message", "awaiting the result of `Deno.DatagramConn#receive` call, or not breaking out of a for await loop looping over a `Deno.DatagramConn`"],
"op_dgram_send": ["send a datagram message", "awaiting the result of `Deno.DatagramConn#send` call"], "op_dgram_send": ["send a datagram message", "awaiting the result of `Deno.DatagramConn#send` call"],
"op_dns_resolve": ["resolve a DNS name", "awaiting the result of a `Deno.resolveDns` call"], "op_dns_resolve": ["resolve a DNS name", "awaiting the result of a `Deno.resolveDns` call"],
"op_emit": ["transpile code", "awaiting the result of a `Deno.emit` call"],
"op_fdatasync_async": ["flush pending data operations for a file to disk", "awaiting the result of a `Deno.fdatasync` call"], "op_fdatasync_async": ["flush pending data operations for a file to disk", "awaiting the result of a `Deno.fdatasync` call"],
"op_fetch_send": ["send a HTTP request", "awaiting the result of a `fetch` call"], "op_fetch_send": ["send a HTTP request", "awaiting the result of a `fetch` call"],
"op_ffi_call_nonblocking": ["do a non blocking ffi call", "awaiting the returned promise"] , "op_ffi_call_nonblocking": ["do a non blocking ffi call", "awaiting the returned promise"] ,