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

disable corepack auto pin feature when executing npm view #210601

Merged
merged 4 commits into from
Apr 18, 2024
Merged

disable corepack auto pin feature when executing npm view #210601

merged 4 commits into from
Apr 18, 2024

Conversation

frankli0324
Copy link
Contributor

@frankli0324 frankli0324 commented Apr 17, 2024

fixes #210556

the bundled plugin "npm" attempts to fetch the package versions with command "npm view --json" each time a user hovers on a package in package.json.

https://github.com/microsoft/vscode/blob/main/extensions/npm/src/features/packageJSONContribution.ts#L286-L290

however with a corepack installation (e.g. brew install corepack), the default behavior of the wrapped npm binary would try to pin the current package manager version to the package.json of the current project.

It's surprising behavior, since the action is triggered by vscode, and no obvious way to find out what's behind the vscode action, disabling the feature entirely would be reasonable since npm extension only wants the package information

@frankli0324 frankli0324 changed the title fixes #210556: disable corepack auto pin feature when executing npm view fix #210556: disable corepack auto pin feature when executing npm view Apr 17, 2024
@frankli0324 frankli0324 changed the title fix #210556: disable corepack auto pin feature when executing npm view disable corepack auto pin feature when executing npm view Apr 17, 2024
meganrogge
meganrogge previously approved these changes Apr 17, 2024
@meganrogge meganrogge added this to the April 2024 milestone Apr 17, 2024
@meganrogge meganrogge self-assigned this Apr 17, 2024
@meganrogge meganrogge enabled auto-merge (squash) April 17, 2024 22:46
auto-merge was automatically disabled April 17, 2024 23:27

Head branch was pushed to by a user without write access

@meganrogge meganrogge enabled auto-merge (squash) April 18, 2024 00:55
@meganrogge meganrogge merged commit 59d84c5 into microsoft:main Apr 18, 2024
6 checks passed
@frankli0324 frankli0324 deleted the patch/disable-corepack-autopin branch April 18, 2024 10:08
@karladler
Copy link

is there any solution to disable this till the fix is released?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vscode setting packageManager in package.json unconditionally
4 participants