Created
February 1, 2018 21:47
-
-
Save z-vr/4282cebbad0faaece570ca6338275b60 to your computer and use it in GitHub Desktop.
yarn upgrade all
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// upgrade all dependencies | |
// requires `spawncommand` | |
// node upgrade.js | |
const spawncommand = require('spawncommand') | |
const { devDependencies, dependencies } = require('./package.json'); | |
(async () => { | |
const keys = Object.keys({ ...devDependencies, ...dependencies }) | |
.map(s => `${s}@latest`) | |
const proc = spawncommand('yarn', ['upgrade', ...keys]) | |
console.log(proc.spawnCommand) | |
proc.stdout.pipe(process.stdout) | |
proc.stderr.pipe(process.stderr) | |
const { stdout, stderr, code } = await proc.promise | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment