-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Allow empty newlines after //# sourceMappingURL=...
#21988
Comments
//# sourceMappingURL=...
//# sourceMappingURL=...
//# sourceMappingURL=...
//# sourceMappingURL=...
I'm having trouble reproducing it in Deno v1.39.4. I added several newlines at the end of the file (after the source map) and I always get:
Are there any other conditions that you've applied to reproduce it? |
I'm able to reproduce. I also remember the code doing what's described here somewhere. |
Apparently this is not just about new lines. There are real-world source maps that also have other comments after |
We should use https://v8.github.io/api/head/classv8_1_1UnboundModuleScript.html#a9c4f796120c4431c24edfced6e784cee instead of pulling out the source map url ourselves. |
This is a good idea, but requires significant effort to give access to that struct in necessary place. I think we should first adjust the code in |
Adding empty lines after the magic comment now works, but this doesn't:
Expected:
Actual:
|
That's correct, because there is code after the comment. See https://tc39.es/source-map/#extraction-methods-for-javascript-sources. |
Waiting on denoland/rusty_v8#1514 to be available in |
Test case:
If you add/remove one or more newlines at the end of the file you'll see the stack trace changing. It doesn't cause a difference in Node.js or in the various browsers.
The text was updated successfully, but these errors were encountered: