Skip to content

Instantly share code, notes, and snippets.

@radmen
Last active December 23, 2019 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radmen/0e9ce8706343db28f68bc7ad97910ed3 to your computer and use it in GitHub Desktop.
Save radmen/0e9ce8706343db28f68bc7ad97910ed3 to your computer and use it in GitHub Desktop.
Injected package in yarn.lock

This is a simple example of injecting a different package using the lock file.

yarn command will install boolean in place of ms.

{
"name": "test",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
"ms": "^2.1.2"
}
}
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
ms@^2.1.2:
version "2.1.2"
# resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
# integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.0.0.tgz#fab78d5907dbae6216ab46d32733bb7b76b99e76"
integrity sha512-OElxJ1lUSinuoUnkpOgLmxp0DC4ytEhODEL6QJU0NpxE/mI4rUSh8h1P1Wkvfi3xQEBcxXR2gBIPNYNuaFcAbQ==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment