Aktuelle npm-Paketversion ermitteln
English
Deutsch
Verwenden
npm_info_cmd.sh
npm info [package name] version | head -n1um nur die aktuelle Paketversion auszugeben, zum Beispiel:
npm_info_example.sh
npm info @angular/cli version | head -n1Der head -n1-Teil ist erforderlich, um unerwünschte npm-Info-Meldungen zu unterdrücken. Wenn der Befehl ohne head -n1 ausgeführt wird:
npm_info_full.sh
npm info @angular/cli versionwird folgende Ausgabe ausgegeben:
npm_info_output.txt
12.2.6
npm notice
npm notice New minor version of npm available! 7.21.1 -> 7.24.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.24.0
npm notice Run npm install -g [email protected] to update!
npm noticeNormalerweise wird der node:latest-Docker-Container anstelle eines lokalen npm verwendet, um die aktuelle Version eines npm-Pakets zu finden:
docker_npm_command.sh
docker run -it --rm node:latest npm info meshcommander version | head -n1Zum Zeitpunkt der Artikelerstellung gibt der Befehl
npm_version_output.txt
0.9.0-dCheck out similar posts by category:
NodeJS
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow