core - setup_nodejs: bypass npm allowScripts policy globally on npm >=11 (#16280)

* setup_nodejs: bypass npm allowScripts policy globally on npm >=11

* Update misc/tools.func

Co-authored-by: Sam Heinz <sam@samheinz.com>

---------

Co-authored-by: Sam Heinz <sam@samheinz.com>
This commit is contained in:
CanbiZ (MickLesk)
2026-08-08 04:35:03 +02:00
committed by GitHub
parent 5d14989682
commit d87fef0892
+4
View File
@@ -7706,6 +7706,10 @@ setup_nodejs() {
fi
fi
if [[ "$(npm -v 2>/dev/null | cut -d. -f1)" -ge 11 ]]; then
$STD npm config set dangerously-allow-all-scripts true --location=global 2>/dev/null || true
fi
# Set a safe default heap limit for Node.js builds if not explicitly provided.
# Priority:
# 1) NODE_OPTIONS (caller/user override)