-
Notifications
You must be signed in to change notification settings - Fork 414
refactor: use watchDebounced from @netlify/dev-utils #7467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use watchDebounced from @netlify/dev-utils #7467
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one follow-up
import WSL from 'is-wsl' | ||
import debounce from 'lodash/debounce.js' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this time I don't think github is fooling me 😁 — we can remove this dependency!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This time github isn't fooling you! But we do use other submodules from the lodash
package 😅
Ex: https://github.com/netlify/cli/blob/main/src/commands/base-command.ts
import merge from 'lodash/merge.js'
import pick from 'lodash/pick.js'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Fixes #EX-324
Replaced all usages from cli
watchDebounced
with function from@netlify/dev-utils
package. Removed function fromcommand-helpers.ts
and unused imports.Ref: https://github.com/netlify/primitives/blob/main/packages/dev-utils/src/lib/watch-debounced.ts
For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)