tylerlong/yarn-upgrade-all

Performance issues

Closed this issue · 6 comments

It takes a really long time to upgrade each package in particular. It would be a lot faster if you use the npm-api to fetch the versions, replace these in the package.json and run yarn after it.

agree with the above.. currently it takes forever, I just ran it on one of my projects and it took over an hour!

I don't think it's necessary to remove packages before updating them. yarn add pkg-1 pkg-2 pkg-3 ... should be enough.

@edit:

const packageJson = require("./package.json");
const { execSync } = require("child_process");

const allDeps = {
  ...packageJson.devDependencies,
  ...packageJson.dependencies
};

const allDepsNames = Object.keys(allDeps);

execSync(`yarn add ${allDepsNames.join(" ")}`);

If you want same results but fast, try upgradeps which does parallel version querying for all packages before updating.

Disclaimer: I've built it.

@lropero Lol, 15 versions spread about 26 commits 🤣 jk. nicely done :D

..happens :)

The issue has been discussed here: #2 (comment)