I have several 'latest' and '^x.x.x' packages for a package that's going into maintenance mode. For stability purposes, I'd like to fix all package versions.
After spending some time combing through the yarn.lock file, I noticed multiple versions of individual packages, making this process very cumbersome.
Most other answers refer to a specific package, using yarn list, which doesn't apply to v3+ and yarn why, which applies to individual packages.
I didn't find the documentation over at https://yarnpkg.com/ to be particularly helpful (largely down to the UX) but I found the following through
yarn help:This prints the name of each package, accompanied by the npm version. This wasn't tested but may also work for yarn2.x