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: Migrate repo to Nx 20 #29807

Merged
merged 15 commits into from
Dec 4, 2024
Merged

Build: Migrate repo to Nx 20 #29807

merged 15 commits into from
Dec 4, 2024

Conversation

JamesHenry
Copy link
Contributor

@JamesHenry JamesHenry commented Dec 4, 2024

Closes #

What I did

We first migrated to Nx 19 in #29801 to diagnose some issues, then we incorporated those changes into an Nx 20 branch (the latest major version).

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!

Paired with @kasperpeulen and @yannbf on running important commands and verifying cache hits and misses.

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.61 0%
initSize 130 MB 130 MB -4.57 kB 0.55 0%
diffSize 52.4 MB 52.4 MB -4.57 kB -0.32 0%
buildSize 6.75 MB 6.75 MB 0 B -1.1 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.83 0%
buildSbPreviewSize 0 B 0 B 0 B -1.11 -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.57 MB 3.57 MB 0 B -1.1 0%
buildPreviewSize 3.19 MB 3.19 MB 0 B 1.11 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.1s 7.6s 506ms -1.03 6.6%
generateTime 20.5s 21.6s 1s 0.71 5.1%
initTime 13.4s 14.5s 1s 0.42 7.6%
buildTime 10.1s 9.1s -1s -19ms -0.1 -11.1%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.4s 4.5s -891ms -1.2 -19.8%
devManagerResponsive 3.9s 3.4s -506ms -0.67 -14.6%
devManagerHeaderVisible 511ms 527ms 16ms -0.75 3%
devManagerIndexVisible 756ms 578ms -178ms -0.95 -30.8%
devStoryVisibleUncached 1.7s 1.9s 211ms 0.77 10.8%
devStoryVisible 756ms 555ms -201ms -1.13 -36.2%
devAutodocsVisible 578ms 476ms -102ms -0.93 -21.4%
devMDXVisible 507ms 531ms 24ms -0.14 4.5%
buildManagerHeaderVisible 579ms 535ms -44ms -0.55 -8.2%
buildManagerIndexVisible 651ms 613ms -38ms -0.3 -6.2%
buildStoryVisible 514ms 495ms -19ms -0.71 -3.8%
buildAutodocsVisible 414ms 436ms 22ms -0.46 5%
buildMDXVisible 450ms 485ms 35ms 0.12 7.2%

Greptile Summary

This PR updates the repository's build infrastructure by migrating to Nx 20, focusing on configuration updates and dependency management.

  • Updated dependencies in code/package.json to Nx 20.1.4 and related packages (TypeScript 5.4.3, ESLint 8.57.1)
  • Simplified project configurations in code/frameworks/angular/project.json and code/frameworks/vue3/project.json
  • Added new Nx-specific ignore patterns in .gitignore and .prettierignore for .nx/workspace-data
  • Removed deprecated Nx configurations from code/nx.json including cacheDirectory and cli.packageManager settings
  • Removed legacy code/migrations.json file as part of the Nx 20 upgrade

💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!

@kasperpeulen kasperpeulen added ci:normal build Internal-facing build tooling & test updates labels Dec 4, 2024
@kasperpeulen kasperpeulen marked this pull request as ready for review December 4, 2024 12:00
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.

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

"command": "echo '\"nx check vue3\" can only run with the parameter \"-c production\"'",
"description": "We need to expand code/storybook/storybook/scripts/prepare/check.ts"
},
"command": "echo '\"nx check vue3\" can only run with the parameter \"-c production\", we need to expand code/storybook/storybook/scripts/prepare/check.ts'",
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The command field should be under an 'options' object according to Nx executor schema

Copy link

nx-cloud bot commented Dec 4, 2024

☁️ Nx Cloud Report

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

@JamesHenry JamesHenry mentioned this pull request Dec 4, 2024
8 tasks
@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Dec 4, 2024

Package Benchmarks

Commit: 53c66f9, ran on 4 December 2024 at 13:45:49 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 916 KB 695 KB 🎉 -221 KB 🎉
Dependency size 13.86 MB 13.86 MB 0 B
Bundle Size Analyzer Link Link

Copy link
Contributor

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

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

Thanks James!

@kasperpeulen kasperpeulen merged commit 019be35 into storybookjs:next Dec 4, 2024
55 checks passed
@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
Labels
build Internal-facing build tooling & test updates ci:normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants