Originally tlp
was conceived as a giant module available from everywhere, since then this giant module has been split in multiple small packages in order to be able to re-use some parts in specific contexts.
As a result we end up with (at least) two ways to use the same code which can be confusing or even lead to bugs.
We should have only one way to use this code and only keep the one that come with the less amount of magic. This means stop exposing @tuleap/tlp-fetch
via the tlp
module.
Note that this means that the @tuleap/tlp-fetch
code might be duplicated multiple times across apps in the same page. Thanks to the tree-shaking of our bundlers the size increase should be quite limited and it also means we stop loading on every pages code that we might not use. If this approach becomes problematic for other parts of the tlp
module we can still probably deal with it in a more efficient way using things like module federation.