-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
regression file:///
import within a data:
url no longer works
#42860
Comments
Pyrolistical
changed the title
regression file: import within a data: url no longer works
regression Apr 25, 2022
file:
import within a data:
url no longer works
Pyrolistical
changed the title
regression
regression Apr 25, 2022
file:
import within a data:
url no longer worksfile:///
import within a data:
url no longer works
I've bitsected the node versions, the regression was introduced in 17.5.0. it worked fine in 17.4.0 |
i've traced the code and i believe by the time the |
aduh95
added a commit
to aduh95/node
that referenced
this issue
Apr 27, 2022
guangwong
pushed a commit
to noslate-project/node
that referenced
this issue
Oct 10, 2022
Fixes: nodejs/node#42860 PR-URL: nodejs/node#42881 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Guy Bedford <guybedford@gmail.com>
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v18.0.0
Platform
Darwin Ronalds-iMac.local 20.6.0 Darwin Kernel Version 20.6.0: Tue Feb 22 21:10:41 PST 2022; root:xnu-7195.141.26~1/RELEASE_X86_64 x86_64
Subsystem
url or module
What steps will reproduce the bug?
data:
url that itself javascript that esm imports an absolutefile:
urlexample
How often does it reproduce? Is there a required condition?
always
What is the expected behavior?
inner.js is imported which prints 'inner'
What do you see instead?
crashes with
Additional information
According to the documentation, esm imports within a
data:
url must contain absolute paths.It is unclear what absolute paths means as there is a contradiction in the documentation:
file:
absolute paths are defined as either starting with/
,//
orfile:///
.file:///
I tested both
/
andfile:///
within adata:
, neither worked.I tested
data:
url by itself with no import and there is no issue there.This is a regression because when I tested against node
16.14.2
, esm import offile:
within adata:
did work!Using
file:
directly does work in v18. The bug only seems to be whenfile:
is used withindata:
Repo where I tried various cases. See branches for different versions including v12 and v14.
https://github.com/Pyrolistical/esm-import-file-scheme-bug
The text was updated successfully, but these errors were encountered: