# Update-n8n-Safely.ps1
# Comprehensive Windows automation for safely upgrading n8n and its Node.js runtime.
# This script performs environment validation, PATH repair, Node.js requirement checks,
# automated Node.js selection and installation, n8n installation, memory/heap diagnostics,
# detection of conflicting tooling (such as nvm4w), and backup of existing n8n data.