-
Notifications
You must be signed in to change notification settings - Fork 414
refactor: use LocalState from @netlify/dev-utils #7454
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 LocalState from @netlify/dev-utils #7454
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, let's just remove an unused dependency!
src/utils/cli-state.ts
Outdated
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.
👍🏼 appears to be identical, so no need for any other changes
import process from 'process' | ||
|
||
import { deleteProperty, getProperty, hasProperty, setProperty } from 'dot-prop' | ||
import { findUpSync } from 'find-up' |
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.
looks like this is the only use of find-up
, so we can remove it!
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.
Ah it's the only use of findUpSync
but other files do use findUp
from the find-up
package still 😅
Ex: https://github.com/netlify/cli/blob/keanualoua/ex-367-use-localstate-in-netlifydev-utils/src/commands/base-command.ts
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.
wtf, github search lied to me earlier, but now it's showing all the results. my bad!
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.
All good! It does lie sometimes 🤣
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes #EX-367
Replaced all usages of
CLIState
withLocalState
from@netlify/dev-utils
. Deletedcli-state.js
as no longer used.Ref: https://github.com/netlify/primitives/blob/main/packages/dev-utils/src/lib/local-state.ts#L27
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)