Review main Merged

84102[TASK] Update rollup to 4.17.2

Andreas Nedbal CR +2 V +2 Hard +239 −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
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 27

Show 7 more files

Review log 1826

Show 1 earlier messages
  1. Andreas Nedbal uploaded patch set 1 05/01/24, 17:40

  1. core-ci voted on patch set 1 V -1 05/01/24, 17:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57051

  2. Andreas Nedbal uploaded patch set 2 V -1 05/01/24, 17:59

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

  4. Andreas Nedbal updated the commit message in patch set 3 V +1 05/01/24, 18:08

  5. core-ci voted on patch set 3 V +1 05/01/24, 18:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57053

  6. Benjamin Franzke uploaded patch set 4 V +1 05/02/24, 06:27

  7. core-ci voted on patch set 4 V +1 05/02/24, 06:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57077

  8. Benni Mack voted on patch set 4 CR +1 V +1 05/02/24, 06:34

  9. Benjamin Franzke commented on patch set 4 CR -1 05/02/24, 06:41

    on it
  10. Andreas Kienast commented on patch set 4 05/02/24, 06:46

    How was this measured? `time ./node_modules/grunt/bin/grunt exec:rollup` is approx. 1 second slower with the patch applied on my machine (Apple M3 Pro, 36 GB RAM).
  11. Benjamin Franzke uploaded patch set 5 CR +1 V +1 05/02/24, 07:06

  12. core-ci voted on patch set 5 V -1 05/02/24, 07:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57078

  13. Benjamin Franzke uploaded patch set 6 CR +1 V +1 05/02/24, 07:11

  14. Benjamin Franzke commented on patch set 6 V 0 05/02/24, 07:16

    Reply

    same here, i neither improvement on linux * v2: 18 vs v4: 19 seconds on my workstation. * v2: 58 vs v4: 59 seconds on my laptop.
  15. core-ci voted on patch set 6 V -1 05/02/24, 07:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57079

  16. Benjamin Franzke uploaded patch set 7 CR +1 V -1 05/02/24, 07:20

  17. Benjamin Franzke commented on patch set 7 05/02/24, 07:20

    Reply

    I'll remove this comment from now.
  18. core-ci voted on patch set 7 V -1 05/02/24, 07:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57080

  19. Benjamin Franzke uploaded patch set 8 CR +1 V +1 05/02/24, 07:29

  20. Benjamin Franzke commented on patch set 8 V -1 05/02/24, 07:32

    ckeditor5-theme-lark.js:1

    style-inject missing
  21. core-ci voted on patch set 8 V +1 05/02/24, 07:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57081

  22. Benjamin Franzke commented on patch set 8 V +1 05/02/24, 08:28

    ckeditor5-theme-lark.js:1 Reply

    actually not missing, but optimized away by rollup, as the stylesheet is empty.
  23. Andreas Kienast voted on patch set 8 CR +1 V +1 05/02/24, 18:23

  24. Benjamin Franzke commented on patch set 8 CR +2 V +2 05/03/24, 06:16

    Reply

    Done
  25. Benjamin Franzke merged patch set 9 05/03/24, 06:23