1

I'm trying to use Yarn 2.0 to upgrade to the latest version of the dependency in my yarn.lock to resolve a dependabot issue. The issue exists with the ini dependency and I tried running command yarn up ini which resulted in the following error:

❯ yarn up ini
Usage Error: Pattern ini doesn't match any packages referenced by any workspace

I noticed that I can use yarn up to upgrade packages in package.json file, but haven't been able to figure out how to update a dependency in a yarn.lock. I'm wondering if anyone knows what command I should be using instead?

Any help would be greatly appreciated. Thank you!

Documentation Source: https://yarnpkg.com/getting-started/migration#renamed

AMP_035
  • 167
  • 1
  • 2
  • 13

2 Answers2

1

I noticed that I can use yarn up to upgrade packages in package.json file, but haven't been able to figure out how to update a dependency in a yarn.lock. I'm wondering if anyone knows what command I should be using instead?

Starting from 3.0, transitive dependencies (ie dependencies of dependencies) can be upgraded using yarn up -R <name>.

Maël Nison
  • 7,055
  • 7
  • 46
  • 77
0

I learned that you can't upgrade individual dependencies in the yarn-lock file, you have to upgrade package with the dependency in the package.json file by running the command:

yarn up ${package_name} followed by yarn install in Yarn 2.0.

AMP_035
  • 167
  • 1
  • 2
  • 13