From c57490a8b04136ae58ab5866a93d3db2f0fa0945 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Tue, 6 Feb 2024 15:47:20 +0100 Subject: [PATCH] feat: bump to use node20 runtime (#641) --- .github/workflows/test-action.yml | 1 - .github/workflows/test.yml | 11 +++--- .nvmrc | 2 +- README.md | 5 ++- action.yml | 2 +- package-lock.json | 58 ++++++++++++++++++++----------- package.json | 10 +++--- 7 files changed, 51 insertions(+), 38 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index eeae154..da5cf74 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -11,7 +11,6 @@ jobs: strategy: matrix: os: - - 'ubuntu-22.04' - 'ubuntu-20.04' - 'ubuntu-latest' - 'macos-latest' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a61b1f0..b3f6e3c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/.nvmrc b/.nvmrc index 39514a9..d5a1596 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -12.22.4 +20.10.0 diff --git a/README.md b/README.md index 407439f..856dfeb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/action.yml b/action.yml index 30db738..8dcf0cb 100644 --- a/action.yml +++ b/action.yml @@ -11,7 +11,7 @@ inputs: required: false default: 'false' runs: - using: 'node16' + using: 'node20' main: 'lib/index.js' branding: icon: 'package' diff --git a/package-lock.json b/package-lock.json index c8385c4..29c4066 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 6558d80..e9ea025 100644 --- a/package.json +++ b/package.json @@ -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",