3 ms·
Shameless plug for bashojs (bashojs.org), for the JavaScripters: A one liner to update all your npm deps to latest. I use this quite a lot. basho --import '
by jeswin 6y ago
Shameless plug for bashojs (bashojs.org), for the JavaScripters:
A one liner to update all your npm deps to latest. I use this quite a lot.
basho --import './package.json' pack -j pack -j 'Object.keys(x.dependencies)' -m x -e 'npm install ${x}@latest'
Explanation of how this works:
1) Import package.json, call it 'pack'. 2) Put pack in the pipeline. 3) map pack to pack.dependencies. 4) flatMap (-m x) to remove nesting. Because pipeline is an array, and it contains pack.dependencies - another array. 5) Exec command with '-e'