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

Create lockfile when missing even when integrity hash matches #1888

Merged
merged 1 commit into from Nov 16, 2016

Conversation

wyze
Copy link
Member

@wyze wyze commented Nov 16, 2016

Summary

This solves #1876. Before, if integrity hash from disk matched the calculated hash from the patterns from the manifest, then it would bail on the rest of the installation. Added a check to not bail out if the yarn.lock file does not exist. This was a regression in 0.17.x as it would create it if missing in 0.16.x.

Test plan

Setup
$ mkdir yarn-test && cd $_

$ yarn add left-pad
yarn add v0.18.0-0
info No lockfile found.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
└─ left-pad@1.1.3
✨  Done in 0.69s.

$ rm -rf yarn.lock

$ ls
node_modules package.json
Before
$ yarn
yarn install v0.17.2
info No lockfile found.
warning No license field
[1/4] πŸ”  Resolving packages...
success Already up-to-date.
✨  Done in 0.59s.

$ ls
node_modules package.json
After
$ yarn
yarn install v0.18.0-0
info No lockfile found.
warning No license field
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
✨  Done in 0.46s.

$ ls
node_modules package.json yarn.lock

@wyze
Copy link
Member Author

wyze commented Nov 16, 2016

Travis is having issues with the NodeSource Debian repository.

@bestander bestander merged commit 135fd87 into master Nov 16, 2016
@wyze wyze deleted the fix-lockfile-generation branch November 16, 2016 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants