chore(deps): remove dead Elasticsearch search-index builder and unused deps#185
Conversation
…d deps The `ext-antora/generate-index.js` extension built an Elasticsearch search index, but it only ran when UPDATE_SEARCH_INDEX=true and the ELASTICSEARCH_* env vars were set. The docs site aggregator no longer sets these and no longer ships this extension (search moved to pagefind), so the code path is dead. Removing it lets us drop its sole-consumer dependencies, shrinking the transitive tree and the Dependabot attack surface: - drop @elastic/elasticsearch, cheerio, html-entities (only used by the indexer) - remove the generate-index.js extension and its site.yml reference - delete the orphan es-docker-compose.yml Elasticsearch dev-stack file js-yaml and asciidoctor-kroki are kept (still used). Verified the antora build still produces public/ output. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
DeepDiver1975
left a comment
There was a problem hiding this comment.
🤖 Automated review by Claude Code review agent.
Verdict: looks good — dead-code removal is clean and fully verified.
This drops the dead Elasticsearch search-index builder (ext-antora/generate-index.js), its three sole-consumer deps (@elastic/elasticsearch, cheerio, html-entities), the orphan es-docker-compose.yml, and regenerates the lockfile.
Verified: NO remaining references to the removed code or deps anywhere in the repo.
I cloned the PR head and grepped all *.js/*.json/*.yml/*.star/Makefile/*.sh/*.hbs/*.adoc (excluding package-lock.json) for elasticsearch|generate-index|cheerio|html-entities|es-docker-compose|UPDATE_SEARCH_INDEX|ELASTICSEARCH_ → zero matches.
site.ymlcleanly removes the./ext-antora/generate-index.jsextension line; its remaining extensions (load-global-site-attributes.js,find-orphaned-files.js, commented-out ones) all still exist on disk.package.jsonscripts (antora,antora-local,linkcheck, etc.) reference none of the removed pieces.- CI (
.github/workflows/ci.yml) only runsnpm install+npm run antora; no ES/index step. No.drone.starin this repo.
package.json + lockfile consistency: ✅ The three deps are removed from dependencies, and the lockfile correctly prunes the whole transitive tree (cheerio-select, css-select/css-what, dom-serializer, domhandler, domutils, parse5*, htmlparser2, undici, boolbase, encoding-sniffer, whatwg-*, hpagent, secure-json-parse, nth-check). debug, ms, iconv-lite, safer-buffer are correctly retained but re-flagged dev: true (now only pulled in by dev deps) — consistent.
Obsolescence corroborated: The builder only ran under UPDATE_SEARCH_INDEX=true + ELASTICSEARCH_* env vars, set nowhere in this repo or its CI. The PR description notes search moved to pagefind; nothing here depends on the old ES path, so the code is genuinely dead.
Checks: Build documentation ✅ pass, lint ✅ pass.
Nicely scoped, reduces Dependabot surface, no functional risk. No changes requested.
What
Removes the dead Elasticsearch search-index builder (
ext-antora/generate-index.js) and the npm dependencies that only it consumed.Why
The indexer only executed when
UPDATE_SEARCH_INDEX=trueand theELASTICSEARCH_*env vars were set. The docs site aggregator no longer sets these and no longer ships this extension — search moved to pagefind — so the code path is dead. Carrying it kept a large transitive dependency tree (the elastic client, cheerio → parse5/entities, html-entities) that is a needless Dependabot attack surface.Changes
@elastic/elasticsearch,cheerio,html-entitiesfromdependencies(sole consumer was the indexer)ext-antora/generate-index.jsand its reference insite.ymles-docker-compose.yml(Elasticsearch dev-stack file, referenced nowhere)package-lock.json(343 → 315 locked packages)js-yamlandasciidoctor-krokiare kept — still in use.Verification
npm installsucceeds; lockfile no longer references elastic/cheerio/html-entitiesnpm run antorastill producespublic/output (the removed extension was a no-op outside the indexing env). The remainingxref not foundwarnings are pre-existing —site.ymlsetsfailure_level: nonebecause the standalone build lacks the siblingdocs-*content sources.🤖 Generated with Claude Code