Review 13.4 Merged

88488[TASK] Prepare import map prefix-based URL calculation

Benjamin Franzke CR +2 V +2 Easy +22 −1 updated 03/05/25, 08:20

Commit message

Import map resolution without a cache-bust suffix missed to join a
previously splitted path-string via slashes, when a prefix based
import-declaration was used to calculate the resulting URL of a
JavaScript bare module specifier (usecase: calculate the
URL of a bare module specifier for usage in a `<script src="">`
tag, where bare module specifiers like `@typo3/backend/foo.js` can
not be used directly as browsers will not map them by importmap).

Note: TYPO3 currently uses cache-bust suffixes only, as there
are no cache-bust prefixes yet. Therefore all prefix-paths are
recursively pre-calculated in `computeImportMaps()`, which effecively
skipped the broken codepath for the current environments, which means
this is a preparatory TASK and not a BUGFIX for the case when
once prefix-based cache-busting is added in #98481.

Review

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

Issues 2

Files 3

Review log 34

  1. Benjamin Franzke commented on patch set 1 03/05/25, 07:52

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 03/05/25, 08:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75144

  3. Benjamin Franzke voted on patch set 1 CR +2 V +2 03/05/25, 08:20

  4. Benjamin Franzke merged patch set 2 03/05/25, 08:20