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

install --pure-lockfile is not compatible with check --integrity #569

Closed
bestander opened this issue Oct 10, 2016 · 1 comment
Closed

install --pure-lockfile is not compatible with check --integrity #569

bestander opened this issue Oct 10, 2016 · 1 comment
Labels

Comments

@bestander
Copy link
Member

Do you want to request a feature or report a bug?

bug

What is the current behavior?

$ yarn install --pure-lockfile
$ yarn check --integrity
yarn check v0.14.0
error Integrity hashes don't match, expected 1fda2993d6dabf526ed1d4f7faa4af7bb8408efedfa1a0c7deced8768f3c242a but got a663cd3ec745d0ad9edb32199d0b5680951bfb5d47af77bca25e9bc7f9290622

Yarn check --integrity calculates hash based on in memory representation of yarn.lock file instead of the actual file.
This makes yarn install --pure-lockfile less useful.

@sebmck sebmck added the cat-bug label Oct 11, 2016
facebook-github-bot pushed a commit to facebookarchive/fbshipit that referenced this issue Oct 12, 2016
Summary:
Wacky nodeModules.js is replaced with install-node-modules.js.
A few concerns to address:
- I did not make it a `hg mv nodeModules.js ..../install-node-modules.js` because I want to start with clean-ish slate and have a good peer review to the script
- I did not want to use external dependencies for install-node-modules.js because I want this script to startup as fast as possible and don't want to either check in its dependencies or use yarn to install them. Otherwise I would use shell.js, node-fetch and optimist, still an option if this script proves to be a hassle to support

Things to come:
- hook up jsbuddy and flow on install-node-modules.js
- yarnpkg/yarn#576
- yarnpkg/yarn#569
- yarnpkg/yarn#570

Usage for fbsource projects:
```
fbcode/react_native/kpm/wrapper/install-node-modules.sh fbsource/.../js-project
```

Reviewed By: yungsters

Differential Revision: D3996416

fbshipit-source-id: 078b2ca5c076c2c6e2e7209945e59aaa31ebc4aa
@bestander
Copy link
Member Author

Fixed, integrity checks are based on the model inside resolver after the lockfile is loaded and not on the content of lockfile

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

No branches or pull requests

2 participants