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

Progress bar shows percent-encoded npm: dependencies #26576

Closed
bartlomieju opened this issue Oct 27, 2024 · 2 comments · Fixed by #26600
Closed

Progress bar shows percent-encoded npm: dependencies #26576

bartlomieju opened this issue Oct 27, 2024 · 2 comments · Fixed by #26600
Assignees
Labels
bug Something isn't working correctly dx

Comments

@bartlomieju
Copy link
Member

Downloading npm packages that get percent encoded (eg. having / in the name) are badly printed:

Screen.Recording.2024-10-27.at.02.18.39.mov

Most likely caused by #26390

@bartlomieju bartlomieju added bug Something isn't working correctly dx labels Oct 27, 2024
@SaiThanushreddy
Copy link

@bartlomieju Can i work on this?

@marvinhagemeister
Copy link
Contributor

marvinhagemeister commented Oct 28, 2024

Looking into this the issue occurs because we're passing only the resolved URL to the progress bar here

let message = display_entry
.message
.replace("https://registry.npmjs.org/", "npm:")
.replace("https://jsr.io/", "jsr:");

The check for the npm: specifier is hard coded for the public npm registry and won't work with private registries either. I'm not sure if wiring up the npmrc information to this place would be a good fix. Reconstructing the original specifier from the final URL seems like it can only works in specific circumstances. It feels like the original specifier should be passed to the progress bar instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly dx
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants