refactor(tools): centralize Node.js corepack and npm handling in setup_nodejs

Move corepack install/enable into setup_nodejs and update CT scripts to use NODE_MODULE instead of manual corepack calls.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
MickLesk
2026-06-21 21:55:20 +02:00
parent c98d2da1bd
commit 1f01f32853
45 changed files with 103 additions and 82 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ function update_script() {
fi
if check_for_gh_release "Zigbee2MQTT" "Koenkk/zigbee2mqtt"; then
NODE_VERSION="24" NODE_MODULE="pnpm@$(curl -fsSL https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/master/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs
NODE_VERSION="24" NODE_MODULE="corepack,pnpm@$(curl -fsSL https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/master/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs
msg_info "Stopping Service"
systemctl stop zigbee2mqtt
msg_ok "Stopped Service"