diff --git a/.changeset/patch-configure-jsweep-node20-commonjs.md b/.changeset/patch-configure-jsweep-node20-commonjs.md new file mode 100644 index 0000000000..2b4760bfd1 --- /dev/null +++ b/.changeset/patch-configure-jsweep-node20-commonjs.md @@ -0,0 +1,10 @@ +--- +"gh-aw": patch +--- + +Configure jsweep workflow to use Node.js v20 and compile JavaScript to CommonJS. + +This change documents that `jsweep.md` pins `runtimes.node.version: "20"` and +updates `actions/setup/js/tsconfig.json` to emit CommonJS (`module: commonjs`) and +target ES2020 (`target: es2020`) for the JavaScript files in `actions/setup/js/`. + diff --git a/.github/workflows/jsweep.lock.yml b/.github/workflows/jsweep.lock.yml index 87fb345b0f..a9b1a05011 100644 --- a/.github/workflows/jsweep.lock.yml +++ b/.github/workflows/jsweep.lock.yml @@ -103,7 +103,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: - node-version: '24' + node-version: '20' package-manager-cache: false - name: Setup Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 diff --git a/.github/workflows/jsweep.md b/.github/workflows/jsweep.md index b76644646e..665bf4eecf 100644 --- a/.github/workflows/jsweep.md +++ b/.github/workflows/jsweep.md @@ -10,6 +10,9 @@ permissions: pull-requests: read tracker-id: jsweep-daily engine: copilot +runtimes: + node: + version: "20" tools: serena: ["typescript"] github: diff --git a/actions/setup/js/tsconfig.json b/actions/setup/js/tsconfig.json index a14bda0052..5af1581e5e 100644 --- a/actions/setup/js/tsconfig.json +++ b/actions/setup/js/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "target": "es2022", - "module": "es2022", - "lib": ["es2022"], + "target": "es2020", + "module": "commonjs", + "lib": ["es2020"], "types": ["node"], "allowJs": true, "checkJs": true, @@ -16,7 +16,7 @@ "noImplicitThis": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - "moduleResolution": "bundler", + "moduleResolution": "node", "allowSyntheticDefaultImports": true, "esModuleInterop": true, "skipLibCheck": true,