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

refactor: update non-exported types from interface to type #2113

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

booc0mtaco
Copy link
Contributor

Change TS convention to consistently use type instead of a mix of type and interface for components. Mark any types that get exported as to be updated at the next major version.

NOTE: some changes come from tweaks to prettier config, so accepting those

Test Plan:

  • Wrote/updated automated tests
  • CI tests / new tests are not applicable
  • Manually tested my changes, and here are the details:

@booc0mtaco booc0mtaco requested a review from a team December 4, 2024 21:14
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.11%. Comparing base (6d4a3f4) to head (393969e).
Report is 2 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2113   +/-   ##
=======================================
  Coverage   97.11%   97.11%           
=======================================
  Files         112      112           
  Lines        2806     2806           
  Branches      763      763           
=======================================
  Hits         2725     2725           
  Misses         77       77           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Dec 4, 2024

size-limit report 📦

Path Size
components 94.59 KB (0%)
styles 29.67 KB (0%)

Copy link
Contributor

@timzchang timzchang left a comment

Choose a reason for hiding this comment

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

Mark any types that get exported as to be updated at the next major version.

Did your strategy change? I'm seeing some exported interfaces being converted to types, and some non exported interfaces being marked for next major version

Also, why the decision to delay some vs update others?

@@ -9,7 +9,7 @@ import Text from '../Text';

import styles from './Card.module.css';

export interface CardProps extends HTMLAttributes<HTMLElement> {
export type CardProps = HTMLAttributes<HTMLElement> & {
Copy link
Contributor

Choose a reason for hiding this comment

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

should these ones instead be marked as todo for next major version?

@@ -6,7 +6,7 @@ import Icon from '../Icon';
import type { IconName } from '../Icon';
import styles from './FieldNote.module.css';

export interface Props {
export type FieldNoteProps = {
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment for these

@booc0mtaco
Copy link
Contributor Author

booc0mtaco commented Dec 9, 2024

Mark any types that get exported as to be updated at the next major version.

Did your strategy change? I'm seeing some exported interfaces being converted to types, and some non exported interfaces being marked for next major version

Also, why the decision to delay some vs update others?

@timzchang Oh, I left out an important word here. exported externally (from src/index.ts). We have some internal exports for components and component tests to use, but the ones i wanted to postpone were those affecting the external API used by consumers.

Changing those would be a breaking change technically, so waiting until the new year to batch together some breaking changes.

@booc0mtaco booc0mtaco merged commit c287243 into next Dec 10, 2024
12 checks passed
@booc0mtaco booc0mtaco deleted the aholloway/EDS-1448 branch December 10, 2024 22:18
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.

2 participants