-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(cli/test): decoding percent-encoding(non-ASCII) file path correctly #23200
fix(cli/test): decoding percent-encoding(non-ASCII) file path correctly #23200
Conversation
Thanks for the PR @Hajime-san! It looks good, but it would be really great if you could exercise this change in an integration test. Would you be able to add a test to |
Hi @bartlomieju, thank you for pointing out about testing. I added it! |
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.
Thanks!
Thank you! @bartlomieju BTW, how do you think to treat runtime behaviour that I wrote to the description of this PR? |
Sorry for a slow response. As a rule of thumb if something works in browsers and makes sense in Deno context we should follow browser behavior. So this is a good fix 👍 |
@Hajime-san looks like GH actions doesn't like that we now have a file that contains an emoji. Any chance you could rewrite the test to create this file, run relevant subcommand and then delete the file (or use a temp dir)? |
Head branch was pushed to by a user without write access
Sure! I moved to
I fixed it! It seems to pass all CI. |
Summary
This PR resolves about the issue.
fixes #10810
And the formerly context is in the PR.
#22582
Here is an expected behaviour example with this change.
related issues
There are test reporter and runtime problems.
#18983
How we handle runtime behaviour?
The terminal output log not only contains the test reporter but also runtime file path treatment as follows.
at file:///path/to/repo/%F0%9F%A6%95.test.ts:4:3
spec
It seems that there is no specification for
Error.stack
today, and it is implementation-defined behaviour by browser engines.(Thanks for the article, @petamoriken)
behaviour
Here is an example code to show stack trace, and runs it on modern browsers.
result
Google Chrome(122.0.6261.112)
I think that the stack trace implementation is located as follows.
Firefox(117.0)
Safari(17.3.1)
non-browser result
Node.js(20.12.0)
deno implementation context
deno/runtime/fmt_errors.rs
Line 37 in 92a8ada
https://github.com/denoland/deno_core/blob/5c3d303a6de112bb704620d8ba5956acf4e10a48/core/error.rs#L658