73004[FEATURE] Add infrastructure for ES6 modules and importmaps
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Andreas Kienast +1
- Benni Mack +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Andreas Kienast +1
- Benni Mack +1
- core-ci +1 CI
Issues 3
Files 31
- Build/Sources/TypeScript/core/Resources/Public/TypeScript/JavaScriptItemProcessor.ts+35 −1
- Build/Gruntfile.js+2 −0
- Build/package.json+1 −0
- Build/yarn.lock+5 −0
- typo3/sysext/core/Classes/Page/ImportMap.php16new+303 −0
- typo3/sysext/core/Classes/Page/ImportMapCacheWarmer.phpnew+40 −0
- typo3/sysext/core/Classes/Page/ImportMapFactory.phpnew+49 −0
- typo3/sysext/core/Classes/Page/JavaScriptModuleInstruction.php+23 −1
- typo3/sysext/core/Classes/Page/JavaScriptRenderer.php+46 −0
- typo3/sysext/core/Classes/Page/PageRenderer.php+54 −20
- typo3/sysext/core/Configuration/Services.yaml+12 −0
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-96510-InfrastructureForJavaScriptModulesAndImportmaps.rst2new+116 −0
- typo3/sysext/core/Resources/Public/JavaScript/Contrib/es-module-shims.jsnew+1 −0
- typo3/sysext/core/Resources/Public/JavaScript/JavaScriptItemProcessor.js+1 −1
- typo3/sysext/core/Resources/Public/JavaScript/requirejs-loader.js+72 −3
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/core/Configuration/JavaScriptModules.phpnew+15 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/core/Resources/Public/JavaScript/Contrib/lit/directive.jsnew+0 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/core/Resources/Public/JavaScript/Contrib/lit/index.jsnew+0 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/core/Resources/Public/JavaScript/Module1.jsnew+0 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/core/Resources/Public/JavaScript/module2.esm.jsnew+0 −0
Show 11 more files
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/package1/Resources/Public/JavaScript/NonEsmModule.jsnew+0 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/package2/Configuration/JavaScriptModules.phpnew+10 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/package2/Resources/Public/JavaScript/File.jsnew+0 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/package3/Configuration/JavaScriptModules.phpnew+21 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/package3/Resources/Public/JavaScript/Overrides/Package2/File.jsnew+0 −0
- typo3/sysext/core/Tests/Unit/Page/Fixtures/ImportMap/package4/Configuration/JavaScriptModules.phpnew+7 −0
- typo3/sysext/core/Tests/Unit/Page/ImportMapTest.phpnew+254 −0
- typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php+19 −5
- typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/AbstractMenuContentObjectTest.php+7 −0
- typo3/sysext/frontend/Tests/Unit/ContentObject/FluidTemplateContentObjectTest.php+7 −0
- typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php+7 −0
Review log 1320
-
Benjamin Franzke uploaded patch set 1 01/13/22, 08:47
-
Benjamin Franzke wrote 01/13/22, 08:55
Topic set to esm -
core-ci voted on patch set 1 V -1 01/13/22, 09:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22006
-
Benjamin Franzke uploaded patch set 2 01/13/22, 09:15
-
core-ci voted on patch set 2 V -1 01/13/22, 09:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22007
-
core-ci commented on patch set 2 01/13/22, 12:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22007
-
core-ci voted on patch set 2 V +1 01/13/22, 12:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22007
-
Benjamin Franzke uploaded patch set 3 01/14/22, 17:14
-
core-ci voted on patch set 3 V +1 01/14/22, 17:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22076
-
Benjamin Franzke uploaded patch set 4 01/14/22, 18:26
-
core-ci voted on patch set 4 V +1 01/14/22, 18:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22080
-
Andreas Kienast commented on patch set 4 01/15/22, 15:12
ImportMap.php:88[EA] 'count(...)' is used in a loop and is a low performing construction.ImportMap.php:113Would it make sense to move this into the `if ($includePolyfill)` branch?ImportMap.php:121Should we add JSON_THROW_ON_ERROR as well?ImportMap.php:173Declaring the variable is redundantImportMap.php:208[EA] This closure can be declared as static (better scoping; in some cases can improve performance).ImportMap.php:217Constant from base class '\RegexIterator' referenced via child classImportMap.php:246Declaration is redundantImportMap.php:255[EA] 'array_merge(...)' is used in a loop and is a resources greedy construction. See https://dev.to/klnjmm/never-use-arraymerge-in-a-for-loop-in-php-5go1 as wellFeature-96510-InfrastructureForJavaScriptModulesAndImportmaps.rst:36without -
Benjamin Franzke uploaded patch set 5 01/15/22, 16:50
-
Benjamin Franzke commented on patch set 5 01/15/22, 16:50
ImportMap.php:88ReplyDoneImportMap.php:113ReplyFull ACK. Done.ImportMap.php:121ReplyDoneImportMap.php:173ReplyDoneImportMap.php:208ReplyDoneImportMap.php:217ReplyDoneImportMap.php:246ReplyDoneImportMap.php:255Replygood catch, doneFeature-96510-InfrastructureForJavaScriptModulesAndImportmaps.rst:36ReplyDone -
core-ci voted on patch set 5 V +1 01/15/22, 17:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22122
-
Benni Mack voted on patch set 5 CR +1 01/17/22, 07:40
-
Andreas Kienast voted on patch set 5 V +1 CR +1 01/17/22, 10:47
-
Benni Mack commented on patch set 5 V +1 01/18/22, 09:15
Although I'm not 100% sure of the registration format ("dependencies" in the array), I think we should proceed here and see how we can improve this until 12.0. -
Benjamin Franzke voted on patch set 5 V +2 CR +2 01/18/22, 10:11
-
Benjamin Franzke merged patch set 6 01/18/22, 10:12