diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4ac09a14..5cab94b7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [18.x, 20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -29,13 +29,13 @@ jobs: - run: node packages/lib/build_mod --source-dir packages/host/lua/clusterio_lib --output-dir temp/test/mods - run: wget -q -O temp/test/mods/subspace_storage_1.99.8.zip -L https://github.com/clusterio/subspace_storage/releases/download/1.99.6/subspace_storage_1.99.8.zip - name: Run tests - if: ${{ matrix.node-version != '12.x' }} + if: ${{ matrix.node-version != '18.x' }} run: pnpm test - name: Run coverage - if: ${{ matrix.node-version == '12.x' }} + if: ${{ matrix.node-version == '18.x' }} run: pnpm run ci-cover - name : Upload coverage to Codecov - if: ${{ matrix.node-version == '12.x' }} + if: ${{ matrix.node-version == '18.x' }} uses: codecov/codecov-action@v2 with: files: ./coverage/lcov.info diff --git a/Dockerfile b/Dockerfile index babd6bfa..4f4832f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:12 as subspace_storage_builder +FROM node:20 as subspace_storage_builder RUN apt update && apt install -y git WORKDIR / RUN git clone https://github.com/clusterio/subspace_storage.git @@ -6,7 +6,7 @@ WORKDIR /subspace_storage RUN npm install \ && node build -FROM node:12 as clusterio_builder +FROM node:20 as clusterio_builder RUN apt update \ && apt install -y wget \ && mkdir /clusterio diff --git a/README.md b/README.md index 7de44352..ee76ddfa 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Check out the documentation on [Writing Plugins](/docs/writing-plugins.md) for w ## Installation -Clusterio runs on Node.js v12 and up, it's distributed via npm and comes with a guided install script. +Clusterio runs on Node.js v18 and up, it's distributed via npm and comes with a guided install script. If you already have a recent Node.js installed, you can set it up in a new directory with: npm init "@clusterio" @@ -99,11 +99,11 @@ Otherwise see below for OS specific instructions. ### Ubuntu setup -1. Install Node.js v12 or higher. - For 20.04 LTS or below the version of Node.js provided by the Ubuntu repos are too old and you will have to use the nodesource PPA, otherwise you may skip the first line. +1. Install Node.js v18 or higher. + Note the version of Node.js provided by the Ubuntu/debian repos are too old and you will have to use the nodesource PPA - wget -qO - https://deb.nodesource.com/setup_14.x | sudo -E bash - - sudo apt install nodejs + curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&\ + sudo apt-get install -y nodejs 2. Log in as the user you wish to install Clusterio as (do not use root), and then create a new directory and run the Clusterio installer: diff --git a/docs/contributing.md b/docs/contributing.md index 0d767e02..22c92a2b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -181,8 +181,8 @@ The format of this log should be self explanatory, please follow it carefully. ## Supported Node.js and Factorio Versions -Clusterio run on Node.js v12 and up, make sure to check that the Node builtin API's and npm packages you use are supported on these versions. -The GitHub Actions tests are run on whatever version of Node.js v12, v14, and v16 is the default. +Clusterio run on Node.js v16 and up, make sure to check that the Node builtin API's and npm packages you use are supported on these versions. +The GitHub Actions tests are run on whatever version of Node.js v16 and v18 is the default. For Factorio Clusterio 2.0 aims to support version 0.17.69 and up, including the latest experimental release. It's recommended that you use the lua API reference for 0.17.69, as there's no information on what version Factorio API's were introduced in. diff --git a/package.json b/package.json index e5f81591..2fb56dfa 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ ] }, "engines": { - "node": ">=12" + "node": ">=18" }, "devDependencies": { "@clusterio/controller": "workspace:*", diff --git a/packages/controller/package.json b/packages/controller/package.json index c5a94a4d..0d2973d7 100644 --- a/packages/controller/package.json +++ b/packages/controller/package.json @@ -16,7 +16,7 @@ "factorio" ], "engines": { - "node": ">=12" + "node": ">=18" }, "dependencies": { "@clusterio/lib": "^2.0.0-alpha.13", diff --git a/packages/create/package.json b/packages/create/package.json index 2a953042..6a828ccf 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -13,7 +13,7 @@ "clusterio" ], "engines": { - "node": ">=12" + "node": ">=18" }, "dependencies": { "chalk": "^4.1.0", diff --git a/packages/ctl/package.json b/packages/ctl/package.json index b7870b6e..880aae1e 100644 --- a/packages/ctl/package.json +++ b/packages/ctl/package.json @@ -15,7 +15,7 @@ "factorio" ], "engines": { - "node": ">=12" + "node": ">=18" }, "dependencies": { "@clusterio/lib": "^2.0.0-alpha.13", diff --git a/packages/host/package.json b/packages/host/package.json index dbc0a401..0f47fa28 100644 --- a/packages/host/package.json +++ b/packages/host/package.json @@ -15,7 +15,7 @@ "factorio" ], "engines": { - "node": ">=12" + "node": ">=18" }, "dependencies": { "@clusterio/lib": "^2.0.0-alpha.13", diff --git a/plugins/global_chat/package.json b/plugins/global_chat/package.json index 9f571c07..5f558666 100644 --- a/plugins/global_chat/package.json +++ b/plugins/global_chat/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/clusterio/clusterio/issues" }, "engines": { - "node": ">=12" + "node": ">=18" }, "peerDependencies": { "@clusterio/lib": "^2.0.0-alpha.0" diff --git a/plugins/inventory_sync/package.json b/plugins/inventory_sync/package.json index ffd6117a..9247f1e4 100644 --- a/plugins/inventory_sync/package.json +++ b/plugins/inventory_sync/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/clusterio/factorioClusterio/issues" }, "engines": { - "node": ">=12" + "node": ">=18" }, "peerDependencies": { "@clusterio/lib": "^2.0.0-alpha.0" diff --git a/plugins/player_auth/package.json b/plugins/player_auth/package.json index cc7bf708..1973728d 100644 --- a/plugins/player_auth/package.json +++ b/plugins/player_auth/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/clusterio/clusterio/issues" }, "engines": { - "node": ">=12" + "node": ">=18" }, "peerDependencies": { "@clusterio/lib": "^2.0.0-alpha.0" diff --git a/plugins/research_sync/package.json b/plugins/research_sync/package.json index 0200ed37..ff84249d 100644 --- a/plugins/research_sync/package.json +++ b/plugins/research_sync/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/clusterio/clusterio/issues" }, "engines": { - "node": ">=12" + "node": ">=18" }, "peerDependencies": { "@clusterio/lib": "^2.0.0-alpha.0" diff --git a/plugins/statistics_exporter/package.json b/plugins/statistics_exporter/package.json index 58d5b51e..d945a612 100644 --- a/plugins/statistics_exporter/package.json +++ b/plugins/statistics_exporter/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/clusterio/clusterio/issues" }, "engines": { - "node": ">=12" + "node": ">=18" }, "peerDependencies": { "@clusterio/lib": "^2.0.0-alpha.0" diff --git a/plugins/subspace_storage/package.json b/plugins/subspace_storage/package.json index c523de98..079deb52 100644 --- a/plugins/subspace_storage/package.json +++ b/plugins/subspace_storage/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/clusterio/clusterio/issues" }, "engines": { - "node": ">=12" + "node": ">=18" }, "peerDependencies": { "@clusterio/lib": "^2.0.0-alpha.0"