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

Marks yarn init as a transparent command #410

Merged
merged 1 commit into from
Mar 3, 2024
Merged

Marks yarn init as a transparent command #410

merged 1 commit into from
Mar 3, 2024

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Feb 27, 2024

New projects should use the newest versions when setup. Adding yarn init as a transparent command means that people running it will automatically have the packageManager field set to 4.1.0+sha... unless they explicitly opt-out by running corepack yarn@1 init instead.

Projects that don't list package managers will still execute Yarn 1.x, and so will other Yarn commands executed from outside any package directory (yarn config set, etc).

Copy link
Member

@merceyz merceyz left a comment

Choose a reason for hiding this comment

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

This will cause a project with a specific version of Yarn to potentially use a different version for yarn init so we need to solve #202 (comment) first.

Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

That seems a good change regardless of fixing the other bug.

@arcanis
Copy link
Contributor Author

arcanis commented Mar 1, 2024

I agree with @aduh95 - the two problems are separate, I don't think this PR should be blocked until I send a fix for the other one.

@arcanis
Copy link
Contributor Author

arcanis commented Mar 3, 2024

Going to work on the "transparent version should be ignored if the local version supports the command" issue in a separate PR. Merging this one in the meantime.

@arcanis arcanis merged commit 3958d26 into main Mar 3, 2024
10 checks passed
@arcanis arcanis deleted the mael/yarn-init branch March 3, 2024 12:51
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.

3 participants