0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 01:50:44 -05:00

Updates to Node v22.12.0 LTS (#1005)

- Updates version numbers in `.nvmrc`, `package.json`, and
`Server.code-workspace`
- Updates `@yao-pkg/pkg`, `@yao-pkg/pkg-fetch`, and `@types/node` to
latest
- Updates JSON import to FS read operation in `gulpfile.mjs`
- Updates node build target in `gulpfile.mjs`

Tested with local runs, Windows builds, and Linux builds. Have not
tested a Windows build on Linux, but see no reason it wouldn't work.
*[knocks on wood]*

I feel this is safe to merge.
This commit is contained in:
Refringe 2024-12-30 04:01:11 -05:00 committed by GitHub
parent 9aadae00e9
commit 995a3d0c5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 16 additions and 13 deletions

View File

@ -42,7 +42,7 @@ To prepare the project for development you will need to:
1. Run `git clone https://github.com/sp-tarkov/server.git server` to clone the repository.
2. Run `git lfs pull` to download LFS files locally.
3. Open the `project/mod.code-workspace` file in Visual Studio Code (VSC).
4. Run `nvm use 20.11.1` in the VSC terminal.
4. Run `nvm use 22.12.0` in the VSC terminal.
5. Run `npm install` in the VSC terminal.
## Development
@ -91,7 +91,7 @@ We're really excited that you're interested in contributing! Before submitting y
The default branch used for the latest stable release. This branch is protected and typically is only merged with release branches.
- **3.10.X-DEV**
Development for the next hotfix release. Hotfix releases include bug fixes and minor features that do not affect the coding structure of the project. Special care is taken to not break server mod stability. These always target the same version of EFT as the last minor release.
- **3.11.0-DEV**
- **4.0.0-DEV**
Development for the next minor release of SPT. Minor releases target the latest version of EFT. Late in the minor release cycle the EFT version is frozen for stability to prepare for release. Larger changes to the project structure may be included in minor releases.
### Pull Request Guidelines

View File

@ -1 +1 @@
v20.11.1
v22.12.0

View File

@ -28,7 +28,7 @@
"name": "Debug",
"type": "node",
"program": "${workspaceFolder}/src/ide/TestEntry.ts",
"runtimeVersion": "20.11.1",
"runtimeVersion": "22.12.0",
"runtimeExecutable": "tsx",
"request": "launch",
"runtimeArgs": [
@ -45,7 +45,7 @@
{
"name": "Run Vitest Tests",
"type": "node",
"runtimeVersion": "20.11.1",
"runtimeVersion": "22.12.0",
"runtimeExecutable": "npm",
"request": "launch",
"runtimeArgs": [

View File

@ -10,7 +10,9 @@ import { exec } from "gulp-execa";
import rename from "gulp-rename";
import minimist from "minimist";
import * as ResEdit from "resedit";
import manifest from "./package.json" assert { type: "json" };
// Load the package.json file
const manifest = JSON.parse(fs.readFileSync("./package.json", "utf8"));
// Accept command line arguments for arch and platform
const knownOptions = { string: ["arch", "platform"], default: { arch: process.arch, platform: process.platform } };
@ -19,7 +21,7 @@ const targetArch = options.arch;
const targetPlatform = options.platform;
console.log(`target arch: ${targetArch}, target platform: ${targetPlatform}`);
const nodeVersion = "node20"; // As of @yao-pkg/pkg-fetch v3.5.9, it's v20.11.1
const nodeVersion = "node22"; // As of @yao-pkg/pkg-fetch@3.5.18, it's Node 22.12.0
const stdio = "inherit";
const buildDir = "build/";
const dataDir = path.join(buildDir, "SPT_Data", "Server");
@ -62,7 +64,7 @@ const compile = async () => {
// Packaging
const fetchPackageImage = async () => {
try {
const output = "./.pkg-cache/v3.5";
const output = "./.pkg-cache/v6.2";
const fetchedPkg = await pkgfetch.need({
arch: targetArch,
nodeRange: nodeVersion,

View File

@ -1,6 +1,6 @@
{
"name": "spt-server",
"version": "3.10.4",
"version": "4.0.0",
"author": "SPT Server",
"license": "NCSA",
"main": "obj/bundle.js",
@ -8,7 +8,7 @@
"description": "The single-player modding framework for Escape From Tarkov.",
"icon": "assets/images/icon.ico",
"engines": {
"node": "20.11.1"
"node": "22.12.0"
},
"scripts": {
"check:circular": "madge --circular --ts-config tsconfig.json --extensions ts ./src/",
@ -61,14 +61,14 @@
"@swc/cli": "~0.4",
"@swc/core": "~1.7",
"@types/i18n": "~0.13",
"@types/node": "~22.0",
"@types/node": "22.10.2",
"@types/proper-lockfile": "~4.1",
"@types/semver": "~7.5",
"@types/ws": "~8.5",
"@vitest/coverage-istanbul": "^2.1.8",
"@vitest/ui": "^2.1.8",
"@yao-pkg/pkg": "5.12",
"@yao-pkg/pkg-fetch": "3.5.9",
"@yao-pkg/pkg": "6.2.0",
"@yao-pkg/pkg-fetch": "3.5.18",
"cross-env": "~7.0",
"gulp": "~5.0",
"gulp-decompress": "~3.0",

View File

@ -1,6 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"emitDeclarationOnly": true,
"declaration": true,
"declarationDir": "./types"