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

Build: Fix type issues #29558

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Build: Fix type issues #29558

merged 1 commit into from
Nov 7, 2024

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Nov 6, 2024

Closes #

What I did

This PR fixes the check issues which should bring CI back to green.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 78.2 MB 78.2 MB 0 B 1.41 0%
initSize 143 MB 143 MB 14 B 1.41 0%
diffSize 65.1 MB 65.1 MB 14 B 0.99 0%
buildSize 6.88 MB 6.88 MB 14 B 0.94 0%
buildSbAddonsSize 1.51 MB 1.51 MB 14 B Infinity 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.9 MB 1.9 MB 0 B 0.91 0%
buildSbPreviewSize 271 kB 271 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.88 MB 3.88 MB 14 B 0.95 0%
buildPreviewSize 3 MB 3 MB 0 B 0.9 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 7.2s 23s 15.7s 1.48 🔺68.5%
generateTime 20.1s 21.1s 969ms -0.19 4.6%
initTime 14.1s 15s 943ms -0.02 6.2%
buildTime 9.1s 9s -171ms -0.04 -1.9%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.8s 6.1s -727ms 0.01 -11.9%
devManagerResponsive 4s 3.6s -414ms -0.38 -11.4%
devManagerHeaderVisible 592ms 635ms 43ms 0.36 6.8%
devManagerIndexVisible 625ms 673ms 48ms 0.19 7.1%
devStoryVisibleUncached 1.2s 1.1s -64ms 0.51 -5.4%
devStoryVisible 624ms 671ms 47ms 0.23 7%
devAutodocsVisible 586ms 601ms 15ms 0.57 2.5%
devMDXVisible 512ms 488ms -24ms -0.51 -4.9%
buildManagerHeaderVisible 618ms 627ms 9ms 0.45 1.4%
buildManagerIndexVisible 634ms 638ms 4ms 0.38 0.6%
buildStoryVisible 617ms 626ms 9ms 0.45 1.4%
buildAutodocsVisible 502ms 432ms -70ms -0.57 -16.2%
buildMDXVisible 509ms 511ms 2ms 0.41 0.4%

Greptile Summary

This PR focuses on improving TypeScript type safety and fixing type-related issues across multiple components in the Storybook codebase.

  • Added .flat() to array spread operations in Tool.tsx components for both backgrounds and viewport addons
  • Fixed type annotations in viewport addon's Tool.tsx, particularly around PureProps interface
  • Enhanced type safety in scripts/prepare/tools.ts by properly defining PackageJson type with required fields
  • Improved type definitions for array handling in tooltip link lists
  • Removed usage of any types where possible to strengthen type checking

@yannbf yannbf added build Internal-facing build tooling & test updates ci:merged Run the CI jobs that normally run when merged. labels Nov 6, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

nx-cloud bot commented Nov 6, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 9ed9d72. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@yannbf yannbf merged commit 341695c into next Nov 7, 2024
72 of 74 checks passed
@yannbf yannbf deleted the yann/fix-typescript-issues branch November 7, 2024 08:39
@github-actions github-actions bot mentioned this pull request Nov 11, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:merged Run the CI jobs that normally run when merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants