Skip to content

fix: globally install corepack #4741

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

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Conversation

trivikr
Copy link
Contributor

@trivikr trivikr commented Apr 10, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Updates the corepack command to globally installing corepack.

💡 Motivation and Context

Corepack is not going to be distributed with Node.js v25+
TSC vote nodejs/TSC#1697 (comment)

💚 How did you test it?

CI

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

Copy link
Collaborator

@lucas-zimerman lucas-zimerman left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for your contribution!

Just a question unrelated to the PR, the new way of disabling corepack is to uninstall it globally? or the enable/disable commands are still valid after installed?

@trivikr
Copy link
Contributor Author

trivikr commented Apr 10, 2025

You can run enable/disable commands

$ echo '{ "packageManager": "yarn@4.9.0" }' > package.json

$  npm i -g corepack

$ yarn --version
! Corepack is about to download https://repo.yarnpkg.com/4.9.0/packages/yarnpkg-cli/bin/yarn.js
? Do you want to continue? [Y/n] Y

4.9.0

$ corepack disable

$ yarn --version  
zsh: command not found: yarn

$ corepack enable 

$ yarn --version
4.9.0

After disabling corepack, I get command not found as I don't have it globally installed.

@antonis antonis mentioned this pull request Apr 11, 2025
10 tasks
Copy link
Collaborator

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution 🙇
The changes LGTM 🎉

Also checked that all CI checks pass via #4745

Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

Thank you!

@krystofwoldrich krystofwoldrich merged commit 950b04f into getsentry:main Apr 11, 2025
55 of 57 checks passed
@trivikr trivikr deleted the patch-1 branch April 11, 2025 15:54
@antonis antonis mentioned this pull request Apr 15, 2025
10 tasks
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.

4 participants