diff --git a/.github/workflows/agent-server-sdk-main-audit.yml b/.github/workflows/agent-server-sdk-main-audit.yml index e61c452..02888f6 100644 --- a/.github/workflows/agent-server-sdk-main-audit.yml +++ b/.github/workflows/agent-server-sdk-main-audit.yml @@ -64,10 +64,10 @@ jobs: --output "$RUNNER_TEMP/sdk-main-openapi.json" ) - - name: Use Node.js 22.12 + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 22.12 + node-version-file: .nvmrc cache: 'npm' - name: Install client dependencies diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d4645c..19a6d1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 22.12 + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 22.12 + node-version-file: .nvmrc cache: 'npm' - name: Install dependencies @@ -36,10 +36,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 22.12 + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 22.12 + node-version-file: .nvmrc cache: 'npm' - name: Install dependencies @@ -54,18 +54,14 @@ jobs: test: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [22.12, 24.x] - steps: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: ${{ matrix.node-version }} + node-version-file: .nvmrc cache: 'npm' - name: Install dependencies @@ -91,10 +87,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 22.x + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 22.x + node-version-file: .nvmrc cache: 'npm' - name: Install dependencies @@ -117,10 +113,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 22.x + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 22.x + node-version-file: .nvmrc cache: 'npm' - name: Install dependencies diff --git a/.github/workflows/endpoint-audit.yml b/.github/workflows/endpoint-audit.yml index 19ad66d..6d0fc6d 100644 --- a/.github/workflows/endpoint-audit.yml +++ b/.github/workflows/endpoint-audit.yml @@ -23,10 +23,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 22.x + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 22.x + node-version-file: .nvmrc cache: 'npm' - name: Install dependencies diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 5abcb8b..44abf71 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -26,10 +26,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 22.x + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 22.x + node-version-file: .nvmrc cache: 'npm' - name: Install dependencies @@ -156,10 +156,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 22.x + - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 22.x + node-version-file: .nvmrc cache: 'npm' - name: Install dependencies diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3deda7e..41892fc 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -38,18 +38,20 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - # Trusted publishing requires Node 22.14.0+ and npm 11.5.1+ + # Trusted publishing requires npm 11.5.1+ # See: https://docs.npmjs.com/trusted-publishers/ - name: Set up Node.js for npm trusted publishing uses: actions/setup-node@v6 with: - node-version: '22' + node-version-file: .nvmrc cache: npm registry-url: https://registry.npmjs.org - # Node 22 bundles npm 10.x, but trusted publishing (OIDC) needs npm - # 11.5.1+. setup-node does not upgrade the bundled npm, so do it - # explicitly — without this the version guard below always fails. + # The bundled npm is not reliably new enough: Node 24.0.0 shipped npm + # 11.3.0, below the 11.5.1 that trusted publishing (OIDC) needs, and + # .nvmrc floats across the 24.x line. setup-node does not upgrade the + # bundled npm, so do it explicitly. Without this the version guard + # below fails on any runner that resolves to an early enough 24.x. - name: Upgrade npm for trusted publishing run: npm install -g npm@latest diff --git a/.github/workflows/publish-github-packages.yml b/.github/workflows/publish-github-packages.yml index 3697291..2b61de8 100644 --- a/.github/workflows/publish-github-packages.yml +++ b/.github/workflows/publish-github-packages.yml @@ -33,7 +33,7 @@ jobs: - name: Setup Node.js for GitHub Packages uses: actions/setup-node@v6 with: - node-version: 22.x + node-version-file: .nvmrc cache: 'npm' registry-url: 'https://npm.pkg.github.com' scope: '@openhands' diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e5571c1..030385c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ OpenHands Agent Server. ### Prerequisites -- Node.js 22.12+ +- Node.js 24+ - npm 10+ ### Install dependencies