From 71bd33be6a11287d988e868028201e96428cb407 Mon Sep 17 00:00:00 2001 From: David Glick Date: Tue, 12 Sep 2023 23:47:51 -0700 Subject: [PATCH] Add support for Node 20, drop Node 16 (#5166) --- .github/workflows/acceptance.yml | 48 ++----------------- .github/workflows/towncrier.yml | 2 +- .github/workflows/unit.yml | 4 +- CHANGELOG.md | 6 +-- README.md | 15 +++--- docs/source/upgrade-guide/index.md | 11 +++-- news/5166.breaking | 1 + news/5166.feature | 1 + package.json | 2 +- .../generators/app/templates/package.json.tpl | 2 +- packages/generator-volto/package.json | 2 +- 11 files changed, 29 insertions(+), 65 deletions(-) create mode 100644 news/5166.breaking create mode 100644 news/5166.feature diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 5ed332f4d6..48f66ef7af 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x, 18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v3 @@ -27,17 +27,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: false # Since they run on different node versions, we can't parallel browser: chrome - group: Core ${{ matrix.node-version }} spec: cypress/tests/core/basic/**/*.js start: | make start-test-acceptance-server @@ -65,7 +61,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x, 18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v3 @@ -83,17 +79,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: false # Since they run on different node versions, we can't parallel browser: chrome - group: Core Blocks ${{ matrix.node-version }} spec: cypress/tests/core/blocks/**/*.js start: | make start-test-acceptance-server @@ -121,7 +113,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x, 18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v3 @@ -139,17 +131,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: false # Since they run on different node versions, we can't parallel browser: chrome - group: Core Volto Slate ${{ matrix.node-version }} spec: cypress/tests/core/volto-slate/**/*.js start: | make start-test-acceptance-server @@ -194,17 +182,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: false # Since they run on different node versions, we can't parallel browser: chrome - group: Core Basic - Plone 5 spec: cypress/tests/core/basic/**/*.js start: | make start-test-acceptance-server-5 @@ -249,17 +233,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: true browser: chrome - group: Coresandbox spec: cypress/tests/coresandbox/**/*.js start: | make start-test-acceptance-server-coresandbox @@ -306,17 +286,13 @@ jobs: env: BABEL_ENV: production CYPRESS_API: guillotina - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: true browser: chrome - group: Guillotina spec: cypress/tests/guillotina/**/*.js start: | make start-test-acceptance-server-guillotina @@ -362,17 +338,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: true browser: chrome - group: Multilingual spec: cypress/tests/multilingual/**/*.js start: | make start-test-acceptance-server-multilingual @@ -443,17 +415,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: true browser: chrome - group: Working Copy spec: cypress/tests/workingCopy/**/*.js start: | make start-test-acceptance-server-workingcopy @@ -481,7 +449,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [18.x] + node-version: [18.x, 20.x] env: generator-directory: ./packages/generator-volto project-directory: ./my-volto-app @@ -534,17 +502,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: true browser: chrome - group: Project Generator spec: cypress/tests/minimal/**/*.js start: | make start-test-acceptance-server @@ -596,17 +560,13 @@ jobs: uses: cypress-io/github-action@v5 env: BABEL_ENV: production - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RETRIES: 2 # Recommended: pass the GitHub token lets this action correctly # determine the unique run id necessary to re-run the checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: install: false - record: true - parallel: true browser: chrome - group: Seamless spec: cypress/tests/core/basic/**/*.js config: baseUrl=http://localhost start: | diff --git a/.github/workflows/towncrier.yml b/.github/workflows/towncrier.yml index 16f68d2cf5..852e610cc3 100644 --- a/.github/workflows/towncrier.yml +++ b/.github/workflows/towncrier.yml @@ -6,7 +6,7 @@ on: - master env: - node-version: 16.x + node-version: 18.x jobs: towncrier: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 3bad45b9aa..6515b76503 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x, 18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v3 @@ -16,7 +16,7 @@ jobs: - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - # remove workaround for 18.x once https://github.com/nodejs/node/issues/47563 is fixed + # remove workaround for 18.x once https://github.com/nodejs/node/issues/47563 is fixed node-version: ${{ matrix.node-version == '18.x' && '18.15.0' || matrix.node-version }} cache: yarn diff --git a/CHANGELOG.md b/CHANGELOG.md index d4ecb4fe13..eec8790f5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -510,7 +510,7 @@ ### Breaking -- Volto 17 drops support for NodeJS 14, and adds support for NodeJS 18. +- Volto 17 drops support for NodeJS 14, and adds support for Node.js 18. Please see the [upgrade guide](https://6.docs.plone.org/volto/upgrade-guide/index.html) for more information. @@ -1410,7 +1410,7 @@ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information - Update README with latest versions, point to Plone 6 as recommended default @sneridagh - Trigger a new deploy core Plone documentation when Volto documentation is updated @esteele - Update supported Python versions. @stevepiercy -- Add NodeJS 18 (LTS) usage notice @sneridagh +- Add Node.js 18 (LTS) usage notice @sneridagh - Fix Netlify build @sneridagh - Fix grammar in Theming Strategy. Fixes #954. @stevepiercy - Fix wording in About Semantic UI. Fixes #953. @stevepiercy @@ -1623,7 +1623,7 @@ See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information ### Documentation -- Add NodeJS 18 (LTS) usage notice @sneridagh +- Add Node.js 18 (LTS) usage notice @sneridagh - Fix Netlify build @sneridagh ## 16.0.0-alpha.45 (2022-10-24) diff --git a/README.md b/README.md index ca0357bec7..c65bc011f8 100644 --- a/README.md +++ b/README.md @@ -226,13 +226,14 @@ On the [Plone Training website](https://training.plone.org), you'll find Volto-d [Timo Stollenwerk - Reinventing Plone, Roadmap to the Modern Web](https://2018.ploneconf.org/talks/reinventing-plone-roadmap-to-the-modern-web) -## Node Support - -- Node 18: Supported since Volto 17 -- Node 16: Supported since Volto 14 -- Node 14: No longer supported. It was supported from Volto 8.8.0 - 16 -- Node 12: No longer supported. It was supported from Volto 4 - 15 -- Node 10: No longer supported. It was supported from Volto 1 - 12 +## Node.js Support + +- Node.js 20: Supported since Volto 17 +- Node.js 18: Supported since Volto 17 +- Node.js 16: No longer supported. It was supported from Volto 14 - 16 +- Node.js 14: No longer supported. It was supported from Volto 8.8.0 - 16 +- Node.js 12: No longer supported. It was supported from Volto 4 - 15 +- Node.js 10: No longer supported. It was supported from Volto 1 - 12 ## Browser support diff --git a/docs/source/upgrade-guide/index.md b/docs/source/upgrade-guide/index.md index 9215c64866..6a8af9a660 100644 --- a/docs/source/upgrade-guide/index.md +++ b/docs/source/upgrade-guide/index.md @@ -28,12 +28,13 @@ Thus it is safe to run it on top of your project and answer the prompts. ## Upgrading to Volto 17.x.x -### Ending support for Node.js 14 +### Ending support for Node.js 14 and 16 -Long Term Support for {term}`Node.js` 14 by the Node.js community ends in April 2023. -Volto 17 no longer supports Node.js 14. -Please update your projects to a Node.js LTS version, where either 16 or 18 is supported at the moment of this writing. -Version 18 is recommended. +Long Term Support (LTS) for {term}`Node.js` 14 by the Node.js community ended in April 2023. +Long Term Support for Node.js 16 by the Node.js community ended in September 2023. +Volto 17 no longer supports Node.js 14 or 16. +Please update your projects to a supported Node.js version (18 or 20). +Version 18 is recommended, as the current LTS version of Node.js. #### localhost now resolves to an IPv6 address diff --git a/news/5166.breaking b/news/5166.breaking new file mode 100644 index 0000000000..bef26f42b8 --- /dev/null +++ b/news/5166.breaking @@ -0,0 +1 @@ +Removed support for Node.js 16. It is no longer supported by the Node.js community. @davisagli diff --git a/news/5166.feature b/news/5166.feature new file mode 100644 index 0000000000..7644288aef --- /dev/null +++ b/news/5166.feature @@ -0,0 +1 @@ +Added support for Node.js 20. @davisagli diff --git a/package.json b/package.json index bc9ecfc0c9..7d1612c81f 100644 --- a/package.json +++ b/package.json @@ -222,7 +222,7 @@ ] }, "engines": { - "node": "^16 || ^18" + "node": "^16 || ^18 || ^20" }, "dependencies": { "@babel/core": "^7.0.0", diff --git a/packages/generator-volto/generators/app/templates/package.json.tpl b/packages/generator-volto/generators/app/templates/package.json.tpl index 5bbb511963..72c7f8b2c0 100644 --- a/packages/generator-volto/generators/app/templates/package.json.tpl +++ b/packages/generator-volto/generators/app/templates/package.json.tpl @@ -133,7 +133,7 @@ "not dead" ], "engines": { - "node": "^16 || ^18" + "node": "^16 || ^18 || ^20" }, "dependencies": <%- dependencies %>, "devDependencies": { diff --git a/packages/generator-volto/package.json b/packages/generator-volto/package.json index d5ac789ec2..5e0685fbdd 100644 --- a/packages/generator-volto/package.json +++ b/packages/generator-volto/package.json @@ -96,7 +96,7 @@ } }, "engines": { - "node": "^16 || ^18" + "node": "^16 || ^18 || ^20" }, "dependencies": { "ansi-escapes": "2.0.0",