Skip to content

Conversation

@eduardoboucas
Copy link
Member

@eduardoboucas eduardoboucas commented Oct 21, 2025

Follow-up to #6720. The ESZIP extraction logic that maps specifiers to paths on disk had some issues.

We can't easily map a full URL to paths on disks without breaking the hierarchy of imports, because if we see https://example.com/foo and https://example.com/foo/bar.ts, we'd need to represent the /foo node as both a file and a directory.

So in this PR we're changing the extraction logic to only extract local files. Any other specifiers will be left alone and will follow the normal resolution by the deno run call.

@eduardoboucas eduardoboucas changed the title fix: extract ESZIP correctly fix: only target file: specifiers when extracting ESZIP Oct 22, 2025
const tail = url.pathname.split("/").filter(Boolean);
const relativePath = tail.length === 0 ? [".root"] : tail;
return join(url.hostname, ...relativePath);
function url2path(url: string) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting this to the original version.

@eduardoboucas eduardoboucas marked this pull request as ready for review October 22, 2025 09:05
@eduardoboucas eduardoboucas requested a review from a team as a code owner October 22, 2025 09:05
@eduardoboucas eduardoboucas merged commit 3f342bd into main Oct 22, 2025
93 of 100 checks passed
@eduardoboucas eduardoboucas deleted the fix/deno-eszip-extract branch October 22, 2025 09:40
This was referenced Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants