Live video on the AT Protocol

build: require node >=22 (#174)

* build: require node >=22

* ci: node 22

* ci: install node@22 on gitlab

authored by

Eli Mallon and committed by
GitHub
2fbd102a 610de832

+32 -1
+4
.github/workflows/build.yaml
··· 63 63 fetch-depth: 0 64 64 ref: ${{ github.event.pull_request.head.sha }} 65 65 66 + - uses: actions/setup-node@v4 67 + with: 68 + node-version: 22 69 + 66 70 - uses: maxim-lobanov/setup-xcode@v1 67 71 with: 68 72 xcode-version: ${{ matrix.xcode-version }}
+4 -1
.gitlab-ci.yml
··· 211 211 - cd /Users/admin/streamplace 212 212 - git fetch --unshallow || echo 'already unshallow' 213 213 - brew install ninja go openssl@3 && go version 214 + - export PATH="/opt/homebrew/opt/node@22/bin:$PATH" 215 + - brew install node@22 216 + - node --version 214 217 - sudo gem uninstall xcodeproj -x --ignore-dependencies 215 218 - sudo gem install xcodeproj -v 1.25.1 216 219 - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && bash rustup.sh -y && rm rustup.sh ··· 229 232 230 233 windows-selftest: 231 234 interruptible: true 235 + allow_failure: true 232 236 stage: build 233 237 # for the moment... 234 238 tags: ··· 254 258 - build-docker-arm64 255 259 - build-docker-manifest 256 260 - build 257 - - windows-selftest 258 261 - test 259 262 rules: 260 263 - if: '$CI_COMMIT_TAG =~ /^v?\d+\.\d+\.\d+$/'
+20
hack/node-version.js
··· 1 + const pkg = require("../package.json"); 2 + const engines = pkg.engines; 3 + 4 + let version = engines.node; 5 + if (!version.startsWith(">=")) { 6 + console.log( 7 + `fix package.json! idk what engines.node=${version} means, i'm just a little script :(`, 8 + ); 9 + process.exit(1); 10 + } 11 + version = version.slice(2); 12 + const neededMajor = parseInt(version.split(".")[0]); 13 + const runningMajor = parseInt(process.version.slice(1).split(".")[0]); 14 + 15 + if (runningMajor < neededMajor) { 16 + console.log( 17 + `Required node version ${version} not satisfied with current version ${process.version}.`, 18 + ); 19 + process.exit(1); 20 + }
+4
package.json
··· 4 4 "version": "0.0.0-monorepo", 5 5 "description": "The video layer for everything.", 6 6 "main": "index.js", 7 + "engines": { 8 + "node": ">=22.0.0" 9 + }, 7 10 "scripts": { 11 + "preinstall": "node hack/node-version.js", 8 12 "check": "yarn run check:workspaces && git ls-files | xargs prettier --check --ignore-unknown", 9 13 "check:workspaces": "cd js/app && yarn run check", 10 14 "fix": "git ls-files | xargs prettier --write --ignore-unknown",