Skip to content

Commit

Permalink
feature #1321 Drop support for Node.js 19 and 21 (Kocal)
Browse files Browse the repository at this point in the history
This PR was merged into the main branch.

Discussion
----------

Drop support for Node.js 19 and 21

Due to the `>=18.0.0` version constraint in `engines.node`, it means that we allows Node.js 19 and 21, but, we don't want that.

Odds versions are supported only 6 months, it only helps library maintainers to update their library comptability with a new Node.js LTS-version. You can see on https://nodejs.org/fr/about/previous-releases that Node.js 19 is not present and Node.js 21 support has been stopped around ~may 2024.

Some of our dependencies explicitly does not support explicitly Node.js 19/21, like css-minimizer-webpack-plugin that [I've tried to upgrade to v5](https://github.com/symfony/webpack-encore/actions/runs/10654621974/job/29531168804?pr=1320):
```
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error cssnano@7.0.5: The engine "node" is incompatible with this module. Expected version "^18.12.0 || ^20.9.0 || >=22.0". Got "21.7.3"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
```

Since we plan to release a new major version of Encore, it's the good moment.

WDYT?

Commits
-------

40ce3c9 Drop support for Node.js 19 and 21
  • Loading branch information
Kocal committed Sep 2, 2024
2 parents 0bfcb2b + 40ce3c9 commit 9658190
Show file tree
Hide file tree
Showing 6 changed files with 281 additions and 210 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/high-depends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2019]
node-versions: ['18', '20', '21', '22']
node-versions: ['18', '20', '22']

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/low-depends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2019]
node-versions: ['18', '20', '21', '22']
node-versions: ['18', '20', '22']

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stable-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2019]
node-versions: ['18', '20', '21', '22']
node-versions: ['18', '20', '22']

steps:
- name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This is a new major version that contains several backwards-compatibility breaks

### BC Breaks

* #1321 Drop support of Node.js 19 and 21 (@Kocal)

* #1307 Drop `webpack-cli` 4 support, only `webpack-cli` ^5.1.4 is supported (@Kocal)

* #1308 Drop Vue 2 support (End-Of-Life), only Vue 3 is supported (@Kocal)
Expand All @@ -32,6 +34,8 @@ Encore.enableSassLoader((options) => {
});
```

* #1320 Drop css-minimizer-webpack-plugin 5 support, only css-minimizer-webpack-plugin 7 is supported (@Kocal)

## 4.7.0

### Features
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "https://github.com/symfony/webpack-encore/issues"
},
"engines": {
"node": ">=18.0.0"
"node": "^18.12.0 || ^20.0.0 || >=22.0"
},
"homepage": "https://github.com/symfony/webpack-encore",
"dependencies": {
Expand All @@ -33,7 +33,7 @@
"chalk": "^4.0.0",
"clean-webpack-plugin": "^4.0.0",
"css-loader": "^6.7.0",
"css-minimizer-webpack-plugin": "^5.0.0",
"css-minimizer-webpack-plugin": "^7.0.0",
"fastest-levenshtein": "^1.0.16",
"mini-css-extract-plugin": "^2.6.0",
"pretty-error": "^4.0.0",
Expand Down
Loading

0 comments on commit 9658190

Please sign in to comment.