Page MenuHomePhabricator

Replace codex-search package with a separate build in the codex package
Closed, ResolvedPublic2 Estimated Story Points

Description

We build a separate build of Codex that only includes the TypeaheadSearch component and its dependencies, for use in the Vector search bar. Right now, we build that as a separate package in our repo, that has its own package.json, its own Vite config and everything else, and is published as a separate NPM package.

Instead, we should build the search-only build as part of the build process in the main codex package, by passing a different entry point to the build config (which will be much easier once T335323 is done). We should then publish these files as part of the codex package in NPM, and remove the separate codex-search package.

  • A CJS codex-search build is added to the Codex package
  • The codex-search package is removed from the Codex monorepo
  • MediaWiki is migrated to use the new build (see T347342)
  • The @wikimedia/codex-search package on NPM has been deprecated

Event Timeline

Let's make sure this happens before the 1.0 release, since it involves moving some code around and also pulling the codex-search package from NPM or at least archiving it. Maybe this can be the final breaking change before we go into "real" semVer.

Per my comment over in https://phabricator.wikimedia.org/T345687#9146709, I question whether we should continue offering a UMD build of Codex at this point – I don't think we actually need this, and continuing to provide it may limit some of our build options or at least force us to resort to various hacky workflows.

Change 959342 had a related patch set uploaded (by LWatson; author: LWatson):

[design/codex@main] [WIP] Build: Remove codex-search workspace

https://gerrit.wikimedia.org/r/959342

Change 959342 merged by jenkins-bot:

[design/codex@main] build: Remove codex-search workspace

https://gerrit.wikimedia.org/r/959342

egardner updated the task description. (Show Details)
egardner added a subscriber: lwatson.

Change 961452 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update Codex from v0.19.0 to v0.20.0

https://gerrit.wikimedia.org/r/961452

egardner updated the task description. (Show Details)