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 esbuild, broadening version range #29254

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Oct 1, 2024

Closes #29252

What I did

  • upgrade esbuild locally
  • broaden the version range for esbuild

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 pull request has been released as version 0.0.0-pr-29254-sha-27a5decc. 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-29254-sha-27a5decc
Triggered by @JReinhold
Repository storybookjs/storybook
Branch norbert/esbuild-version-sync
Commit 27a5decc
Datetime Tue Oct 1 19:13:31 UTC 2024 (1727810011)
Workflow run 11131918552

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=29254

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.7 MB 77.7 MB 0 B 0.73 0%
initSize 152 MB 152 MB 211 kB -0.93 0.1%
diffSize 73.9 MB 74.2 MB 211 kB -0.93 0.3%
buildSize 6.77 MB 6.77 MB 2.23 kB -1.13 0%
buildSbAddonsSize 1.5 MB 1.5 MB 0 B -1.48 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.83 MB 1.83 MB 2.23 kB -0.85 0.1%
buildSbPreviewSize 270 kB 270 kB 0 B -1.79 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.8 MB 3.8 MB 2.23 kB -1.18 0.1%
buildPreviewSize 2.97 MB 2.97 MB 0 B -0.5 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.6s 21.9s 14.2s 1.27 🔺65%
generateTime 25.4s 22s -3s -403ms 0.47 -15.4%
initTime 18.3s 17.1s -1s -167ms 0.71 -6.8%
buildTime 11.1s 9.1s -1s -985ms -0.89 -21.7%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.8s 8.1s 1.3s 0.82 16.5%
devManagerResponsive 4.4s 5.3s 902ms 1.02 16.8%
devManagerHeaderVisible 596ms 726ms 130ms 0.46 17.9%
devManagerIndexVisible 630ms 757ms 127ms 0.41 16.8%
devStoryVisibleUncached 782ms 1.7s 931ms 1.29 🔺54.3%
devStoryVisible 629ms 758ms 129ms 0.39 17%
devAutodocsVisible 557ms 744ms 187ms 1.55 🔺25.1%
devMDXVisible 523ms 648ms 125ms 0.59 19.3%
buildManagerHeaderVisible 531ms 725ms 194ms 0.76 26.8%
buildManagerIndexVisible 533ms 728ms 195ms 0.65 26.8%
buildStoryVisible 566ms 765ms 199ms 0.62 26%
buildAutodocsVisible 456ms 660ms 204ms 0.55 30.9%
buildMDXVisible 648ms 609ms -39ms 0.36 -6.4%

Greptile Summary

This PR updates the esbuild dependency across multiple package.json files in the Storybook project to align with Vite 5's version.

  • Updated esbuild version range to include ^0.24.0 in code/core/package.json, code/package.json, and scripts/package.json
  • Broadened version range aims to improve compatibility with Vite-based projects
  • Change addresses issue Upgrade distributed esbuild to match Vite 5's #29252, potentially allowing for dependency de-duplication
  • Minor update but requires thorough testing to ensure compatibility with other dependencies
  • No breaking changes expected, but careful verification is recommended

@ndelangen ndelangen self-assigned this Oct 1, 2024
@ndelangen ndelangen added maintenance User-facing maintenance tasks ci:normal labels Oct 1, 2024
@ndelangen ndelangen requested a review from JReinhold October 1, 2024 12:50
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

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

@ndelangen ndelangen changed the title Maintenance: Epgrade esbuild, broadening version range Maintenance: Upgrade esbuild, broadening version range Oct 1, 2024
Copy link

nx-cloud bot commented Oct 1, 2024

☁️ Nx Cloud Report

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

@JReinhold
Copy link
Contributor

Some of the benchmarks in the table look off, what do you think @ndelangen ?

@ndelangen
Copy link
Member Author

It seems this version of esbuild is slightly bigger to install (211kb or so), and produces ever to slightly bigger outputs (2.23kb).

It doesn't seem to make cause any de-duplication of esbuild installation...
At least not in the sandbox we're using to measure the benchmarks.

I'm not sure about it, but I do think widening the version range is something we're pretty forced to do anyway.

@JReinhold
Copy link
Contributor

I was mostly concerned with these, but I don't know how flaky it is?

name before after diff z %
createTime 7.6s 21.9s 14.2s 1.27 🔺65%
devStoryVisibleUncached 782ms 1.7s 931ms 1.29 🔺54.3%

@JReinhold
Copy link
Contributor

It doesn't seem to make cause any de-duplication of esbuild installation...

I made a mistake. I was naively looking at Vite's esbuild version on their main branch, but that doesn't reflect the stable v5 release. The latest v5.4.8 depends on ^0.21.3, which we already have an overlap with, which is why we aren't seeing any difference.

https://github.com/vitejs/vite/blob/0474550c9fe0b252536b8d1f5190b3aca8723b71/packages/vite/package.json#L88

Widening the range is still good though, but it doesn't give us what we had hoped.

@ndelangen
Copy link
Member Author

I was mostly concerned with these, but I don't know how flaky it is?

name before after diff z %
createTime 7.6s 21.9s 14.2s 1.27 🔺65%
devStoryVisibleUncached 782ms 1.7s 931ms 1.29 🔺54.3%

It's quite flaky, so I wouldn't take notice of this.

@ndelangen ndelangen merged commit 64c7d83 into next Oct 2, 2024
58 checks passed
@ndelangen ndelangen deleted the norbert/esbuild-version-sync branch October 2, 2024 10:23
@github-actions github-actions bot mentioned this pull request Oct 2, 2024
7 tasks
@shilman shilman changed the title Maintenance: Upgrade esbuild, broadening version range Core: Upgrade esbuild, broadening version range Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:normal maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade distributed esbuild to match Vite 5's
2 participants