diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a6868a..f4bf927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## v14.0.0-SNAPSHOT - unreleased + +### 💥 Breaking Changes + +* Requires `hoist-react >= 85.0`. +* Flipped `@babel/plugin-proposal-decorators` from `{version: 'legacy'}` to `{version: '2023-05'}` + to align with hoist-react v85's migration to TC39 Stage 3 modern decorators. Consuming apps must + upgrade `@xh/hoist` and `@xh/hoist-dev-utils` together — mixing a legacy-decorator app with this + build of dev-utils will silently break all `@observable` and `@bindable` fields. See the + hoist-react v85 upgrade notes for the codemod required in app code. + ## v13.0.0-SNAPSHOT - unreleased ## v12.0.0 - 2026-03-31 diff --git a/configureWebpack.js b/configureWebpack.js index 01d5d03..67e6e49 100644 --- a/configureWebpack.js +++ b/configureWebpack.js @@ -442,6 +442,7 @@ async function configureWebpack(env) { // (Note these plugins are all generally bundled with preset-env.) include: [ 'transform-class-properties', + 'transform-class-static-block', 'transform-nullish-coalescing-operator', 'transform-optional-chaining', 'transform-private-methods', @@ -462,10 +463,14 @@ async function configureWebpack(env) { {allowDeclareFields: true, isTSX: true} ], - // Support our current decorator syntax, for MobX and Hoist decorators. - // See notes @ https://babeljs.io/docs/en/babel-plugin-proposal-decorators#legacy - // and https://mobx.js.org/enabling-decorators.html#babel-7 - ['@babel/plugin-proposal-decorators', {version: 'legacy'}], + // Support TC39 Stage 3 (2023-05 / 2022.3) decorators, used by hoist-react + // v85+ and compatible apps. See: + // https://babeljs.io/docs/babel-plugin-proposal-decorators + // https://mobx.js.org/enabling-decorators.html + // Apps upgrading from hoist-react < 85 must also add the `accessor` + // keyword to `@observable` / `@bindable` fields and remove + // `makeObservable(this)` calls — see the v85 upgrade notes. + ['@babel/plugin-proposal-decorators', {version: '2023-05'}], // Avoid importing every FA icon ever made. // See https://github.com/FortAwesome/react-fontawesome/issues/70 diff --git a/package.json b/package.json index fe9278d..570666a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xh/hoist-dev-utils", - "version": "13.0.0-SNAPSHOT", + "version": "14.0.0-SNAPSHOT", "description": "Utilities for configuring builds of Hoist-React client applications.", "repository": { "type": "git",