Review 12.4 Merged

84136[TASK] Update rollup to 4.17.2

Benjamin Franzke CR +2 V +2 Hard +237 −312 updated 05/03/24, 06:23

Commit message

Newer rollup major versions feature optimizations in build output.

The rollup source files are now natively parsed as ESM modules by
NodeJS. Earlier rollup versions implicitly transpiled ESM to CJS and
allowed a mixture of ESM and CJS imports (both `import` statements and
`require()` calls) in one module.

With the switch to ESM-only modules we now make use of `createRequire`
utility method when node-require resolution is needed for CJS path
lookups. Since our main project (Build/) is still in CJS mode by default
(for grunt), we apply a sub-project module type overwrite for the
Build/rollup/ folder via Build/rollup/package.json to ensure rollup
configuration runs in native ESM mode.

See https://nodejs.org/docs/latest-v18.x/api/packages.html
> Node.js will treat the following as ES modules when passed to node as
> the initial input, or when referenced by import statements or import()
> expressions:
> […]
> * Files with a .js extension when the nearest parent package.json file
>   contains a top-level "type" field with a value of "module".

Executed commands:

    npm install --save-dev \
        rollup@^4.17.2 \
        @rollup/plugin-commonjs@^25.0.7 \
        @rollup/plugin-node-resolve@^15.2.3 \
        @rollup/plugin-replace@^5.0.5
    npm run build -- exec:rollup

Review

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

Issues 1

Files 26

Show 6 more files

Review log 23

  1. Benjamin Franzke uploaded patch set 1 05/03/24, 06:15

  2. core-ci voted on patch set 1 V +1 05/03/24, 06:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57152

  3. Benjamin Franzke merged patch set 2 05/03/24, 06:23