Review 12.4 Merged

80224[TASK] Map relative lit-imports to bare module specifiers

Benjamin Franzke CR +2 V +2 Normal +68 −34 updated 08/02/23, 11:20

Commit message

Imports via bare module specifiers (such that do not start with / or .)
are cache busted by their URL mapping in importmap — relative imports
(inside lit) are not by default. This is why we used version-suffixed
lit package folders in #96511 (pretty much like unpkg.com does).

This got removed with #100245, as required updates for configuration
files have not been applied automatically and the reason for the
version suffix was undocumented and thus unclear.
While we could fix those issues and add autoupdate support for
configuration files, it is now decided to remap all relative imports,
as this logic is present in our build setup anyway and eases future
updates by creating smaller diffsets (not every file has to be
renamed, only changed ones are updated).

Note that technically a new helper grunt task es-module-lexer-init
is added, which is required to await the asynchronous es-module-lexer
parser initialization (written in web assembly, and therefore
not synchronously available). This has worked "by luck" for the
copy:ts_files task (because there we earlier tasks that implicitly
awaited the initialization), copy:lit is forked off via the concurrent
plugin, we need to ensure es-module-lexer is actually ready to be used.

Review

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

Issues 3

Files 33

Show 13 more files

Review log 34

  1. Benjamin Franzke commented on patch set 1 08/02/23, 10:57

    Cherry Picked from branch main.
  2. Benjamin Franzke voted on patch set 1 V +2 CR +2 08/02/23, 11:01

  3. core-ci voted on patch set 1 V +1 08/02/23, 11:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44874

  4. Benjamin Franzke merged patch set 2 08/02/23, 11:20