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

Unstage yarn.lock pre-commit #2700

Merged
merged 1 commit into from Aug 2, 2017

Conversation

Projects
None yet
7 participants
@jdcrensh
Copy link
Contributor

jdcrensh commented Jun 30, 2017

Since yarn.lock shouldn't be added to the repo, nor excluded via
.gitignore, lets take advantage of lint-staged to unstage any staged
yarn.lock files before they can even be committed.

@jdcrensh jdcrensh force-pushed the jdcrensh:git-rm-yarn-lock branch from 56ac56a to b00c985 Jul 13, 2017

Unstage yarn.lock pre-commit
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.

@jdcrensh jdcrensh force-pushed the jdcrensh:git-rm-yarn-lock branch from b00c985 to 3654c10 Jul 27, 2017

@ggascoigne

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link

ggascoigne commented Jul 29, 2017

Ah, sorry, that makes much more sense.

@Timer

This comment has been minimized.

Copy link
Collaborator

Timer commented Aug 2, 2017

Seems very useful to me, thanks!

@Timer Timer added the tag: internal label Aug 2, 2017

@Timer Timer merged commit 20c953d into facebook:master Aug 2, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Timer Timer added this to the 1.0.11 milestone Aug 2, 2017

JohnNilsson referenced this pull request in JohnNilsson/create-react-app-typescript Aug 9, 2017

Unstage yarn.lock pre-commit (#2700)
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.

zangrafx added a commit to absolvent/create-react-app that referenced this pull request Aug 13, 2017

Merge commit 'bfaee410c502a95076a6bd89721c76ca08e15f7b'
* commit 'bfaee410c502a95076a6bd89721c76ca08e15f7b': (39 commits)
  Publish
  Prepare for 1.0.11 release (facebook#2924)
  Update dev deps (facebook#2923)
  Update README.md
  Use env variable to disable source maps (facebook#2818)
  Make formatWebpackMessages return all messages (facebook#2834)
  Adjust the `checkIfOnline` check if in a corporate proxy environment (facebook#2884)
  Fix the order of arguments in spawned child proc (facebook#2913)
  Feature/webpack 3 4 (facebook#2875)
  Allow importing package.json (facebook#2468)
  Re-enable flowtype warning (facebook#2718)
  Format UglifyJs error (facebook#2650)
  Unstage yarn.lock pre-commit (facebook#2700)
  Update README.md
  Update README.md
  Add Electrode to alternatives (facebook#2728)
  Fix parsing HTML/JSX tags to real elements (facebook#2796)
  Update webpack version note (facebook#2798)
  Use modern syntax feature (facebook#2873)
  Allow use of scoped packages with a pinned version (facebook#2853)
  ...

# Conflicts:
#	packages/react-scripts/config/webpack.config.dev.js
#	packages/react-scripts/config/webpack.config.prod.js
#	packages/react-scripts/package.json

JohnNilsson referenced this pull request in JohnNilsson/create-react-app-typescript Sep 9, 2017

Unstage yarn.lock pre-commit (#2700)
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.

Ayc0 pushed a commit to Ayc0/create-react-app that referenced this pull request Sep 18, 2017

Unstage yarn.lock pre-commit (facebook#2700)
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.

kasperpeulen added a commit to kasperpeulen/create-react-app that referenced this pull request Sep 24, 2017

Unstage yarn.lock pre-commit (facebook#2700)
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.

swengorschewski referenced this pull request in swengorschewski/cra-typescript-electron Oct 16, 2017

Unstage yarn.lock pre-commit (#2700)
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.

jdcrensh added a commit to jdcrensh/create-react-app that referenced this pull request Oct 24, 2017

Unstage yarn.lock pre-commit (facebook#2700)
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

This comment has been minimized.

Copy link
Contributor

just-boris commented Jan 13, 2018

What's going on there? Why not to just add the file into .gitignore instead of abusing pre-commit hook functionality?

@gaearon

This comment has been minimized.

Copy link
Member

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.

@luftywiranda13

This comment has been minimized.

Copy link
Contributor

luftywiranda13 commented Jan 13, 2018

@gaearon

This comment has been minimized.

Copy link
Member

gaearon commented Jan 13, 2018

In any case unstaging should be unnecessary now that we:

  • only support Yarn for development
  • have .yarnrc disabling the lockfile

@jdcrensh jdcrensh deleted the jdcrensh:git-rm-yarn-lock branch Jan 16, 2018

papermana added a commit to netguru/create-react-app that referenced this pull request Jan 21, 2018

Remove yarn.lock from packages/react-scripts
The create-react-app repo itself should not be using yarn.lock. See e.g. facebook#2700.

@lock lock bot locked and limited conversation to collaborators Jan 20, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.