-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
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
feat: Add ImportAssertionsSupport #853
feat: Add ImportAssertionsSupport #853
Conversation
core/runtime/jsruntime.rs
Outdated
eprintln!("⚠️ Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword."); | ||
if let Some(specifier) = maybe_script_resource_name { | ||
if let Some(source_line) = maybe_source_line { | ||
eprintln!(); | ||
eprintln!("{}", source_line.to_rust_string_lossy(scope)); | ||
eprintln!(); | ||
eprintln!("{:0width$}^^^^^^", " ", width = start_column); | ||
} | ||
eprintln!( | ||
" at {}:{}:{}", | ||
specifier.to_rust_string_lossy(scope), | ||
maybe_line_number.unwrap(), | ||
start_column | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prints a message like:
⚠️ Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword.
import data from "./data.json" assert { type: "json" };
^^^^^^
at file:///Users/ib/dev/deno/foo.js:1:31
Kinda feel we might want to reuse it in the CLI, just print it in yellow (with a Warning:
prefix). Need to figure out how to easily share it
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #853 +/- ##
==========================================
+ Coverage 81.43% 81.52% +0.08%
==========================================
Files 97 98 +1
Lines 23877 24919 +1042
==========================================
+ Hits 19445 20316 +871
- Misses 4432 4603 +171 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Needed for denoland/deno#24743.