Socket
Book a DemoInstallSign in
Socket

@isaacs/nested-yarn-lock-test

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@isaacs/nested-yarn-lock-test

This is an example case showing that a `yarn.lock` file does not guarantee package resolutions at all levels.

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

This is an example case showing that a yarn.lock file does not guarantee package resolutions at all levels.

root (x@1.x, y@1.x, z@1.x) <-- 1.x dep here
+-- x 1.2.0                <-- 1.x resolves to 1.2.0
+-- y (x@1.1, z@2.x)
|   +-- x 1.1.0            <-- 1.x resolves to 1.1.0
|   +-- z 2.0.0 (x@1.x)    <-- 1.x dep here
+-- z 1.0.0

Both Yarn and npm create the same folder structure in node_modules, which is good. But the yarn.lock file indicates that x@1.x should resolve to version 1.2.0, and z@2.0.0's dependency on x@1.x resolves to 1.1.0 instead.

Conclusion: yarn.lock on its own does not guarantee resolutions or deterministic builds. That part of the contract is provided by the implementation of Yarn itself, not in the lockfile format.

FAQs

Package last updated on 07 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts