https://github.com/robertknight/yarn-update-indirect
Tool to update indirect / transitive dependencies in Yarn lockfiles
https://github.com/robertknight/yarn-update-indirect
Last synced: 3 days ago
JSON representation
Tool to update indirect / transitive dependencies in Yarn lockfiles
- Host: GitHub
- URL: https://github.com/robertknight/yarn-update-indirect
- Owner: robertknight
- Created: 2023-10-23T14:47:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-24T07:43:28.000Z (over 1 year ago)
- Last Synced: 2025-04-19T20:34:28.635Z (14 days ago)
- Language: JavaScript
- Size: 938 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yarn-update-indirect
Tool to update indirect dependencies in [Yarn](https://yarnpkg.com) lockfiles.
_Indirect_ means that the dependency is not directly referenced in
a project's package.json, but is a transitive dependency of a package that is.This tool is a workaround for the lack of an easy built-in way to update
indirect dependencies in `yarn.lock` files. See [this
issue](https://github.com/yarnpkg/yarn/issues/4986).The tool works in two steps:
1. Edit the project's `yarn.lock` file to remove existing resolutions
for a package.
2. Re-run `yarn install` to refresh the lockfile and add resolutions for
the current versions.**This tool is designed for Yarn v3+ (aka. "yarn modern"). It does not work
with Yarn classic (v1.x).**## Usage
As an example, suppose your project has indirect dependencies on "foo" and "bar"
and you want to update them to the latest compatible versions, you would run:```
npm install yarn-update-indirect
yarn-update-indirect foo bar
```This will update the "yarn.lock" file in the current working directory.