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

Rename meta types for consistency #378

Merged
merged 2 commits into from
Nov 19, 2021
Merged

Rename meta types for consistency #378

merged 2 commits into from
Nov 19, 2021

Conversation

chaance
Copy link
Collaborator

@chaance chaance commented Nov 11, 2021

BREAKING CHANGE: Consumers will need to update their type imports. This renames MetaDescriptor to HtmlMetaDescriptor for better consistency with HtmlLinkDescriptor. remix-server-runtime also exposed a type HTMLLinkDescriptor with inconsistent casing, so I changed that as well.

I've also exported both types from @remix-run/react directly which makes predictive imports in VS Code a little better IMO.

BREAKING CHANGE: Consumers will need to update their type imports. This
renames `MetaDescriptor` to `HtmlMetaDescriptor` for better consistency
with `HtmlLinkDescriptor`. `remix-server-runtime` also exposed a type
`HTMLLinkDescriptor` with inconsistent casing, so I changed that as
well.
[name: string]: string | string[];
}

export type MetaDescriptor = HtmlMetaDescriptor;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This alias is for consistency with LinkDescriptor, even though HtmlMetaDescriptor will only ever be HtmlMetaDescriptor (probably). Gives us a little wiggle room if we ever change that.

@chaance chaance requested review from jacob-ebey and mcansh and removed request for jacob-ebey and mcansh November 11, 2021 18:47
@ryanflorence
Copy link
Member

Sorry I screwed up your doc updates, want to fix the conflicts and then I'll merge :)

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Nov 19, 2021

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for documenting this! 👍 Looks good to me. I'd like someone else to check on this as well because it's a breaking change. jk, looks like you're good to merge once you have conflicts resolved

@ryanflorence ryanflorence merged commit 7d8e97a into dev Nov 19, 2021
@chaance chaance deleted the chance/types branch December 9, 2021 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants