-
Notifications
You must be signed in to change notification settings - Fork 63
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
Swap deps to local dev lib part 3 #955
Conversation
@@ -3,7 +3,7 @@ const fs = require('fs'); | |||
const { createIgnoreFilter } = require('@hubspot/local-dev-lib/ignoreRules'); | |||
const { isAllowedExtension, getCwd } = require('@hubspot/cli-lib/path'); | |||
const { logger } = require('@hubspot/cli-lib/logger'); | |||
const { walk } = require('@hubspot/cli-lib/lib/walk'); | |||
const { walk } = require('@hubspot/local-dev-lib/fs'); |
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.
There's a small change in the behavior of walk
. It used to log a debug log and then return an empty array. Now it throws on errors in the catch block. We may need to update all of the usages of walk
to catch the thrown error and default to an empty array so we have parity in the behavior.
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.
Ooh good catch!
@@ -1,4 +1,4 @@ | |||
const { trackUsage } = require('@hubspot/cli-lib/api/fileMapper'); | |||
const { trackUsage } = require('@hubspot/local-dev-lib/trackUsage'); |
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.
I realized that our trackUsage in local-dev-lib never returns anything. There are areas in the CLI that rely on a response being returned (like here).
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.
It looks like trackAuthAction
is the only place the return value is used, and nothing uses the return value of trackAuthAction
so I think we're safe to just remove it in the example you linked
@brandenrodgers Fixed both of those things. I have a bit more work on this coming in my following PR, but it looks like the existing |
Description and Context
This switches the following cli-lib deps to local-dev-lib
urls
table
walk
sandboxes
trackUsage
Who to Notify
@brandenrodgers