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

fix(cli): add prefix hint when installing a package globally #26629

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbrdg
Copy link

@mbrdg mbrdg commented Oct 29, 2024

closes #26545

Shows a hint when a package is installed globally, otherwise fallbacks to the existing implementation.

@CLAassistant
Copy link

CLAassistant commented Oct 29, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @mbrdg, is there any chance you could add a test for this change?

@mbrdg
Copy link
Author

mbrdg commented Nov 7, 2024

Thanks for the PR @mbrdg, is there any chance you could add a test for this change?

Rookie mistake on my side, but I got a few questions regarding the test.

First, I've tried to add a new test in tests/integration/install_tests.rs to cover this change. Is this the right place to introduce the new test?

Additionally, I've followed the logic from other tests by instantiating a TestContextBuilder but I'm only able to get module not found errors when a try to install a package from npm and another from jsr without their prefixes. I can't obtain prefix errors because context's http server immediately tries to download from localhost. How can I overcome this issue within the test environment?

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.

Show hint when trying to install a package globally without a :npm/:jsr prefix
3 participants