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: Fix wrong Next.js framework reference #28992

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Aug 28, 2024

Closes N/A

What I did

Fixing a wrong import reference in @storybook/experimental-nextjs-vite

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/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 76.5 MB 76.5 MB 0 B 1.61 0%
initSize 161 MB 161 MB 880 B -0.16 0%
diffSize 84.8 MB 84.8 MB 880 B -0.17 0%
buildSize 7.48 MB 7.48 MB 26 B 0.74 0%
buildSbAddonsSize 1.62 MB 1.62 MB 0 B 1.53 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.31 MB 2.31 MB 2 B 0.73 0%
buildSbPreviewSize 352 kB 352 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.47 MB 4.47 MB 2 B 0.74 0%
buildPreviewSize 3.01 MB 3.01 MB 24 B 0.74 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 22.4s 6.9s -15s -478ms -1.31 🔰-223.3%
generateTime 20s 24.5s 4.4s 0.35 18.3%
initTime 16.3s 22.3s 5.9s 1.04 26.8%
buildTime 15.3s 11.6s -3s -698ms -0.88 -31.9%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.8s 7.1s 272ms -0.19 3.8%
devManagerResponsive 4.2s 4.6s 312ms -0.12 6.8%
devManagerHeaderVisible 712ms 784ms 72ms -0.24 9.2%
devManagerIndexVisible 758ms 822ms 64ms -0.25 7.8%
devStoryVisibleUncached 1.3s 1.3s 16ms -0.25 1.2%
devStoryVisible 756ms 820ms 64ms -0.26 7.8%
devAutodocsVisible 646ms 713ms 67ms -0.15 9.4%
devMDXVisible 660ms 759ms 99ms 0.11 13%
buildManagerHeaderVisible 668ms 750ms 82ms 0.03 10.9%
buildManagerIndexVisible 674ms 759ms 85ms 0.02 11.2%
buildStoryVisible 739ms 836ms 97ms 0.18 11.6%
buildAutodocsVisible 609ms 735ms 126ms 0.68 17.1%
buildMDXVisible 652ms 644ms -8ms -0.39 -1.2%

Greptile Summary

This PR updates import references in the experimental Next.js with Vite setup to ensure correct framework usage.

  • Changed import in code/frameworks/experimental-nextjs-vite/src/export-mocks/headers/cookies.ts from '@storybook/nextjs/headers.mock' to '@storybook/experimental-nextjs-vite/headers.mock'
  • Removed unused imports of 'cookies' and 'headers' from '@storybook/nextjs/headers.mock' in code/frameworks/nextjs/src/preview.tsx
  • These changes improve consistency and prevent potential issues related to mismatched mocks in the experimental framework

@valentinpalkovic valentinpalkovic self-assigned this Aug 28, 2024
@valentinpalkovic valentinpalkovic marked this pull request as ready for review August 28, 2024 11:34
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

Copy link

nx-cloud bot commented Aug 28, 2024

☁️ Nx Cloud Report

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

Sent with 💌 from NxCloud.

@valentinpalkovic valentinpalkovic force-pushed the valentin/fix-wrong-nextjs-framework-reference branch from 21cdb52 to 9782906 Compare August 28, 2024 12:53
@ndelangen ndelangen added ci:daily Run the CI jobs that normally run in the daily job. and removed ci:normal labels Aug 29, 2024
@valentinpalkovic valentinpalkovic added ci:daily Run the CI jobs that normally run in the daily job. and removed ci:daily Run the CI jobs that normally run in the daily job. labels Aug 29, 2024
@valentinpalkovic valentinpalkovic merged commit 849fb20 into next Aug 30, 2024
107 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/fix-wrong-nextjs-framework-reference branch August 30, 2024 13:14
@github-actions github-actions bot mentioned this pull request Aug 30, 2024
9 tasks
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. nextjs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants