From affa1e6bef18dda4b414b996833b35a1527d7383 Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:39:05 +0200 Subject: [PATCH] feat(deps): update action from node16 to node20 BREAKING CHANGE: Update action from node16 to node20 update @types/node to 20.5.0 --- .github/workflows/check-dist.yml | 2 +- .github/workflows/main.yml | 4 ++-- .node-version | 2 +- CHANGELOG.md | 1 + README.md | 9 +++++---- action.yml | 2 +- package-lock.json | 14 +++++++------- package.json | 2 +- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 517499412..12d060630 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16.16.0 + node-version: 20.5.0 - uses: bahmutov/npm-install@v1 - run: npm run format - run: npm run build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff28cf2d2..1cac438a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,11 +14,11 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - # Action runs: using: node16 as defined in + # Action runs: using: node20 as defined in # https://github.com/cypress-io/github-action/blob/master/action.yml # Node.js minor version is aligned to # https://github.com/actions/runner/blob/main/src/Misc/externals.sh - node-version: 16.16.0 + node-version: 20.5.0 - uses: bahmutov/npm-install@v1 - run: npm run format - run: npm run build diff --git a/.node-version b/.node-version index 4a1f488b6..209e3ef4b 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -18.17.1 +20 diff --git a/CHANGELOG.md b/CHANGELOG.md index dfec547ee..1ee6978d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ See [Releases](https://github.com/cypress-io/github-action/releases) for full de | Version | Changes | | ------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| v6.0.0 | Action runs under Node.js 20 instead of Node.js 16. | | v5.8.1 | Examples remove Node.js 19. End of support for Node.js 19. | | v5.8.0 | Add GitHub step output `resultsUrl`. Deprecate `dashboardUrl`. | | v5.7.0 | Add basic Yarn Modern Plug'n'Play support. | diff --git a/README.md b/README.md index ec7cc8978..e49b2c673 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ See the example project [component-tests](examples/component-tests/) and the [ex **Best practice:** -Our examples specify using branch [v5](https://github.com/cypress-io/github-action/tree/v5) which is the action's latest major version: +Our examples specify using branch [v5](https://github.com/cypress-io/github-action/tree/v5) which is the action's recommended major version: ```yml - name: Cypress run @@ -1501,7 +1501,7 @@ jobs: ### Support -Node.js is required to run this action. The current version `v5` supports: +Node.js is required to run this action. The currently recommended version `v5` supports: - **Node.js** 16.x - **Node.js** 18.x @@ -1515,7 +1515,7 @@ and is generally aligned with [Node.js's release schedule](https://github.com/no [![Node versions example](https://github.com/cypress-io/github-action/workflows/example-node-versions/badge.svg?branch=master)](.github/workflows/example-node-versions.yml) -Cypress itself runs with a fixed Node.js version specified by the [runs.using](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions) parameter of [action.yml](action.yml). For `github-action@v5` this is `node16`. +Cypress itself runs with a fixed Node.js version specified by the [runs.using](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions) parameter of [action.yml](action.yml). `github-action@v5` uses `node16` and `github-action@v6` uses `node20`. ## Changelog @@ -1523,7 +1523,8 @@ View the [CHANGELOG](./CHANGELOG.md) document for an overview of version changes ## Compatibility -- `v5` is the recommended version of [cypress-io/github-action](https://github.com/cypress-io/github-action) +- `v6` is provided for early adopters needing full `node20` support +- `v5` is the current recommended version - `v4` is the minimum version required for Cypress `10.x` and later Pay attention to any GitHub Actions deprecation warnings shown in logs which may recommend updating. diff --git a/action.yml b/action.yml index ba3d3983b..d5d1b4609 100644 --- a/action.yml +++ b/action.yml @@ -97,7 +97,7 @@ outputs: resultsUrl: description: 'Cypress Cloud URL if the run was recorded' runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' branding: color: 'green' diff --git a/package-lock.json b/package-lock.json index 4645e6587..6b91f56f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "supports-color": "9.3.1" }, "devDependencies": { - "@types/node": "18.17.5", + "@types/node": "20.5.0", "@vercel/ncc": "0.36.1", "husky": "8.0.3", "markdown-link-check": "3.11.1", @@ -432,9 +432,9 @@ } }, "node_modules/@types/node": { - "version": "18.17.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.5.tgz", - "integrity": "sha512-xNbS75FxH6P4UXTPUJp/zNPq6/xsfdJKussCWNOnz4aULWIRwMgP1LgaB5RiBnMX1DPCYenuqGZfnIAx5mbFLA==" + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", + "integrity": "sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==" }, "node_modules/@types/node-fetch": { "version": "2.6.2", @@ -1908,9 +1908,9 @@ } }, "@types/node": { - "version": "18.17.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.5.tgz", - "integrity": "sha512-xNbS75FxH6P4UXTPUJp/zNPq6/xsfdJKussCWNOnz4aULWIRwMgP1LgaB5RiBnMX1DPCYenuqGZfnIAx5mbFLA==" + "version": "20.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", + "integrity": "sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==" }, "@types/node-fetch": { "version": "2.6.2", diff --git a/package.json b/package.json index 832dadaf5..6f8e79939 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "supports-color": "9.3.1" }, "devDependencies": { - "@types/node": "18.17.5", + "@types/node": "20.5.0", "@vercel/ncc": "0.36.1", "husky": "8.0.3", "markdown-link-check": "3.11.1",