node_modules
以下のパッケージのバージョンとそのリリース時間を表示させる雑シェル
#!/bin/bash
for f in `find ./node_modules -maxdepth 1 -type d | grep react-`; do
v=`cat ${f}/package.json | jq -r .version`
p=`echo ${f} | cut -d '/' -f 3`
echo ${p}
npm info ${p} time | grep "${v}" | tr -ds '}' ','
done
※ 上のは grep react-
でフィルタ。
結果例
babel-preset-react-native
'1.9.1': '2016-12-15T09:32:55.561Z'
eslint-plugin-react-native
'2.1.0': '2016-11-17T18:46:08.523Z'
hoist-non-react-statics
'1.2.0': '2016-06-17T17:52:35.684Z'
react-addons-create-fragment
'15.4.2': '2017-01-06T20:15:37.051Z'
react-addons-perf
'15.4.2': '2017-01-06T20:15:47.700Z'