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

fix: prevent yarn usage #2858

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
},
"engines": {
"node": "^12.9.1",
"npm": "^6.10.2"
"npm": "^6.10.2",
"yarn": "please_use_npm"
Copy link
Member

Choose a reason for hiding this comment

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

what's the effect of this?

technically using yarn should be fine. the only downside would be that the lockfile is not taken into account when installing through yarn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this helps you - https://stackoverflow.com/questions/57328593/prevent-yarn-install-from-running-in-project-i-e-force-npm-install
In my opinion , we should stick to yarn or npm, not both because of lock file. So far, this repo is using npm, so I just added a restriction that prevents using yarn.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of this PR, but the implementation seems to add even more confusing error message. Currently, if you run yarn you get a warning at the top about the presence of an npm lockfile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@locks
I don't think it is confusing. yarnpkg/yarn#4895 (comment) suggests this too.
I think a warning is not sufficient to prevent yarn because some ppl don't pay attention to warnings.

What do you think, @Turbo87?

Copy link
Member

Choose a reason for hiding this comment

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

even though I'm using npm to install the dependencies I usually still use things like yarn test and yarn start:live because I'm used to using yarn from other projects and have several shell aliases set up for things like this.

while I appreciate the idea and effort, I think I would prefer to not merge this 😞

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Turbo87
I see. That makes sense. Thank you for reviewing it anyways!
I'll close this PR.

}
}