Hello all,
Currently the node packages a sharing a common TypeScript configuration, but:
- The resolution is using a relative path (e.g.,
"extends": "@xwiki/platform-tool-tsconfig/tsconfig.json",). This is working but is annoying in case a package needs to be moved. - The configuration cannot be shared more broadly (e.g., with Cristal, or with contrib extensions).
- The coonfiguration is only used inside npm packages of
xwiki-platform-node, but not for other npm packages ofxwiki-platform(i.e.,xwiki-platform-livedata-webjar,xwiki-platform-blocknote-webjar, andxwiki-platform-notifications-webjar).
Therefore, I propose to:
- Start publishing a TypeScript configuration in a package
- This package would be published for each release
- Start using that configuration for
xwiki-platform-livedata-webjar,xwiki-platform-blocknote-webjar, andxwiki-platform-notifications-webjar - Once released, start using it for Cristal as well (since it’s where this config comes from initially).
I propose to name this package @xwiki/platform-tool-tsconfig and it would be located in xwiki-platform-core/xwiki-platform-node/src/main/node/tools/tool-tsconfig.
See for the PoC in this PR: XWIKI-23912: Introduce a shared typescript configuration by manuelleduc · Pull Request #5072 · xwiki/xwiki-platform · GitHub
WDYT?
Thanks