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

yarn.lock is untracked when setting up a local copy of the project #7765

Closed
lukyth opened this issue Oct 2, 2019 · 4 comments · Fixed by #7789
Closed

yarn.lock is untracked when setting up a local copy of the project #7765

lukyth opened this issue Oct 2, 2019 · 4 comments · Fixed by #7789

Comments

@lukyth
Copy link
Contributor

lukyth commented Oct 2, 2019

Is your proposal related to a problem?

Yes.

When I try to contribute to this project by following the instruction in https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#setting-up-a-local-copy

1. Clone the repo with git clone https://github.com/facebook/create-react-app
2. Run yarn in the root create-react-app folder.

yarn.lock will be generated and is untracked.

Right now yarn.lock is neither checked in nor ignored by .gitignore. So I have to get rid of it somehow (stash/remove) when I commit the code. If I remove it and run yarn again, it'll just generate a new one. This could become a bit frustrating.

Describe the solution you'd like

Checking in yarn.lock as well. I could take care of this if the idea is accepted.

Describe alternatives you've considered

Ignore yarn.lock in .gitignore. But I'd rather avoid that and check it in instead according to https://yarnpkg.com/lang/en/docs/yarn-lock/#toc-check-into-source-control

Additional context

None.

@rovansteen
Copy link
Contributor

Yeah I have always been wondering why it was not added to .gitignore. @iansu any reason for this?

@ianschmitz
Copy link
Contributor

If we were to act on this I would suggest we ignore yarn.lock. By doing so we ensure that our CI installs the latest versions of packages to discover potential issues our users may encounter.

@rovansteen
Copy link
Contributor

I remember that I had issues running the end-to-end tests because it runs a pristine check somewhere which fails because I had a yarn.lock file. So makes sense to add the file to gitignore then?

@lukyth
Copy link
Contributor Author

lukyth commented Oct 6, 2019

Seems like it's a consensus that yarn.lock should be ignored. I'll open a PR for that then.

@lock lock bot locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants