chore(deps): drop unused direct dependency lodash#184
Merged
Conversation
`lodash` was declared as a direct dependency and imported in
`ext-antora/generate-index.js` (`const _ = require('lodash')`) but never
actually used — there is no `_.` call anywhere in that file or the rest
of the project; the only `_` occurrences are in comments and string
literals.
Remove the stray import and the dependency. `lodash` has no transitive
dependencies, so the lockfile change is limited to its own entry.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
DeepDiver1975
commented
Jun 22, 2026
DeepDiver1975
left a comment
Member
Author
There was a problem hiding this comment.
🤖 Automated review by Claude Code review agent.
Verdict: clean removal of an unused dependency — verified safe.
I cloned the PR branch (chore/drop-unused-lodash-dep) and confirmed the central correctness claim independently:
- No remaining bare
lodashreferences.grep -rniE "require\(['\"]lodash['\"]\)|from ['\"]lodash['\"]|require\(['\"]lodash/|from ['\"]lodash/"over the whole tree returns nothing. The removedconst _ = require('lodash')inext-antora/generate-index.jswas the only one, and_is never called in that file. - The only surviving
_.token is a comment inext-asciidoc/remote-include-processor.js:112(// Q: use _.difference(...)) — not real usage, correctly left untouched. - Consistent across the three files: dropped from
package.jsondependencies, and thenode_modules/lodashblock + the lockfiledependenciesentry are both gone. Thenode_modules/lodashentry is fully removed (verified absent). lodash.clonedeepandlodash.mergeremain — these are separate standalone packages (transitive deps), distinct from thelodashmonolith, and are correctly preserved.
Checks: Both green — Build documentation (pass) and lint (pass). mergeStateStatus is BLOCKED only because branch protection requires a review (REVIEW_REQUIRED), not because of any failing/pending check; mergeable: MERGEABLE (no conflicts).
No behavioral change. LGTM.
kw-tmueller
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the
lodashdirect dependency and its stray import inext-antora/generate-index.js.Why
lodashis declared as a direct dependency and imported atext-antora/generate-index.js:5(const _ = require('lodash')), but it is never used. There is no_.call anywhere in that file or the rest of the repo — the only_occurrences are in comments (e.g. a// Q: use _.difference(...)note) and string literals (_index,_email-config.adoc).This is a follow-up to #182 (dropping the unused
asciidoctordep). A full re-audit of the remaining dependencies — confirmed independently by a second pass — foundlodashas the only other removable one; all 7 others (@elastic/elasticsearch,antora,asciidoctor-kroki,cheerio,html-entities,js-yaml, plus dev depsbroken-link-checker,http-server) are genuinely used.Changes
ext-antora/generate-index.js— remove the unusedrequire('lodash')import.package.json— remove"lodash": "^4.18.1"fromdependencies.package-lock.json— regenerated;lodashhas no transitive deps, so only its own entry is dropped.Verification
grep -rn "lodash\|_\." ext-antora ext-asciidoc→ only a comment remains, no real usage.cheeriorequire, past the old line 5).package-lock.jsonno longer contains anode_modules/lodashentry.No behavioral change.
🤖 Generated with Claude Code