diff --git a/dependencies.sh b/dependencies.sh index 62463ad41604..f6687b574e00 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -11,8 +11,9 @@ export BYOND_MINOR=1633 export RUST_G_VERSION=3.1.0 #node version -export NODE_VERSION=14 -export NODE_VERSION_PRECISE=14.16.1 +export NODE_VERSION_LTS=20.13.0 +# compatiblility mode MUST work with windows 7 +export NODE_VERSION_COMPAT=20.2.0 # SpacemanDMM git tag export SPACEMAN_DMM_VERSION=suite-1.8 diff --git a/tgui/.prettierignore b/tgui/.prettierignore index 79e703c95440..a91324ebe6e8 100644 --- a/tgui/.prettierignore +++ b/tgui/.prettierignore @@ -6,6 +6,7 @@ /yarn.lock /.pnp.* +.swcrc /docs /public /packages/tgui-polyfill diff --git a/tools/bootstrap/node b/tools/bootstrap/node index 6757035d135c..10701bc39af2 100755 --- a/tools/bootstrap/node +++ b/tools/bootstrap/node @@ -16,9 +16,9 @@ if [ "$TG_BOOTSTRAP_CACHE" ]; then fi OldPWD="$PWD" cd "$Bootstrap/../.." -. ./dependencies.sh # sets NODE_VERSION_PRECISE +. ./dependencies.sh # sets NODE_VERSION_LTS cd "$OldPWD" -NodeVersion="$NODE_VERSION_PRECISE" +NodeVersion="$NODE_VERSION_LTS" NodeFullVersion="node-v$NodeVersion-win-x64" NodeDir="$Cache/$NodeFullVersion" NodeExe="$NodeDir/node.exe" diff --git a/tools/bootstrap/node_.ps1 b/tools/bootstrap/node_.ps1 index 1107d9542c8e..8e3c96517f94 100644 --- a/tools/bootstrap/node_.ps1 +++ b/tools/bootstrap/node_.ps1 @@ -30,7 +30,19 @@ $Cache = "$BaseDir\.cache" if ($Env:TG_BOOTSTRAP_CACHE) { $Cache = $Env:TG_BOOTSTRAP_CACHE } -$NodeVersion = Extract-Variable -Path "$BaseDir\..\..\dependencies.sh" -Key "NODE_VERSION_PRECISE" + +# Get OS version +[int]$OSMajor = (Get-WmiObject -Class Win32_OperatingSystem).Version.Split(".")[0] + +# Set Node version based on OS version +if ($OSMajor -lt 10) { + # Anything under Windows 10 + $NodeVersion = Extract-Variable -Path "$BaseDir\..\..\dependencies.sh" -Key "NODE_VERSION_COMPAT" +} +else { + $NodeVersion = Extract-Variable -Path "$BaseDir\..\..\dependencies.sh" -Key "NODE_VERSION_LTS" +} + $NodeSource = "https://nodejs.org/download/release/v$NodeVersion/win-x64/node.exe" $NodeTargetDir = "$Cache\node-v$NodeVersion-x64" $NodeTarget = "$NodeTargetDir\node.exe" diff --git a/tools/ci/install_node.sh b/tools/ci/install_node.sh index c21b8f0110b0..906984ed3fa1 100644 --- a/tools/ci/install_node.sh +++ b/tools/ci/install_node.sh @@ -5,6 +5,6 @@ source dependencies.sh if [[ -e ~/.nvm/nvm.sh ]]; then source ~/.nvm/nvm.sh - nvm install $NODE_VERSION - nvm use $NODE_VERSION + nvm install $NODE_VERSION_COMPAT + nvm use $NODE_VERSION_COMPAT fi