We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@jsxImportSource
use deno_graph::{ DefaultModuleAnalyzer, DefaultModuleParser, MediaType, ModuleAnalyzer as _, ModuleSpecifier, }; fn main() { let specifier = ModuleSpecifier::parse("file:///a.tsx").unwrap(); let source = &r#" #!/usr/bin/env -S deno run /// <reference path="./ref.d.ts" /> /* @jsxImportSource react */ "#[1..]; let analyzer = DefaultModuleAnalyzer::new(&DefaultModuleParser); let module_info = analyzer .analyze(&specifier, source.into(), MediaType::Tsx) .unwrap(); assert!(!module_info.ts_references.is_empty()); assert!(module_info.jsx_import_source.is_some()); }
This program should not panic, but currently (with deno_graph 0.69.9) it panics unless the hashbang comment is removed.
deno_graph
The text was updated successfully, but these errors were encountered:
Is this something that doesn't work in Deno or doesn't work in deno_graph? I forget whose responsibility it is to remove/skip the hashbang.
Sorry, something went wrong.
I think Deno just supplies the source code to deno_graph unmodified, and it's up to deno_graph to skip the hashbang. The linked PR implements this.
fix: deno_graph 0.69.10 (#23147)
d0a579a
* denoland/deno_graph#420 * denoland/deno_graph#424
Successfully merging a pull request may close this issue.
This program should not panic, but currently (with
deno_graph
0.69.9) it panics unless the hashbang comment is removed.The text was updated successfully, but these errors were encountered: