feat: bump to use node20 runtime (#641)

This commit is contained in:
Rui Chen 2024-02-06 15:47:20 +01:00 committed by GitHub
parent aadc3a98df
commit c57490a8b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 51 additions and 38 deletions

View file

@ -11,7 +11,6 @@ jobs:
strategy:
matrix:
os:
- 'ubuntu-22.04'
- 'ubuntu-20.04'
- 'ubuntu-latest'
- 'macos-latest'

View file

@ -14,6 +14,7 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-22.04'
@ -24,14 +25,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Read .nvmrc
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm
- name: Setup Node
uses: actions/setup-node@v3.6.0
- uses: actions/setup-node@v4
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci

2
.nvmrc
View file

@ -1 +1 @@
12.22.4
20.10.0

View file

@ -261,10 +261,9 @@ jobs:
hugo-version: '0.119.0'
extended: true
- name: Setup Node
uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
# The action defaults to search for the dependency file (package-lock.json,
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its

View file

@ -11,7 +11,7 @@ inputs:
required: false
default: 'false'
runs:
using: 'node16'
using: 'node20'
main: 'lib/index.js'
branding:
icon: 'package'

58
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "actions-hugo",
"version": "2.6.0",
"version": "3.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "actions-hugo",
"version": "2.5.0",
"version": "3.0.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@ -18,11 +18,11 @@
},
"devDependencies": {
"@types/jest": "^26.0.20",
"@types/node": "~12",
"@types/node": "~20",
"@types/node-fetch": "^2.5.8",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"@vercel/ncc": "^0.27.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^7.21.0",
"eslint-plugin-jest": "^24.1.5",
"husky": "^5.1.3",
@ -36,8 +36,8 @@
"typescript": "^4.2.3"
},
"engines": {
"node": ">=16.18.0",
"npm": ">=8.19.0"
"node": ">=20.10.0",
"npm": ">=10.2.3"
}
},
"node_modules/@actions/core": {
@ -1620,10 +1620,13 @@
"dev": true
},
"node_modules/@types/node": {
"version": "12.12.67",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.67.tgz",
"integrity": "sha512-R48tgL2izApf+9rYNH+3RBMbRpPeW3N8f0I9HMhggeq4UXwBDqumJ14SDs4ctTMhG11pIOduZ4z3QWGOiMc9Vg==",
"dev": true
"version": "20.10.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz",
"integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@types/node-fetch": {
"version": "2.5.8",
@ -1873,9 +1876,9 @@
}
},
"node_modules/@vercel/ncc": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.27.0.tgz",
"integrity": "sha512-DllIJQapnU2YwewIhh/4dYesmMQw3h2cFtabECc/zSJHqUbNa0eJuEkRa6DXbZvh1YPWBtYQoPV17NlDpBw1Vw==",
"version": "0.38.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz",
"integrity": "sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==",
"dev": true,
"bin": {
"ncc": "dist/ncc/cli.js"
@ -12067,6 +12070,12 @@
"node": ">=0.8.0"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
},
"node_modules/union-value": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
@ -13943,10 +13952,13 @@
"dev": true
},
"@types/node": {
"version": "12.12.67",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.67.tgz",
"integrity": "sha512-R48tgL2izApf+9rYNH+3RBMbRpPeW3N8f0I9HMhggeq4UXwBDqumJ14SDs4ctTMhG11pIOduZ4z3QWGOiMc9Vg==",
"dev": true
"version": "20.10.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz",
"integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==",
"dev": true,
"requires": {
"undici-types": "~5.26.4"
}
},
"@types/node-fetch": {
"version": "2.5.8",
@ -14113,9 +14125,9 @@
}
},
"@vercel/ncc": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.27.0.tgz",
"integrity": "sha512-DllIJQapnU2YwewIhh/4dYesmMQw3h2cFtabECc/zSJHqUbNa0eJuEkRa6DXbZvh1YPWBtYQoPV17NlDpBw1Vw==",
"version": "0.38.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz",
"integrity": "sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==",
"dev": true
},
"abab": {
@ -22177,6 +22189,12 @@
"dev": true,
"optional": true
},
"undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
},
"union-value": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",

View file

@ -1,11 +1,11 @@
{
"name": "actions-hugo",
"version": "2.6.0",
"version": "3.0.0",
"description": "GitHub Actions for Hugo",
"main": "lib/index.js",
"engines": {
"node": ">=16.18.0",
"npm": ">=8.19.0"
"node": ">=20.10.0",
"npm": ">=10.2.3"
},
"scripts": {
"all": "npm run format:check && npm run lint && npm test",
@ -55,11 +55,11 @@
},
"devDependencies": {
"@types/jest": "^26.0.20",
"@types/node": "~12",
"@types/node": "~20",
"@types/node-fetch": "^2.5.8",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"@vercel/ncc": "^0.27.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^7.21.0",
"eslint-plugin-jest": "^24.1.5",
"husky": "^5.1.3",