-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat: shim reporter from gatsby #29669
Conversation
import { | ||
extractFieldWithoutUnion, | ||
extractAllCollectionSegments, | ||
switchToPeriodDelimiters, | ||
stripTrailingSlash, | ||
} from "./path-utils" | ||
|
||
type Reporter = typeof reporter |
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'm unsure if there is a better way for this? Maybe also export { IReporter} from gatsby/reporter
cc @ascorbic
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.
Yes, adding a type export would be good. gatsby-cli/lib/reporter/reporter
includes a type export for Reporter
, so you could add export { Reporter } from "gatsby-cli/lib/reporter/reporter"
inside reporter.d.ts
Description
Shimming the reporter in gatsby allows us to refactor it in the future without a breaking change. I was supprised so little packages were relying on the direct import of reporter.
Documentation
Related Issues
[ch23107]