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

Use corepack to run Yarn #5859

Merged
merged 5 commits into from Nov 6, 2023
Merged

Conversation

bdukes
Copy link
Contributor

@bdukes bdukes commented Nov 6, 2023

Summary

As demonstrated in #5858, the Cake build does not work when Yarn has not been installed. The recommended way to install Yarn is via Corepack, which is included with Node.js since version 16.9.0.

Corepack will read the packageManager field from package.json to determine the correct package manager and its version, and get a copy dynamically, instead of using the JS file checked into the repository.

This PR updates the build task which runs Yarn commands to do so via Corepack, to avoid an extra install step. It also adds a check for Corepack and fails the build if it is not available.

@bdukes bdukes added this to the 9.13.1 milestone Nov 6, 2023
Copy link
Contributor

@mitchelsellers mitchelsellers left a comment

Choose a reason for hiding this comment

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

This is awesome!

Copy link
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

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

AwesomeGrandmaGIF

@valadas valadas merged commit a94acf8 into dnnsoftware:develop Nov 6, 2023
3 checks passed
@bdukes bdukes deleted the use-yarn-via-corepack branch November 6, 2023 18:27
@KirillOsenkov
Copy link

Hey @bdukes, this is amazing, thanks so much!

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

Successfully merging this pull request may close these issues.

None yet

4 participants