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 should be ignored #10

Closed
cemremengu opened this issue Nov 28, 2018 · 10 comments
Closed

yarn.lock should be ignored #10

cemremengu opened this issue Nov 28, 2018 · 10 comments
Labels
enhancement New feature or request

Comments

@cemremengu
Copy link
Contributor

No description provided.

@cemremengu
Copy link
Contributor Author

.nvmrc too I think

@aboutlo aboutlo added the enhancement New feature or request label Nov 28, 2018
@aboutlo
Copy link
Collaborator

aboutlo commented Nov 28, 2018

@cemremengu Should I then ignore as well those file too?

  • yarn.lock
  • .editorconfig
  • .gitignore
  • .npmignore
  • .nvmrc
  • .prettierrc
  • .travis.yml

aboutlo added a commit that referenced this issue Nov 28, 2018
@aboutlo aboutlo mentioned this issue Nov 28, 2018
@cemremengu
Copy link
Contributor Author

The listings in .gitignore file should be enough (npm will also use it so no need for an .npmignore file) just add .nvmrc and .yarn.lock to it. Also you should delete the files from the repo as well

@aboutlo
Copy link
Collaborator

aboutlo commented Nov 28, 2018

🤔I see, I guess I misunderstood your suggestion. Let me clarify
.nvmrc is useful to keep in the repo in order to enforce the default node version if someone is working on it.
yarn.lock is required in the repo for dev dependencies
So, to me, the best way it's adding both of them in the .npmignore. TBH Not sure it worth to avoid this two files being published

@cemremengu
Copy link
Contributor Author

I think .nvmrc and .lock files are more suitable for applications rather than libraries. When making the suggestion my motivation was actually to have a similar structure as other plugins in the organization for consistency however the decision is yours to make :)

@aboutlo
Copy link
Collaborator

aboutlo commented Nov 29, 2018

@mcollina I saw you have approved my PR but after the chat with @cemremengu I'm not sure it's anymore aligned. Maybe you have a different perspective on this one

@mcollina
Copy link
Member

Either it's fine. It depends on what you prefer to do. We gitignore yarn.lock and package-lock.json in all of the other repos of this orgs. Mainly because it complicates maintenance over time, and it prevent certain problems for being exposes. lock files are great for apps, not so much for modules and libraries.

@aboutlo
Copy link
Collaborator

aboutlo commented Nov 29, 2018

Does it mean you prefer to fail if your dependencies has been changed? So that you can fix the issue.
Howver, here we have zero dependencies apart the dev dependencies. To me it's nice to keep jest, jsdoc-markdown locked but defenitely not strong opinion here. I understand consistency so no problem to move both of them to .gitignore if you prefer so.

@mcollina
Copy link
Member

Yes, I prefer things to fail for modules. Otherwise you may not see that your module is broken when installed, due to an updated dependency.

(this is more philosophical in fact, this module has no dependencies - kind of the reason why I didn’t say anything in the beginning)

@aboutlo
Copy link
Collaborator

aboutlo commented Dec 12, 2018

fixed by 8ea582f

@aboutlo aboutlo closed this as completed Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants