Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ harness = false
async-trait = "0.1.68"
capacity_builder = "0.5.0"
data-url = "0.3.0"
deno_ast = { version = "0.46.0", features = ["dep_analysis", "emit"] }
deno_media_type = { version = "0.2.4", features = ["decoding", "data_url", "module_specifier"] }
deno_ast = { version = "0.46.2", features = ["dep_analysis", "emit"] }
deno_media_type = { version = "0.2.8", features = ["decoding", "data_url", "module_specifier"] }
deno_unsync.workspace = true
deno_path_util = "0.3.0"
deno_semver = "0.7.1"
Expand Down
10 changes: 8 additions & 2 deletions src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,11 @@ impl<'a, 'options> ModuleEntryIterator<'a, 'options> {
| MediaType::Tsx
| MediaType::Json
| MediaType::Wasm => true,
MediaType::Css | MediaType::SourceMap | MediaType::Unknown => false,
MediaType::Css
| MediaType::SourceMap
| MediaType::Html
| MediaType::Sql
| MediaType::Unknown => false,
MediaType::JavaScript
| MediaType::Jsx
| MediaType::Mjs
Expand Down Expand Up @@ -2525,6 +2529,8 @@ pub(crate) async fn parse_module_source_and_info(
MediaType::Css
| MediaType::Json
| MediaType::SourceMap
| MediaType::Html
| MediaType::Sql
| MediaType::Unknown => Err(ModuleError::UnsupportedMediaType(
opts.specifier,
media_type,
Expand Down Expand Up @@ -2730,7 +2736,7 @@ pub(crate) fn parse_js_module_from_module_info(
// import source was set by the @jsxImportSource pragma. This is done to
// prevent a default import source types from being injected when the user
// has explicitly overridden the import source in the file.
if matches!(media_type, MediaType::Jsx | MediaType::Tsx) {
if media_type.is_jsx() {
let has_jsx_import_source_pragma = module_info.jsx_import_source.is_some();
let res = module_info.jsx_import_source.or_else(|| {
maybe_resolver.and_then(|r| {
Expand Down
15 changes: 1 addition & 14 deletions tests/specs/ecosystem/sxzz/ast_kit/0_12_0.test
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,4 @@ sxzz/ast-kit/0.12.0

== FAST CHECK EMIT PASSED ==

== TYPE CHECK FAILED ==
-- stdout --

-- stderr --
TS2694 [ERROR]: Namespace '"file:<global_npm_dir>/@babel/types/7.24.5/lib/index-legacy.d.ts"' has no exported member 'ParentMaps'.
at file://<tmpdir>/src/walk.ts:16:124

TS2694 [ERROR]: Namespace '"file:<global_npm_dir>/@babel/types/7.24.5/lib/index-legacy.d.ts"' has no exported member 'ParentMaps'.
at file://<tmpdir>/src/walk.ts:16:139

Found 2 errors.

error: Type checking failed.

== TYPE CHECK PASSED ==
15 changes: 1 addition & 14 deletions tests/specs/ecosystem/sxzz/ast_kit/0_12_1.test
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,4 @@ sxzz/ast-kit/0.12.1

== FAST CHECK EMIT PASSED ==

== TYPE CHECK FAILED ==
-- stdout --

-- stderr --
TS2694 [ERROR]: Namespace '"file:<global_npm_dir>/@babel/types/7.24.5/lib/index-legacy.d.ts"' has no exported member 'ParentMaps'.
at file://<tmpdir>/src/walk.ts:31:124

TS2694 [ERROR]: Namespace '"file:<global_npm_dir>/@babel/types/7.24.5/lib/index-legacy.d.ts"' has no exported member 'ParentMaps'.
at file://<tmpdir>/src/walk.ts:31:139

Found 2 errors.

error: Type checking failed.

== TYPE CHECK PASSED ==