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

Core: Upgrade docs-mdx for smaller install #28552

Merged
merged 3 commits into from
Jul 12, 2024
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Jul 11, 2024

Closes N/A

What I did

Upgrade @storybook/docs-mdx to an ESM-only version that no longer uses babel and runs asynchronously

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

Fire up a sandbox and checks the docs/mdx stories

🦋 Canary release

This pull request has been released as version 0.0.0-pr-28552-sha-be84deb3. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-28552-sha-be84deb3
Triggered by @shilman
Repository storybookjs/storybook
Branch shilman/optimize-docs-mdx
Commit be84deb3
Datetime Thu Jul 11 16:28:00 UTC 2024 (1720715280)
Workflow run 9895111271

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=28552

name before after diff %
createTime 18.5s 19.2s 692ms 3.6%
generateTime 21.7s 21.6s -85ms -0.4%
initTime 24s 22.9s -1s -17ms -4.4%
createSize 0 B 0 B 0 B -
generateSize 76.5 MB 76.5 MB 104 B 0%
initSize 205 MB 198 MB -6.42 MB -3.2%
diffSize 128 MB 122 MB -6.42 MB 🔰-5.3%
buildTime 14.5s 14s -523ms -3.7%
buildSize 7.59 MB 7.59 MB 0 B 0%
buildSbAddonsSize 1.63 MB 1.63 MB 0 B 0%
buildSbCommonSize 195 kB 195 kB 0 B 0%
buildSbManagerSize 2.3 MB 2.3 MB 0 B 0%
buildSbPreviewSize 349 kB 349 kB 0 B 0%
buildStaticSize 0 B 0 B 0 B -
buildPrebuildSize 4.47 MB 4.47 MB 0 B 0%
buildPreviewSize 3.12 MB 3.12 MB 0 B 0%
testBuildTime 0ms 0ms 0ms -
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 -
devPreviewResponsive 8.4s 8.3s -10ms -0.1%
devManagerResponsive 6s 5.8s -248ms -4.2%
devManagerHeaderVisible 744ms 830ms 86ms 🔺10.4%
devManagerIndexVisible 775ms 867ms 92ms 🔺10.6%
devStoryVisibleUncached 1.4s 1.1s -326ms 🔰-27.9%
devStoryVisible 795ms 901ms 106ms 🔺11.8%
devAutodocsVisible 678ms 852ms 174ms 🔺20.4%
devMDXVisible 699ms 760ms 61ms 🔺8%
buildManagerHeaderVisible 736ms 853ms 117ms 🔺13.7%
buildManagerIndexVisible 739ms 856ms 117ms 🔺13.7%
buildStoryVisible 789ms 906ms 117ms 🔺12.9%
buildAutodocsVisible 644ms 699ms 55ms 🔺7.9%
buildMDXVisible 637ms 754ms 117ms 🔺15.5%

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.

PR Summary

  • Upgraded @storybook/docs-mdx to 4.0.0--canary.19.48b6c75.0 in /code/core/package.json
  • Transitioned @storybook/docs-mdx to ESM-only, removing Babel
  • Replaced static import with dynamic import of analyze in /code/core/src/core-server/utils/StoryIndexGenerator.ts
  • Optimized loading and execution of analyze function for better performance

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

Copy link

nx-cloud bot commented Jul 11, 2024

☁️ Nx Cloud Report

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

@shilman shilman merged commit 0b9b164 into next Jul 12, 2024
52 of 53 checks passed
@shilman shilman deleted the shilman/optimize-docs-mdx branch July 12, 2024 04:08
@github-actions github-actions bot mentioned this pull request Jul 12, 2024
33 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.

1 participant