-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Gitignore #1195
Merged
Merged
Gitignore #1195
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ | |
node_modules | ||
.byebug_history | ||
/test/test_app/tmp | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.yarn-integrity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry for coming back to this old issue. However, I have a question about the decision to add
.yarn-integrity
to the gitignore template file.So, this means that by default user won't be able to turn on integrity check on their remote server as when webpacker runs
yarn check --integrity
it would fail.Is this the intended behavior, e.g. is it recommended to not check this file into source control (despite it seems like it should be shared across machine)?
Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sikachu No worries! The reason for this is the integrity file would change between environments since the dependencies vary - development vs production(https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-production-true-false). So, if you run
yarn install
in development the integrity file would be different vsNODE_ENV=production yarn install
(unless I am mistaken).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Production:
vs
Development:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Thank you very much.
Very interesting, as I thought that
yarn check --integrity
with.yarn-integrity
file is the way to check that the package hasn't been tampered with when you try to install the same package on your production server by comparing to what you have locally, but I guess it's already doing that withpackages.json
?Anyway, I guess I'll just turn of the check on production server instead of checking this file in then, with the hope that yarn is already doing the right thing. 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your welcome :)
Yeah, it does that by comparing
package.json
andyarn.lock
file. I guess this check is really helpful in development when you have added some dependencies but forgot to install or using an outdated version as specified in yarn.lock or installed the dependencies in a different environment as the original.Yeah, you don't need to run this check on production. Haven't run into any problem so far.