fix: release 2.4.1 with consistent npm locks and Node version checks
This commit is contained in:
1 parent
e90da727d4
commit
ac3d8cf54a
9 files changed
+74
-22
No files matched your search
+6
-10
@@ -218,14 +218,10 @@ function Test-NodeCompatible {
|
||||
$verRaw = (& node -v 2>$null)
|
||||
if (-not $verRaw) { return $false }
|
||||
$verStr = $verRaw.ToString().Trim().TrimStart('v')
|
||||
$parts = $verStr.Split('.')
|
||||
if ($parts.Count -ge 2) {
|
||||
$major = [int]$parts[0]
|
||||
$minor = [int]$parts[1]
|
||||
if ($major -ge 26) { return $true }
|
||||
if ($major -eq 24 -and $minor -ge 15) { return $true }
|
||||
if ($major -eq 22 -and $minor -ge 22) { return $true }
|
||||
}
|
||||
$version = [version]$verStr
|
||||
if ($version.Major -ge 26) { return $true }
|
||||
if ($version.Major -eq 24 -and $version -ge [version]'24.15.0') { return $true }
|
||||
if ($version.Major -eq 22 -and $version -ge [version]'22.22.3') { return $true }
|
||||
} catch {
|
||||
return $false
|
||||
}
|
||||
@@ -383,7 +379,7 @@ if ($frontendChanged -or ((-not (Test-Path $ShowcaseIndex)) -and (-not (Test-Pat
|
||||
if (-not (Test-NodeCompatible)) {
|
||||
if (Test-CommandExists "node") {
|
||||
$curVer = (& node -v 2>$null)
|
||||
Write-Host (Get-LaunchText " [INFO] Detected Node.js $curVer, but Angular CLI requires Node.js >= v22.22.0." " [检查] 检测到 Node.js $curVer;前端需要 v22.22.0 或更新版本。") -ForegroundColor Yellow
|
||||
Write-Host (Get-LaunchText " [INFO] Detected Node.js $curVer; Angular CLI requires 22.x >= 22.22.3, 24.x >= 24.15.0, or >= 26.0.0." " [检查] 检测到 Node.js $curVer;前端需要 22.x >= 22.22.3、24.x >= 24.15.0 或 >= 26.0.0。") -ForegroundColor Yellow
|
||||
} else {
|
||||
Write-Host (Get-LaunchText " [INFO] Node.js/npm not found (required for Showcase UI)." " [检查] 未找到 Node.js/npm,网页构建需要安装。") -ForegroundColor Cyan
|
||||
}
|
||||
@@ -401,7 +397,7 @@ if ($frontendChanged -or ((-not (Test-Path $ShowcaseIndex)) -and (-not (Test-Pat
|
||||
$useWinGetNode = $false
|
||||
if ($ArtemisDownloads.mode -ne 'China' -and (Test-CommandExists "winget")) {
|
||||
if ([Console]::IsInputRedirected -eq $false) {
|
||||
Write-Host (Get-LaunchText " [INFO] Node.js >= v22.22.0 required for Showcase UI." " [检查] 网页需要 Node.js v22.22.0 或更新版本。") -ForegroundColor Cyan
|
||||
Write-Host (Get-LaunchText " [INFO] Showcase UI requires Node.js 22.x >= 22.22.3, 24.x >= 24.15.0, or >= 26.0.0." " [检查] 网页需要 Node.js 22.x >= 22.22.3、24.x >= 24.15.0 或 >= 26.0.0。") -ForegroundColor Cyan
|
||||
$ans = Read-Host (Get-LaunchText " Install/Upgrade Node.js via WinGet (may require Administrator)? [Y/n]" " 通过 WinGet 安装/升级 Node.js(可能需要管理员权限)?[Y/n]")
|
||||
if ($ans -eq "" -or $ans -match "^[Yy]") {
|
||||
$useWinGetNode = $true
|
||||
|
||||
Reference in new issue
Block a user