From a68729bf410ee9febdec0e5c47f428a7ad9b23d9 Mon Sep 17 00:00:00 2001 From: aryan Date: Thu, 14 Nov 2024 06:19:48 +0700 Subject: [PATCH 1/2] add node version check --- pnpm-lock.yaml | 10 +++++----- scripts/build.sh | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e55a04510a4..d64fef99e65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10461,8 +10461,8 @@ packages: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} - streamx@2.20.1: - resolution: {integrity: sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==} + streamx@2.20.2: + resolution: {integrity: sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA==} string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} @@ -16797,7 +16797,7 @@ snapshots: bare-stream@2.3.2: dependencies: - streamx: 2.20.1 + streamx: 2.20.2 optional: true base-x@3.0.10: @@ -24231,7 +24231,7 @@ snapshots: streamsearch@1.1.0: {} - streamx@2.20.1: + streamx@2.20.2: dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 @@ -24444,7 +24444,7 @@ snapshots: dependencies: b4a: 1.6.7 fast-fifo: 1.3.2 - streamx: 2.20.1 + streamx: 2.20.2 tar@6.2.1: dependencies: diff --git a/scripts/build.sh b/scripts/build.sh index e94f5d1e50c..51292d99c29 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,5 +1,14 @@ #!/bin/bash +# Check Node.js version +REQUIRED_NODE_VERSION=23 +CURRENT_NODE_VERSION=$(node -v | cut -d'.' -f1 | sed 's/v//') + +if (( CURRENT_NODE_VERSION < REQUIRED_NODE_VERSION )); then + echo "Error: Node.js version must be $REQUIRED_NODE_VERSION or higher. Current version is $CURRENT_NODE_VERSION." + exit 1 +fi + # Navigate to the script's directory cd "$(dirname "$0")"/.. From 9a3f0b969fe446c0e62400a14fcfa85538aee1e6 Mon Sep 17 00:00:00 2001 From: aryan Date: Thu, 14 Nov 2024 06:21:57 +0700 Subject: [PATCH 2/2] change node -v in readme --- README.md | 2 +- README_CN.md | 2 +- docs/README.md | 2 +- docs/README_CN.md | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 046ad41a52f..2f61e97b515 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ **Prerequisites (MUST):** - [Python 2.7+](https://www.python.org/downloads/) -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Node.js 23.1+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - [pnpm](https://pnpm.io/installation) ### Edit the .env file diff --git a/README_CN.md b/README_CN.md index 9147f78738f..6bb9de9c510 100644 --- a/README_CN.md +++ b/README_CN.md @@ -23,7 +23,7 @@ **前置要求(必须):** -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - Nodejs安装 - [pnpm](https://pnpm.io/installation) - 使用pnpm diff --git a/docs/README.md b/docs/README.md index 435272f5ebe..ffdf6295fea 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,7 +19,7 @@ _As seen powering [@DegenSpartanAI](https://x.com/degenspartanai) and [@MarcAInd **Prerequisites (MUST):** -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - [pnpm](https://pnpm.io/installation) ### Edit the .env file diff --git a/docs/README_CN.md b/docs/README_CN.md index 5a4bfe5c0d3..c3a7e624cca 100644 --- a/docs/README_CN.md +++ b/docs/README_CN.md @@ -23,7 +23,7 @@ **前置要求(必须):** -- [Node.js 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) - Nodejs安装 - [pnpm](https://pnpm.io/installation) - 使用pnpm diff --git a/package.json b/package.json index 282297c4c2c..808745a33bf 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ } }, "engines": { - "node": ">=22" + "node": ">=23" }, "dependencies": { "ollama-ai-provider": "^0.16.1",