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

Next.js: Use latest version when init in empty directory #30659

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Feb 25, 2025

Closes #

What I did

  • I've changed the create script for empty inits so that the latest version of Next.js is installed

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 79.9 MB 79.9 MB 0 B 2.22 0%
initSize 79.9 MB 79.9 MB 0 B 2.22 0%
diffSize 97 B 97 B 0 B - 0%
buildSize 7.45 MB 7.45 MB 0 B 2 0%
buildSbAddonsSize 1.9 MB 1.9 MB 0 B 0.25 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.88 MB 1.88 MB 0 B -0.92 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.97 MB 3.97 MB 0 B -1.22 0%
buildPreviewSize 3.47 MB 3.47 MB 0 B 2 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.7s 6.6s -10s -73ms -1.2 -151.5%
generateTime 19.4s 17.8s -1s -631ms -1.22 -9.1%
initTime 4.4s 4.3s -102ms -0.67 -2.3%
buildTime 9.6s 8.2s -1s -415ms -1.12 -17.2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.9s 4.6s -371ms -0.87 -8%
devManagerResponsive 4.8s 4.4s -374ms -0.87 -8.4%
devManagerHeaderVisible 694ms 744ms 50ms -0.1 6.7%
devManagerIndexVisible 765ms 756ms -9ms -0.3 -1.2%
devStoryVisibleUncached 2.6s 2.6s -8ms 2.12 -0.3%
devStoryVisible 1.1s 1.1s -2ms 1.58 -0.2%
devAutodocsVisible 1.1s 972ms -200ms 1.09 -20.6%
devMDXVisible 1s 1s 21ms 1.59 2%
buildManagerHeaderVisible 776ms 840ms 64ms 0.84 7.6%
buildManagerIndexVisible 785ms 854ms 69ms 0.66 8.1%
buildStoryVisible 760ms 831ms 71ms 0.98 8.5%
buildAutodocsVisible 768ms 773ms 5ms 0.93 0.6%
buildMDXVisible 745ms 765ms 20ms 1.62 2.6%

Greptile Summary

This PR updates Next.js project creation in empty directories to use the latest version and enable Turbopack for better development performance.

  • Removed version constraint (@^14) from Next.js installation commands in code/lib/create-storybook/src/scaffold-new-project.ts
  • Added --turbopack flag to all Next.js creation commands (npm, yarn, pnpm)
  • Ensures new Storybook projects with Next.js will use the most current version rather than being pinned to v14
  • Enables Turbopack as the development server for improved performance in Next.js projects

Sorry, something went wrong.

@valentinpalkovic valentinpalkovic self-assigned this Feb 25, 2025
@valentinpalkovic valentinpalkovic added bug nextjs cli ci:daily Run the CI jobs that normally run in the daily job. labels Feb 25, 2025
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

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

Copy link

nx-cloud bot commented Feb 25, 2025

View your CI Pipeline Execution ↗ for commit bd87cc5.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 56s View ↗

☁️ Nx Cloud last updated this comment at 2025-03-02 13:51:04 UTC

@valentinpalkovic valentinpalkovic merged commit 47be500 into next Mar 6, 2025
106 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/fix-sandbox-generation-for-nextjs branch March 6, 2025 06:56
@github-actions github-actions bot mentioned this pull request Mar 6, 2025
18 tasks
@valentinpalkovic valentinpalkovic added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Mar 6, 2025
@github-actions github-actions bot mentioned this pull request Mar 14, 2025
12 tasks
kasperpeulen pushed a commit that referenced this pull request Mar 14, 2025
…ation-for-nextjs

Next.js: Use latest version when init in empty directory

(cherry picked from commit 47be500)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ci:daily Run the CI jobs that normally run in the daily job. cli nextjs 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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants