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

Addon Test: Replace glob with tinyglobby #29817

Merged
merged 2 commits into from
Dec 5, 2024
Merged

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Dec 5, 2024

This should reduce bundle size by quite a bit. Tinyglobby also has a util that does exactly what we want, including converting Windows paths to glob-compatible paths, so we don't need to convert those paths ourselves.

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 77.7 MB 77.7 MB 0 B 2.26 0%
initSize 130 MB 130 MB 0 B 1.16 0%
diffSize 52.4 MB 52.4 MB 0 B 0.25 0%
buildSize 6.75 MB 6.75 MB 0 B -0.9 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B - 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B 0.87 0%
buildSbPreviewSize 0 B 0 B 0 B -0.9 -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.57 MB 3.57 MB 0 B -0.9 0%
buildPreviewSize 3.19 MB 3.19 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 16.8s 18.1s 1.3s 0.25 7.3%
generateTime 20.7s 19.3s -1s -331ms -0.84 -6.9%
initTime 14.5s 12.8s -1s -688ms -0.46 -13.1%
buildTime 8.4s 8.2s -167ms -0.97 -2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.7s 4.4s -330ms -1.3 🔰-7.4%
devManagerResponsive 3.4s 3.2s -227ms -1.22 -7%
devManagerHeaderVisible 525ms 616ms 91ms 0.2 14.8%
devManagerIndexVisible 594ms 698ms 104ms 0.29 14.9%
devStoryVisibleUncached 1.6s 1.7s 116ms 0.04 6.5%
devStoryVisible 553ms 696ms 143ms 0.3 20.5%
devAutodocsVisible 523ms 385ms -138ms -2.12 🔰-35.8%
devMDXVisible 477ms 492ms 15ms -0.52 3%
buildManagerHeaderVisible 499ms 513ms 14ms -0.7 2.7%
buildManagerIndexVisible 567ms 590ms 23ms -0.49 3.9%
buildStoryVisible 455ms 475ms 20ms -0.78 4.2%
buildAutodocsVisible 402ms 393ms -9ms -0.87 -2.3%
buildMDXVisible 393ms 410ms 17ms -0.65 4.1%

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

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

Copy link

nx-cloud bot commented Dec 5, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d57d02e. 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.

@storybook-pr-benchmarking
Copy link

Package Benchmarks

Commit: d57d02e, ran on 5 December 2024 at 12:17:10 UTC

The following packages have significant changes to their size or dependencies:

@storybook/experimental-addon-test

Before After Difference
Dependency count 61 61 0
Self size 918 KB 799 KB 🎉 -118 KB 🎉
Dependency size 13.86 MB 13.86 MB 0 B
Bundle Size Analyzer Link Link

@storybook/builder-webpack5

Before After Difference
Dependency count 223 223 0
Self size 79 KB 79 KB 0 B
Dependency size 29.64 MB 29.65 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/ember

Before After Difference
Dependency count 250 250 0
Self size 22 KB 22 KB 0 B
Dependency size 32.04 MB 32.05 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/html-webpack5

Before After Difference
Dependency count 233 233 0
Self size 6 KB 6 KB 0 B
Dependency size 30.19 MB 30.20 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/nextjs

Before After Difference
Dependency count 585 585 0
Self size 464 KB 464 KB 0 B
Dependency size 83.85 MB 83.86 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/preact-webpack5

Before After Difference
Dependency count 231 231 0
Self size 6 KB 6 KB 0 B
Dependency size 29.76 MB 29.77 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/react-webpack5

Before After Difference
Dependency count 309 309 0
Self size 6 KB 6 KB 0 B
Dependency size 40.93 MB 40.95 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/server-webpack5

Before After Difference
Dependency count 241 241 0
Self size 14 KB 14 KB 0 B
Dependency size 31.17 MB 31.18 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/svelte-webpack5

Before After Difference
Dependency count 296 296 0
Self size 6 KB 6 KB 0 B
Dependency size 37.75 MB 37.77 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/vue3-webpack5

Before After Difference
Dependency count 482 482 0
Self size 6 KB 6 KB 0 B
Dependency size 54.16 MB 54.18 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/web-components-webpack5

Before After Difference
Dependency count 231 231 0
Self size 5 KB 5 KB 0 B
Dependency size 29.81 MB 29.82 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/preset-html-webpack

Before After Difference
Dependency count 93 93 0
Self size 4 KB 4 KB 0 B
Dependency size 20.21 MB 20.22 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/preset-react-webpack

Before After Difference
Dependency count 182 182 0
Self size 24 KB 24 KB 0 B
Dependency size 30.97 MB 30.98 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@storybook/preset-vue3-webpack

Before After Difference
Dependency count 365 365 0
Self size 9 KB 9 KB 0 B
Dependency size 45.09 MB 45.10 MB 🚨 +13 KB 🚨
Bundle Size Analyzer Link Link

@ghengeveld ghengeveld requested a review from ndelangen December 5, 2024 12:31
@ghengeveld ghengeveld merged commit a197110 into next Dec 5, 2024
60 checks passed
@ghengeveld ghengeveld deleted the replace-glob-with-tinyglobby branch December 5, 2024 13:24
@github-actions github-actions bot mentioned this pull request Dec 5, 2024
11 tasks
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.

2 participants