Skip to content

disable corepack auto pin feature when executing npm view - #210601

Merged
Megan Rogge (meganrogge) merged 4 commits into
microsoft:mainfrom
frankli0324:patch/disable-corepack-autopin
Apr 18, 2024
Merged

disable corepack auto pin feature when executing npm view#210601
Megan Rogge (meganrogge) merged 4 commits into
microsoft:mainfrom
frankli0324:patch/disable-corepack-autopin

Conversation

@frankli0324

@frankli0324 Frank (frankli0324) commented Apr 17, 2024

Copy link
Copy Markdown
Contributor

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 Frank (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 Frank (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
auto-merge was automatically disabled April 17, 2024 23:27

Head branch was pushed to by a user without write access

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

Copy link
Copy Markdown

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