Skip to content

Commit f575020

Browse files
committed
Fix & update CHANGELOG for 7.0.0
1 parent 69e3638 commit f575020

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

CHANGELOG.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
11
# CHANGELOG
22

3-
## 6.0.0
3+
## 7.0.0 - The ESM-Only & Async-first Release
44

5-
This is a new major version that contains several backwards-compatibility breaks, but for the best!
5+
The Node.js ecosystem has largely moved to ESM (ECMAScript Modules) as the standard module format.
6+
Most actively maintained packages **now ship ESM-only**, and CommonJS is increasingly treated as a legacy format.
7+
8+
Continuing to publish as CJS would mean **fighting against the ecosystem**. Using older versions of dependencies,
9+
adding workarounds for ESM-only packages, and missing out on benefits like static analysis, tree-shaking, and top-level `await`.
10+
11+
Since Encore 6.0 already requires Node.js `^22.13.0 || >=24.0`, which has full ESM support, there is no compatibility
12+
reason to keep CJS. **This release makes the move to ESM-only.**
13+
14+
This migration also unlocks the use of `async`/`await` in Encore's internals, which was previously
15+
impossible due to compatibility issues. For example, when we migrated from `eslint-loader` to `eslint-webpack-plugin` in
16+
[#985](https://github.com/symfony/webpack-encore/pull/985), the new ESLint API was async-only, but
17+
`Encore.getWebpackConfig()` was synchronous, forcing a `sync-rpc` workaround to bridge the gap.
18+
Even though the issue had been _resolved_ when ESLint support was removed,
19+
it reappeared with Babel when Encore checks whether a Babel configuration file already exists.
20+
21+
Now that `getWebpackConfig()` is natively async, this entire class of problems disappears, and **Encore
22+
can adopt modern async APIs from the ecosystem without hacks**.
623

724
### BC Breaks
825

9-
* Migrate from CommonJS to ESM — the package now requires `"type": "module"` in your project or
26+
* Migrate from CommonJS to ESM — the package now requires `"type": "module"` in your project or
1027
the use of `.mjs` file extensions. Update your `webpack.config.js`:
1128
```js
1229
// Before (CJS)
@@ -21,9 +38,17 @@ This is a new major version that contains several backwards-compatibility breaks
2138
```
2239
Note: `Encore.getWebpackConfig()` is now **async** and returns a `Promise`. Use `await` at the
2340
top level of your webpack config (webpack supports async config files natively).
41+
2442
* The package `"exports"` field is now restrictive: only `"@symfony/webpack-encore"` and
2543
`"@symfony/webpack-encore/lib/plugins/plugin-priorities.js"` are exposed as public entry points.
2644
If you were importing other internal modules directly, those imports will no longer work.
45+
46+
## 6.0.0
47+
48+
This is a new major version that contains several backwards-compatibility breaks, but for the best!
49+
50+
### BC Breaks
51+
2752
* Remove support of Node.js <22.13.0
2853
* Remove support of babel-loader@^9.1.3, see possible BC breaks in [10.0.0 release notes](https://github.com/babel/babel-loader/releases/tag/v10.0.0)
2954
* Remove support of style-loader@^3.3.0, see possible BC breaks in [4.0.0 release notes](https://github.com/webpack/style-loader/releases/tag/v4.0.0)

0 commit comments

Comments
 (0)