build: remove unused lodash.debounce dependency - #26
Open
HeversonSilva-gif wants to merge 1 commit into
Open
Conversation
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.
Description of change
lodash.debounceis declared independenciesand@types/lodash.debounceindevDependencies, but neither is imported anywhere in the project. Debouncing here isdone by
BytesWriteDebounceinsrc/download/download-engine/streams/download-engine-write-stream/utils/BytesWriteDebounce.ts,which is written from scratch on top of
abortableSleepand does not use lodash.Every install of
ipulltherefore resolves and downloads a package it never loads.Verified at 6954781:
git grep -E "(from|require\(|import\()\s*['\"]lodash\.debounce"returns nothing, andsearching the whole of
src/andtest/for any string starting withlodashalsoreturns nothing. The only matches in the repository are the two manifest entries and
their
package-lock.jsonrecords.npm run build(tsc --build) before the change: exit 0. After: exit 0. This is thecheck that matters most here, since a missing module referenced anywhere in the sources
would fail the build once the package is uninstalled.
npm run lintbefore: 4 problems, 0 errors, 4 warnings, exit 0. After: identical.npm installreportsremoved 3 packages—lodash.debounce,@types/lodash.debounce, and@types/lodash, which came in only as a dependency of thelatter.
Node 20.20.0, npm 10.8.2, on Windows.
What I could not verify:
npm run test. The suite downloads fromhttps://quick-lint-js.comand expects a server onlocalhost:3000, and it did notfinish in my environment. I did not want to tick that box without a run behind it. The
build and lint runs above are on both sides, and no test file references lodash either.
Pull-Request Checklist
mainbranchnpm run formatto apply eslint formatting — N/A, no source file changednpm run testpasses with this change — not run, see the note aboveFixes #0000— N/A, no open issueCONTRIBUTING.md