-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 install doesn't complain about garbled data for a given resolved version in yarn.lock #7594
Comments
It looks like I made a mistake copying and pasting in nano. I copied some lines that were overflowing my screen to the right when I copied. So the data got cut off and garbled. |
yarn.lock
I significantly updated this bug report to reflect the less-severe nature and scope of the problem. |
yarn.lock
Can you upgrade to the latest version of node (12.11.1) and retry? |
Tried on Ubuntu Eoan (19.10) and macOS Mojave (10.14.5), latest Node 10.x and 12.x, and Yarn 1.17.3 and 1.19.0 (all eight combinations). In all cases, using my example repo on Can confirm that Yarn did not error out or warn that it was ignoring the (partially garbled) resolution info in |
Do you want to request a feature or report a bug?
I would like to report a bug.
What is the current behavior?
yarn install
(with or without--pure-lockfile
and--frozen-lockfile
) will proceed without a warnings or errors if data for resolved versions is garbled or blank inyarn.lock
.If the current behavior is a bug, please provide the steps to reproduce.
Minimal test-case repo I made: https://github.com/DeeDeeG/yarn-install-bugs
Note that the
yarn.lock
file in that repo is manually edited, and nonsensically recordslodash@~4.15.0
as being resolved to version1.3.0
ofleft-pad
. It is also cut off a bit due to a caopy-paste mishap. This demonstrates thatyarn install
's checks do not notice or warn about this garbage data inyarn.lock
. In fact, the whole resolution info and SHASUM, etc. can be manually deleted, andyarn install --frozen-lockfile
will run without warnings or errors. (This single line would be a sufficientyarn.lock
:lodash@~4.15.0:
)Steps to reproduce:
You can do this to install dependencies (which are just lodash):
yarn install --frozen-lockfile
ORyarn install --pure-lockfile
You can do this to verify which version of lodash was installed to
node_modules
:grep "var VERSION" node_modules/lodash/lodash.js
What is the expected behavior?
yarn install
should complain about garbled data inyarn.lock
, especially when using--pure-lockfile
or--frozen-lockfile
Please mention your node.js, yarn and operating system version.
Node: v10.16.3
Yarn: tested with v1.17.3 through v1.19.0
OS: Ubuntu 19.10 (development branch) -- Linux 5.3
The text was updated successfully, but these errors were encountered: