Page MenuHomePhabricator

Unify external library configuration for Wikibase projects
Open, LowPublic

Description

Several Wikibase JS projects (at least Data Bridge, Tainted References, Termbox) use JavaScript libraries that are not bundled with their build, but provided by ResourceLoader.
In T259468, we set up tests that the versions of those libraries provided by ResourceLoader match the package.json version requirements, and in T271413 we extracted those tests into a standalone library.
However, the configuration of those tests is still separate from the webpack configuration which actually makes those libraries external, as pointed out by @wiese in T271413#6790791.

That was partially fixed for Data Bridge, but not yet for other projects; additionally, it would be nice to restructure the package.json a bit, so that the configuration is not primarily for @wmde/lib-version-check and the vue.config.js reads that config, but that the configuration is a more general “external libraries” configuration which is consumed by both @wmde/lib-version-check and vue.config.js (see an example package.json snippet in T271413#6790791).

Acceptance criteria⛺✨ :

  • Unify configuration, and have it in only one place per repository (rather than duplicated in vue.config.js and package.json
  • Generalize the config in package.json to not be specific to the @wmde/lib-version-check library.
  • Do this in all packages that use the @wmde/lib-version-check library (it was added to them in T259468)
    • Wikibase
    • Data Bridge (client/data-bridge/package.json)
    • Tainted References (view/lib/wikibase-tainted-ref/package.json)
    • Termbox v2
    • WikibaseLexeme