Following Frontend repositories splitting, I’m opening this discussion to make public my current design choices.
The WIP is available in this PR matching XWIKI-23699 in Jira.
Since the PR is considerable, I will highlight the most important points below.
Note that all the aspects related to the publication of packages to registries are out of scope for now to keep the discussion size reasonable.
A new xwiki-platform-node module is introduced at the root of the repository (next to xwiki-platform-core).
This module is a webjar-node module that is not meant to be published. It is using the webjar-node to keep having the same build lifecycle as other node-based modules.
Its src/main/node directory contains a large set of packages that are either:
- expected to be used by other webjars from XWiki Platform (e.g.,
xwiki-platform-blocknote-webjar) or published in npm registries to be used by other projects (e.g.,xwiki-contrib/cristal) - used to share artifacts useful at build time (e.g., shared configurations).
Internally, the build order of packages (i.e., considering package dependencies) is done with nx to prove to be working well on Cristal.
Regarding code moves, I currently only included packages from Cristal that are used directly or indirectly for Blocknote. There too, this limited scope is here to keep the size of the change manageable. Further package moves will be planned once the technical aspects are stabilized.
The corresponding packages in xwiki-contrib/cristal will be removed and replaced by the equivalent published on our registries once the release of packages proves to be working as intended.
While we try to avoid touching the moved packages, we’ll do another diff to be sure nothing important is lost after the packages are removed.
The history from the cristal repository has been preserved using the documented technique.
After code move, I did the following changes:
- rename the packages from
@xwiki/cristal-*to@xwiki/platform-* - change the version to
17.10.0to align with XS.
Note that I did not change the sources themselves, so the cristal keyword is still used in quite a few places, mainly in TypeScript and Vue files.
Conclusion
Sorry for the dense discussion. The main point I’d like to have an agreement on are
- the name of the new module
xwiki-platform-node - the choice of the
@xwiki/platform-*prefix (assuming we could later have@xwiki/rendering-*,@xwiki/commons-*or@xwiki/contrib-XXXX-*packages). - the package version moved to
17.10.0to align with XS version
Thanks!