Skip to content
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 nested data: imports with --experimental-network-imports #53998

Closed

Conversation

rutaganda-salim
Copy link

@rutaganda-salim rutaganda-salim commented Jul 22, 2024

This PR addresses issue [ISSUE_NUMBER] by allowing data: imports from other data: URLs when the --experimental-network-imports flag is used. This change modifies the condition in lib/internal/modules/esm/resolve.js to check for nested data: URLs correctly.
Additionally, a new test case has been added in test/parallel/test-esm-data-url-import.js to verify this behavior.

Fixes: #53992

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Jul 22, 2024
@legendecas
Copy link
Member

See also: #53822

Co-authored-by: James M Snell <jasnell@gmail.com>
Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

TSC reached a consensus to remove this feature. So, there's no reason to land this PR anymore.

@aduh95
Copy link
Contributor

aduh95 commented Jul 24, 2024

@RafaelGSS I disagree, I think it makes sense to land this to fix the behavior on release lines (also TSC consensus is not exactly relevant, it's up to Node.js collaborators, not the TSC, unless collaborators can't find consensus)

@joyeecheung
Copy link
Member

I think it makes sense to land this to fix the behavior on release lines

I think in that case it should just be targeting release lines, instead of main?

@joyeecheung
Copy link
Member

joyeecheung commented Jul 25, 2024

Also, it seems the diff here isn't working, there are multiple relevant test failures, maybe there's some git error (OP mentioned a test case in test/parallel/test-esm-data-url-import.js, but it's not showing up in the diff), because the diff here clearly doesn't work (making use of an undefined variable).

@aduh95
Copy link
Contributor

aduh95 commented Jul 28, 2024

I tried checking out this branch and fixing the tests, unfortunately it's apparent that --experimental-network-imports is really broken, and since we're removing it, it seems not worth spending time fixing it.

Thanks for sending this PR, and sorry it won't work out this time!
Closing since the PR removing the feature from main has now landed.

@aduh95 aduh95 closed this Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import data: from data: should be allowed
7 participants