Przeglądaj źródła

Require node v20 everywhere (#922)

Chris Estreich 9 miesięcy temu
rodzic
commit
70a5d2b48c

+ 2 - 1
.github/workflows/changeset-release.yml

@@ -9,6 +9,7 @@ on:
 env:
   REPO_PATH: ${{ github.repository }}
   GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }}
+  NODE_VERSION: 20.18.1
 
 jobs:
   # Job 1: Create version bump PR when changesets are merged to main
@@ -33,7 +34,7 @@ jobs:
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
-          node-version: 20
+          node-version: ${{ env.NODE_VERSION }}
           cache: 'npm'
             
       - name: Install Dependencies

+ 6 - 3
.github/workflows/code-qa.yml

@@ -8,6 +8,9 @@ on:
     types: [opened, reopened, ready_for_review, synchronize]
     branches: [main]
 
+env:
+  NODE_VERSION: 20.18.1
+
 jobs:
   compile:
     runs-on: ubuntu-latest
@@ -17,7 +20,7 @@ jobs:
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
-          node-version: '18'
+          node-version: ${{ env.NODE_VERSION }}
           cache: 'npm'
       - name: Install dependencies
         run: npm run install:all
@@ -66,7 +69,7 @@ jobs:
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
-          node-version: '18'
+          node-version: ${{ env.NODE_VERSION }}
           cache: 'npm'
       - name: Install dependencies
         run: npm run install:all
@@ -121,7 +124,7 @@ jobs:
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
-          node-version: '18'
+          node-version: ${{ env.NODE_VERSION }}
           cache: 'npm'
       - name: Install dependencies
         run: npm run install:all

+ 2 - 7
.github/workflows/marketplace-publish.yml

@@ -6,6 +6,7 @@ on:
 
 env:
   GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }}
+  NODE_VERSION: 20.18.1
 
 jobs:
   publish-extension:
@@ -21,15 +22,12 @@ jobs:
       - uses: actions/checkout@v4
         with:
           ref: ${{ env.GIT_REF }}
-
       - uses: actions/setup-node@v4
         with:
-          node-version: 18
-
+          node-version: ${{ env.NODE_VERSION }}
       - run: |
           git config user.name "github-actions[bot]"
           git config user.email "github-actions[bot]@users.noreply.github.com"
-
       - name: Install Dependencies
         run: |
           npm install -g vsce ovsx
@@ -46,14 +44,12 @@ jobs:
           echo "$package" | grep -q "extension/webview-ui/build/assets/index.js" || exit 1
           echo "$package" | grep -q "extension/node_modules/@vscode/codicons/dist/codicon.ttf" || exit 1
           echo "$package" | grep -q ".env" || exit 1
-
       - name: Create and Push Git Tag
         run: |
           current_package_version=$(node -p "require('./package.json').version")
           git tag -a "v${current_package_version}" -m "Release v${current_package_version}"
           git push origin "v${current_package_version}"
           echo "Successfully created and pushed git tag v${current_package_version}"
-
       - name: Publish Extension
         env:
           VSCE_PAT: ${{ secrets.VSCE_PAT }}
@@ -62,7 +58,6 @@ jobs:
           current_package_version=$(node -p "require('./package.json').version")
           npm run publish:marketplace
           echo "Successfully published version $current_package_version to VS Code Marketplace"
-
       - name: Create GitHub Release
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

+ 1 - 1
.nvmrc

@@ -1 +1 @@
-lts/*
+v20.18.1

+ 2 - 2
flake.nix

@@ -16,8 +16,8 @@
       name = "roo-code";
       
       packages = with pkgs; [
-        nodejs_18
-        corepack_18
+        nodejs_20
+        corepack_20
       ];
     };
   in {

+ 1 - 0
package-lock.json

@@ -91,6 +91,7 @@
 				"typescript": "^5.4.5"
 			},
 			"engines": {
+				"node": ">=20.18.1",
 				"vscode": "^1.84.0"
 			}
 		},

+ 2 - 1
package.json

@@ -10,7 +10,8 @@
 		"theme": "dark"
 	},
 	"engines": {
-		"vscode": "^1.84.0"
+		"vscode": "^1.84.0",
+		"node": ">=20.18.1"
 	},
 	"author": {
 		"name": "Roo Vet"