Skip to content
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

Merged
merged 2 commits into from
Feb 23, 2021
Merged

feat: shim reporter from gatsby #29669

merged 2 commits into from
Feb 23, 2021

Conversation

wardpeet
Copy link
Contributor

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]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 22, 2021
import {
extractFieldWithoutUnion,
extractAllCollectionSegments,
switchToPeriodDelimiters,
stripTrailingSlash,
} from "./path-utils"

type Reporter = typeof reporter
Copy link
Contributor Author

@wardpeet wardpeet Feb 22, 2021

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

Copy link
Contributor

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

@LekoArts LekoArts added topic: reporter and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Feb 22, 2021
@wardpeet wardpeet merged commit 249905a into master Feb 23, 2021
@wardpeet wardpeet deleted the shim/reporter branch February 23, 2021 06:52
This was referenced Mar 12, 2021
This was referenced Mar 17, 2021
mwfrost pushed a commit to mwfrost/gatsby that referenced this pull request Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants