Review main Merged

83712[BUGFIX] Correctly resolve relative imports in page.tsconfig

Benjamin Franzke CR +2 V +2 Normal +89 −12 updated 05/27/24, 13:51

Commit message

Add a filename context to page.tsconfig include nodes
(autoloaded from extensions Configuration folder or from site sets)
in order to allow relative imports to be resolved.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Stefan Bürk +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Stefan Bürk +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 2

Files 16

Review log 2935

Show 810 earlier messages
  1. Benjamin Franzke uploaded patch set 1 04/09/24, 06:18

  2. core-ci voted on patch set 1 V -1 04/09/24, 06:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55589

  3. Christian Kuhn commented on patch set 1 04/09/24, 07:41

    TsConfigTreeBuilder.php:301

    that's the key change, right? this triggers recursive into relative imports? (will have to debug this a bit when the patch stabilizes). i'm unsure why this was not implemented, yet: it's possible i wasn't aware of this feature in v11 - does it work there for page tsconfig?
  4. Benjamin Franzke uploaded patch set 2 V -1 04/09/24, 08:24

  5. Benjamin Franzke commented on patch set 2 04/09/24, 08:24

    TsConfigTreeBuilder.php:301 Reply

    ack, i wanted to contact you, but I'm currently quite busy with the surfcamp stuff, so I didn't maange to do that yet.. This was found by Łukasz Uznański in the context of site sets, haven't checked page.tsconfig yet. Will check that later..
  6. core-ci voted on patch set 2 V +1 04/09/24, 08:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55591

  7. Łukasz Uznański commented on patch set 2 V +1 04/09/24, 13:14

    tested, works on my instance
  8. Łukasz Uznański commented on patch set 2 04/09/24, 14:43

    Reply

    that comment is related to current main, didn't test on v12 yet
  9. Benjamin Franzke uploaded patch set 3 V +1 04/26/24, 08:47

  10. Benjamin Franzke commented on patch set 3 04/26/24, 08:47

    TsConfigTreeBuilder.php:301 Reply

    Also needed in v12, will backport.
  1. core-ci voted on patch set 3 V +1 04/26/24, 08:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56760

  2. Christian Kuhn commented on patch set 3 04/27/24, 13:44

    PageTsConfigFactoryTest.php:43

    maybe extract to an own test case with a dedicated name? Just to clarify the intention is a verification that relative imports do work?
  3. Benjamin Franzke uploaded patch set 4 V +1 04/29/24, 06:57

  4. Benjamin Franzke commented on patch set 4 04/29/24, 06:57

    PageTsConfigFactoryTest.php:43 Reply

    Done
  5. core-ci voted on patch set 4 V +1 04/29/24, 07:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56951

  6. Stefan Bürk voted on patch set 4 CR +1 05/11/24, 18:00

  7. Stefan Bürk voted on patch set 4 V +1 05/11/24, 18:18

  8. Łukasz Uznański commented on patch set 4 05/13/24, 21:51

    I can't make tsconfig autoimport from Set to work, but previous version worked for me on my older setup. Does it require anything more than placing it in `Configuration/Sets/Foo/page.tsconfig`?
  9. Benjamin Franzke commented on patch set 4 05/15/24, 06:35

    Reply

    No, that should be enough. Just make sure your set "Foo" is actually loaded. I just verified it again, works here. Which setup did you use?
  10. André Buchmann commented on patch set 4 05/15/24, 11:38

    Should there be a second test case covering the include from within a set?

    Reply

    Tested both ways successfully: Configuration/page.tsconfig and Configuration/Set/MySet/page.tsconfig
  11. Stefan Bürk voted on patch set 4 CR 0 V 0 05/15/24, 14:14

  12. Christian Kuhn commented on patch set 4 05/26/24, 07:46

    Reply

    Done
  13. Christian Kuhn commented on patch set 4 05/26/24, 07:48

    Reply

    i played around on this and changed the setup to test another permutation.
  14. Christian Kuhn uploaded patch set 5 V +1 05/26/24, 07:49

  15. Christian Kuhn commented on patch set 5 CR +1 V +1 05/26/24, 07:53

    tried to make the test setup a bit more clear and include further variants.
  16. core-ci voted on patch set 5 V -1 05/26/24, 07:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58254

  17. Christian Kuhn commented on patch set 5 CR -1 05/26/24, 08:23

    on it again.
  18. Christian Kuhn uploaded patch set 6 CR -1 V +1 05/26/24, 08:57

  19. Christian Kuhn commented on patch set 6 CR +1 V +1 05/26/24, 08:59

    changed test set again to verify @imports with path traversal are not loaded.
  20. core-ci voted on patch set 6 V +1 05/26/24, 09:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58255

  21. Stefan Bürk voted on patch set 6 CR +1 05/27/24, 12:56

  22. Stefan Bürk voted on patch set 6 V +1 05/27/24, 13:26

  23. Benjamin Franzke voted on patch set 6 CR +2 V +2 05/27/24, 13:51

  24. Benjamin Franzke commented on patch set 6 05/27/24, 13:51

    Reply

    Thanks a lot, I've also added them to the v12 backport ❤️
  25. Benjamin Franzke merged patch set 7 05/27/24, 13:51