Uh oh!
There was an error while loading. Please reload this page.
Unstage yarn.lock pre-commit - #2700
Conversation
Since yarn.lock shouldn't be added to the repo, nor excluded via .gitignore, lets take advantage of lint-staged to remove any staged yarn.lock files before they can even be committed.
ggascoigne
commented
Jul 28, 2017
Why shouldn't it be checked in? The docs suggest otherwise https://yarnpkg.com/lang/en/docs/yarn-lock/. I should add that we specifically check this file in to get reproducible builds and would find it very awkward to work around this change. |
jdcrensh
commented
Jul 29, 2017
To be clear, this PR is relevant only to the create-react-app repo, where yarn.lock is neither committed nor gitignored. Apps using react-scripts would not be affected in any way. |
ggascoigne
commented
Jul 29, 2017
Ah, sorry, that makes much more sense. |
Timer
commented
Aug 2, 2017
Seems very useful to me, thanks! |
Since yarn.lock shouldn't be added to the repo, nor excluded via .gitignore, lets take advantage of lint-staged to remove any staged yarn.lock files before they can even be committed.
* commit 'bfaee410c502a95076a6bd89721c76ca08e15f7b': (39 commits) Publish Prepare for 1.0.11 release (react#2924) Update dev deps (react#2923) Update README.md Use env variable to disable source maps (react#2818) Make formatWebpackMessages return all messages (react#2834) Adjust the `checkIfOnline` check if in a corporate proxy environment (react#2884) Fix the order of arguments in spawned child proc (react#2913) Feature/webpack 3 4 (react#2875) Allow importing package.json (react#2468) Re-enable flowtype warning (react#2718) Format UglifyJs error (react#2650) Unstage yarn.lock pre-commit (react#2700) Update README.md Update README.md Add Electrode to alternatives (react#2728) Fix parsing HTML/JSX tags to real elements (react#2796) Update webpack version note (react#2798) Use modern syntax feature (react#2873) Allow use of scoped packages with a pinned version (react#2853) ... # Conflicts: # packages/react-scripts/config/webpack.config.dev.js # packages/react-scripts/config/webpack.config.prod.js # packages/react-scripts/package.json
Since yarn.lock shouldn't be added to the repo, nor excluded via .gitignore, lets take advantage of lint-staged to remove any staged yarn.lock files before they can even be committed.
Since yarn.lock shouldn't be added to the repo, nor excluded via .gitignore, lets take advantage of lint-staged to remove any staged yarn.lock files before they can even be committed.
Since yarn.lock shouldn't be added to the repo, nor excluded via .gitignore, lets take advantage of lint-staged to remove any staged yarn.lock files before they can even be committed.
just-boris
commented
Jan 13, 2018
What's going on there? Why not to just add the file into |
gaearon
commented
Jan 13, 2018
We don’t want repo developers each to get their own lockfile that would be respected by Yarn. Since then they wouldn’t get the freshest versions that match what users would get. |
@just-boris I wrote some of the reasons in https://github.com/luftywiranda13/remove-lockfiles#why 😊 |
gaearon
commented
Jan 13, 2018
In any case unstaging should be unnecessary now that we:
|
The create-react-app repo itself should not be using yarn.lock. See e.g. react#2700.
Since
yarn.lockshouldn't be added to the repo, nor excluded via.gitignore, lets take advantage oflint-stagedto unstage any stagedyarn.lockfiles before they can even be committed.