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: strategy:
matrix: matrix:
os: os:
- 'ubuntu-22.04'
- 'ubuntu-20.04' - 'ubuntu-20.04'
- 'ubuntu-latest' - 'ubuntu-latest'
- 'macos-latest' - 'macos-latest'

View file

@ -14,6 +14,7 @@ jobs:
test: test:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false
matrix: matrix:
os: os:
- 'ubuntu-22.04' - 'ubuntu-22.04'
@ -24,14 +25,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Read .nvmrc - uses: actions/setup-node@v4
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm
- name: Setup Node
uses: actions/setup-node@v3.6.0
with: with:
node-version: '${{ steps.nvm.outputs.NVMRC }}' node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci - 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' hugo-version: '0.119.0'
extended: true extended: true
- name: Setup Node - uses: actions/setup-node@v4
uses: actions/setup-node@v3
with: with:
node-version: '18' node-version: '20'
cache: 'npm' cache: 'npm'
# The action defaults to search for the dependency file (package-lock.json, # 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 # npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its

View file

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

58
package-lock.json generated
View file

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

View file

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