Skip to content

Commit

Permalink
Merge pull request #132 from woocommerce/update/108-nodejs-v20
Browse files Browse the repository at this point in the history
Upgrade all packages to use Node.js v20
  • Loading branch information
eason9487 authored May 16, 2024
2 parents eec0ff5 + f2d5c09 commit d69c3e7
Show file tree
Hide file tree
Showing 65 changed files with 24,493 additions and 13,096 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/github-actions-create-release.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import fs from 'fs';
import fs from 'node:fs';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-action-publish-compat-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Publish Compat Checker package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Deploy
uses: s0/git-publish-subdir-action@develop
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/github-actions-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
if: ${{ github.event.pull_request.head.ref == 'release/actions' && github.event.review.state == 'approved' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create release
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const workspace = '${{ github.workspace }}';
Expand All @@ -27,7 +27,7 @@ jobs:
} );
- name: Upload release artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release
path: /tmp/release.json
4 changes: 2 additions & 2 deletions .github/workflows/github-actions-create-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare node
uses: ./packages/github-actions/actions/prepare-node
with:
node-version: 14
node-version: 20
cache-dependency-path: ./packages/github-actions/package-lock.json
install-deps: "no"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-delete-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.event.ref_type == 'branch'
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: trunk

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/github-actions-prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check created release branch
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
if ( ! context.payload.created ) {
Expand All @@ -27,12 +27,12 @@ jobs:
needs: CheckCreatedBranch
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare node
uses: ./packages/github-actions/actions/prepare-node
with:
node-version: 14
node-version: 20
cache-dependency-path: ./packages/github-actions/package-lock.json
install-deps: "no"

Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
jq ".version=\"${NEXT_VER}\"" package.json > package.json.tmp
mv package.json.tmp package.json
jq ".version=\"${NEXT_VER}\"" package-lock.json > package-lock.json.tmp
jq ".version=\"${NEXT_VER}\" | .packages.\"\".version=\"${NEXT_VER}\"" package-lock.json > package-lock.json.tmp
mv package-lock.json.tmp package-lock.json
git config user.name github-actions[bot]
Expand All @@ -85,7 +85,7 @@ jobs:
git push
- name: Create a pull request for release
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const workspace = '${{ github.workspace }}';
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/github-actions-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
release: ${{ steps.set-result.outputs.release }}
steps:
- name: Check tag name or workflow_run conclusion
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { payload, eventName } = context;
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Get release artifact
id: set-result
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const fs = require( 'fs' );
Expand Down Expand Up @@ -77,14 +77,14 @@ jobs:
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ steps.resolve-tag.outputs.tag_name }}

- name: Prepare node
uses: ./packages/github-actions/actions/prepare-node
with:
node-version: 14
node-version: 20
cache-dependency-path: ./packages/github-actions/package-lock.json
install-deps: "no"

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/fermium
v20
Loading

0 comments on commit d69c3e7

Please sign in to comment.