Skip to content

chore(deps): remove dead Elasticsearch search-index builder and unused deps#185

Merged
DeepDiver1975 merged 1 commit into
masterfrom
chore/drop-unused-elasticsearch-deps
Jun 22, 2026
Merged

chore(deps): remove dead Elasticsearch search-index builder and unused deps#185
DeepDiver1975 merged 1 commit into
masterfrom
chore/drop-unused-elasticsearch-deps

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

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=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. Carrying it kept a large transitive dependency tree (the elastic client, cheerio → parse5/entities, html-entities) that is a needless Dependabot attack surface.

Changes

  • Drop @elastic/elasticsearch, cheerio, html-entities from dependencies (sole consumer was the indexer)
  • Delete ext-antora/generate-index.js and its reference in site.yml
  • Delete the orphan es-docker-compose.yml (Elasticsearch dev-stack file, referenced nowhere)
  • Regenerate package-lock.json (343 → 315 locked packages)

js-yaml and asciidoctor-kroki are kept — still in use.

Verification

  • npm install succeeds; lockfile no longer references elastic/cheerio/html-entities
  • npm run antora still produces public/ output (the removed extension was a no-op outside the indexing env). The remaining xref not found warnings are pre-existing — site.yml sets failure_level: none because the standalone build lacks the sibling docs-* content sources.

🤖 Generated with Claude Code

…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 DeepDiver1975 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.yml cleanly removes the ./ext-antora/generate-index.js extension line; its remaining extensions (load-global-site-attributes.js, find-orphaned-files.js, commented-out ones) all still exist on disk.
  • package.json scripts (antora, antora-local, linkcheck, etc.) reference none of the removed pieces.
  • CI (.github/workflows/ci.yml) only runs npm install + npm run antora; no ES/index step. No .drone.star in 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.

@DeepDiver1975 DeepDiver1975 merged commit b988887 into master Jun 22, 2026
2 checks passed
@DeepDiver1975 DeepDiver1975 deleted the chore/drop-unused-elasticsearch-deps branch June 22, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants