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

Frameworks: Add Vite 6 support #29710

Merged
merged 3 commits into from
Nov 26, 2024
Merged

Frameworks: Add Vite 6 support #29710

merged 3 commits into from
Nov 26, 2024

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Nov 26, 2024

Closes #

What I did

This PR increases the version range so projects can use Vite 6

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.5 MB 77.7 MB -799 kB -52.38 -1%
initSize 144 MB 143 MB -790 kB -15.28 -0.6%
diffSize 65.2 MB 65.2 MB 9.2 kB 0.77 0%
buildSize 6.83 MB 6.83 MB 0 B -0.36 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B -3 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B -0.35 0%
buildSbPreviewSize 271 kB 271 kB 0 B -3 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.83 MB 3.83 MB 0 B -0.36 0%
buildPreviewSize 3 MB 3 MB 0 B 0.51 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 6.4s 18.3s 11.9s 0.18 64.9%
generateTime 18.6s 20.5s 1.8s 0.11 9.2%
initTime 13.5s 15.8s 2.3s 0.99 14.8%
buildTime 8.7s 8.7s -41ms -0.04 -0.5%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.5s 6.1s 594ms 0.55 9.6%
devManagerResponsive 3.5s 3.8s 338ms 0.78 8.7%
devManagerHeaderVisible 677ms 665ms -12ms 0.94 -1.8%
devManagerIndexVisible 744ms 749ms 5ms 0.98 0.7%
devStoryVisibleUncached 929ms 1.1s 238ms 0.63 20.4%
devStoryVisible 701ms 701ms 0ms 0.56 0%
devAutodocsVisible 376ms 606ms 230ms 1.62 🔺38%
devMDXVisible 577ms 683ms 106ms 1.18 15.5%
buildManagerHeaderVisible 717ms 559ms -158ms -0.2 -28.3%
buildManagerIndexVisible 753ms 579ms -174ms -0.18 -30.1%
buildStoryVisible 716ms 541ms -175ms -0.38 -32.3%
buildAutodocsVisible 549ms 503ms -46ms 0.15 -9.1%
buildMDXVisible 503ms 444ms -59ms -0.45 -13.3%

Greptile Summary

Updates Vite peer dependency ranges across multiple Storybook framework packages to add support for Vite 6 while maintaining compatibility with versions 4 and 5.

  • Updated @storybook/builder-vite peerDependencies to support Vite ^4.0.0 || ^5.0.0 || ^6.0.0
  • Added Vite 6 support to React, Vue3, Svelte, and SvelteKit framework packages
  • Added Vite 6 support to experimental Next.js and React Native Web packages
  • Potential testing gap: devDependencies still on Vite 4 while supporting up to Vite 6
  • Missing documentation updates and specific testing steps for Vite 6 compatibility

@yannbf yannbf added feature request builder-vite ci:merged Run the CI jobs that normally run when merged. labels Nov 26, 2024
Copy link

nx-cloud bot commented Nov 26, 2024

☁️ Nx Cloud Report

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

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

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

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Nov 26, 2024

Package Benchmarks

Commit: 27a47e8, ran on 26 November 2024 at 13:06:56 UTC

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

@storybook/addon-storysource

Before After Difference
Dependency count 7 7 0
Self size 1.89 MB 1.89 MB 0 B
Dependency size 10.12 MB 10.27 MB 🚨 +142 KB 🚨
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.56 MB 29.60 MB 🚨 +42 KB 🚨
Bundle Size Analyzer Link Link

@storybook/angular

Before After Difference
Dependency count 258 258 0
Self size 362 KB 362 KB 0 B
Dependency size 34.49 MB 34.54 MB 🚨 +42 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 31.96 MB 32.00 MB 🚨 +42 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.10 MB 30.15 MB 🚨 +42 KB 🚨
Bundle Size Analyzer Link Link

@storybook/nextjs

Before After Difference
Dependency count 587 587 0
Self size 464 KB 464 KB 0 B
Dependency size 83.77 MB 83.81 MB 🚨 +42 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.68 MB 29.72 MB 🚨 +42 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.84 MB 40.88 MB 🚨 +42 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.08 MB 31.12 MB 🚨 +42 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.67 MB 37.71 MB 🚨 +42 KB 🚨
Bundle Size Analyzer Link Link

@storybook/vue3-vite

Before After Difference
Dependency count 107 107 0
Self size 15 KB 15 KB 🚨 +10 B 🚨
Dependency size 42.52 MB 42.55 MB 🚨 +33 KB 🚨
Bundle Size Analyzer Link Link

@storybook/vue3-webpack5

Before After Difference
Dependency count 483 483 0
Self size 6 KB 6 KB 0 B
Dependency size 54.08 MB 54.12 MB 🚨 +42 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.73 MB 29.77 MB 🚨 +42 KB 🚨
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 390 390 0
Self size 484 KB 484 KB 0 B
Dependency size 74.48 MB 74.63 MB 🚨 +151 KB 🚨
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 270 270 0
Self size 612 KB 612 KB 0 B
Dependency size 64.48 MB 64.63 MB 🚨 +151 KB 🚨
Bundle Size Analyzer Link Link

create-storybook

Before After Difference
Dependency count 105 105 0
Self size 1.11 MB 1.11 MB 0 B
Dependency size 42.34 MB 42.48 MB 🚨 +142 KB 🚨
Bundle Size Analyzer Link Link

@storybook/source-loader

Before After Difference
Dependency count 5 5 0
Self size 41 KB 41 KB 0 B
Dependency size 10.07 MB 10.21 MB 🚨 +142 KB 🚨
Bundle Size Analyzer Link Link

@storybook/preset-vue3-webpack

Before After Difference
Dependency count 366 366 0
Self size 9 KB 9 KB 0 B
Dependency size 45.00 MB 45.04 MB 🚨 +42 KB 🚨
Bundle Size Analyzer Link Link

@yannbf yannbf added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Nov 26, 2024
@yannbf yannbf force-pushed the yann/support-vite-6 branch from 8de865a to 0e0836a Compare November 26, 2024 11:47
@yannbf yannbf self-assigned this Nov 26, 2024
@yannbf yannbf force-pushed the yann/support-vite-6 branch from 0e0836a to 27a47e8 Compare November 26, 2024 12:57
@yannbf yannbf merged commit 8e5be14 into next Nov 26, 2024
72 checks passed
@yannbf yannbf deleted the yann/support-vite-6 branch November 26, 2024 13:23
yannbf added a commit that referenced this pull request Nov 28, 2024
Frameworks: Add Vite 6 support
(cherry picked from commit 8e5be14)
yannbf added a commit that referenced this pull request Nov 29, 2024
Frameworks: Add Vite 6 support
(cherry picked from commit 8e5be14)
yannbf added a commit that referenced this pull request Nov 29, 2024
Frameworks: Add Vite 6 support
(cherry picked from commit 8e5be14)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder-vite ci:merged Run the CI jobs that normally run when merged. feature request patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants