Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

modify .yarnrc to force frozen-lockfile for yarn install #1217

Closed
wants to merge 1 commit into from

Conversation

alxiong
Copy link
Collaborator

@alxiong alxiong commented Apr 2, 2019

As I keep git checkout yarn.lock, I realize maybe we should follow this issue

@alxiong alxiong requested a review from snario as a code owner April 2, 2019 08:23
@snario
Copy link
Contributor

snario commented Apr 2, 2019

Thoughts @joelalejandro @ebryn

@alxiong
Copy link
Collaborator Author

alxiong commented Apr 3, 2019

Yes, it also might be helpful to be explicit about what's the best practice for who (anyone? or only greenkeeper) & when (on every pull and yarn install or when adding new dep) to update the yarn.lock, or at least the standard inside the team

@ldct
Copy link
Member

ldct commented Apr 3, 2019

+1 - I don't understand how the current setup works, specifically why running yarn locally would update yarn.lock, and why CI uses --frozen-lockfile

@snario
Copy link
Contributor

snario commented Apr 3, 2019

CI uses --frozen-lockfile because if, on the CI, the yarn.lock file was changed and thus the git working tree was modified, the step to deploy to Heroku will fail because deploying to Heroku implicitly does a git push which will error saying you need to handle your working tree changes.

@alxiong
Copy link
Collaborator Author

alxiong commented Apr 4, 2019

@snario so anyone pulling the repo and after yarn install on their local machine, realize there's update to yarn.lock, are they supposed to push that to the master branch through PR?
--frozen-lock should only be used for CI?

@snario
Copy link
Contributor

snario commented Apr 4, 2019

I think that's a good convention.

Perhaps there should even be a CI check such that if yarn runs and changes then the PR should fail until a commit is added with the necessary change to yarn.lock?

@Alonski
Copy link
Member

Alonski commented Apr 10, 2019

@snario I think the root cause of this problem is that greenkeeper doesn't update lock files. I have been using renovate lately and it does do that. Also free for open source. It can also automerge if tests pass.

@alxiong alxiong deleted the alex/yarnrc branch April 10, 2019 09:28
@snario
Copy link
Contributor

snario commented Apr 11, 2019

See #1261 which needs to be worked on.

We can remove Greenkeeper in that PR, too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants