Review 12.4 Merged

88395[TASK] Simplify contrib package bundling

Benjamin Franzke CR +2 V +2 Hard +180 −272 updated 03/05/25, 08:21

Commit message

Use native ESM (ECMAScript modules) sources for mark.js and
flatpickr instead of wrapping them in a CommonJS-to-ESM closure.

Our custom wrappers are no longer needed, as upstreams started to
ship modern ESM sources, next to the traditional CommonJS sources.

Also streamline repetitive rollup configs into a generalized build
helper, as mark.js and flatpickr are now processed by rollup
and their configs would have been very identical to the existing
per-library configs, which were already duplicated multiple times
before.
These libraries now share a bundle helper with some automagic
to resolve the ESM sources via the module related entry point
"exports" [1] or de facto standard "module" fields in package.json.

While at it, the CKEditor translation generation is streamlined
to be a simple rollup pipeline, without the need for intermediate files
in Build/ckeditorLocales/ and without build logic beeing spread between
some grunt scripts and rollup.
Also some outdated CKEditor workarounds are removed from the rollup
configuration as well.

[1] https://nodejs.org/api/packages.html#main-entry-point-export

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 2

Files 19

Review log 46

  1. Benjamin Franzke uploaded patch set 1 02/28/25, 08:27

  2. core-ci voted on patch set 1 V -1 02/28/25, 08:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74871

  3. Benjamin Franzke uploaded patch set 2 V -1 02/28/25, 08:38

  4. core-ci voted on patch set 2 V +1 02/28/25, 08:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74874

  5. Benjamin Franzke commented on patch set 2 CR +2 V +2 03/05/25, 08:21

    This change is ready for review.
  6. Benjamin Franzke merged patch set 3 03/05/25, 08:21