Skip to content

fix(upgrade): bring extensions to Prettier 3, webpack-cli 7 and @flarum/jest-config 2.1.1 - #70

Merged
imorland merged 1 commit into
3.xfrom
im/prettier-3-tooling
Oct 23, 2026
Merged

imorland merged 1 commit into
3.xfrom
im/prettier-3-tooling

Conversation

@imorland

Copy link
Copy Markdown
Member

Fixes #0000 (follows flarum/framework#5280, which moves the bundled extensions to the same tooling)

Changes proposed in this pull request:
fl upgrade 2.0 formats an extension's code with Prettier 3, then left the extension on Prettier 2, so its own format-check could disagree with the result. fl init also scaffolded Prettier 2, while the CLI formats the code it generates with Prettier 3. The upgrade and the scaffold now use Prettier ^3.9.10, webpack-cli ^7.2.3 and @flarum/jest-config ^2.1.1, the release that requires flarum-webpack-config ^3.1.0. As before, an extension already asking for a newer version keeps it.

Reviewers should focus on:

  • 21 real extensions moved to webpack-cli 7.2.3: every one that built before still builds, and the 20 with an earlier build produce byte-identical bundles (excluding source maps). Typings and test results are unchanged.
  • The scaffold's js/src passes Prettier 3's --check with Flarum's config.

Screenshot
N/A

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension? (N/A, CLI.)
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation. (N/A, CLI.)
  • Frontend changes: tests are green (run yarn test in js/). (N/A, CLI.)
  • Frontend changes: tests have been added, or are not appropriate here. (N/A, CLI.)
  • Backend changes: tests are green (run composer test). (yarn test: 423 tests, Prettier, ESLint and tsc.)
  • Backend changes: tests have been added, or are not appropriate here.
  • Where applicable, changes are suitable for all supported database drivers (MySQL, MariaDB, PostgreSQL, SQLite). (N/A)
  • Core developer confirmed locally this works as intended.
  • The description above is written by me and describes what this pull request actually does.

…um/jest-config 2.1.1

The upgrade formats an extension's code with Prettier 3, then left the
extension on Prettier 2, so its own format-check could disagree. New
extensions were scaffolded with Prettier 2 too, while the CLI formats
the code it generates with Prettier 3. Both now use the tooling the
bundled extensions build with (flarum/framework#5280).
@imorland
imorland merged commit 6097dd6 into 3.x Oct 23, 2026
3 checks passed
@imorland
imorland deleted the im/prettier-3-tooling branch October 23, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant