Node.js/npm/版本号码:修订间差异
来自康健生活
| 第46行: | 第46行: | ||
npm v <pkg> version --no-workspaces | npm v <pkg> version --no-workspaces | ||
npm view <pkg> dist-tags.latest</syntaxhighlight>|$|/home/kwy}} | npm view <pkg> dist-tags.latest</syntaxhighlight>|$|/home/kwy}} | ||
{{shc|<syntaxhighlight lang="bash"> | |||
npm view <pkg> --no-workspaces versions --json | grep -E '^ *"' | sort -rV | head -n 1 | sed -E 's/^ *"(.+)",*$/\1/'</syntaxhighlight>|$|/home/kwy}} | |||
测试 | |||
{{Shc_out|<syntaxhighlight lang="bash"> | |||
npm view @postlab/component-rest --no-workspaces versions --json | grep -E '^ *"' | sort -rV | head -n 1 | sed -E 's/^ *"(.+)",*$/\1/'</syntaxhighlight>|<syntaxhighlight lang="bash">0.0.9 | |||
</syntaxhighlight>|$|/home/kwy}} | |||
== 本地版本号码 == | == 本地版本号码 == | ||