diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-03-21 11:46:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 15:46:40 +0000 |
commit | 2fcf1f14cf29bb68995f652f93a4f6e3cb55c8d7 (patch) | |
tree | 04fb972934969cb01a52f3b9b8af0a17134ef5b6 /cli/file_fetcher.rs | |
parent | 0366d6833f25b786e897ce0d6393f692507f0532 (diff) |
feat: TypeScript 5.0.2 (except decorators) (#18294)
This upgrades TypeScript to 5.0.2, but does not have ES decorator
support because swc does not support that yet.
Diffstat (limited to 'cli/file_fetcher.rs')
-rw-r--r-- | cli/file_fetcher.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index b4dadba71..b1c601b9a 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -93,7 +93,7 @@ fn fetch_local(specifier: &ModuleSpecifier) -> Result<File, AnyError> { let bytes = fs::read(&local)?; let charset = text_encoding::detect_charset(&bytes).to_string(); let source = get_source_from_bytes(bytes, Some(charset))?; - let media_type = MediaType::from(specifier); + let media_type = MediaType::from_specifier(specifier); Ok(File { local, @@ -166,7 +166,7 @@ pub fn map_content_type( (media_type, charset) } else { - (MediaType::from(specifier), None) + (MediaType::from_specifier(specifier), None) } } |