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: Relax peer dep constraint of shim packages #29503

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

kasperpeulen
Copy link
Contributor

@kasperpeulen kasperpeulen commented Oct 31, 2024

What I did

  • Relax peer dep constraint of shim
  • Depend on explicit version of shim packages in renderers/frameworks

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 78 MB 78 MB 0 B 3 0%
initSize 143 MB 143 MB 291 B 0.23 0%
diffSize 65.1 MB 65.1 MB 291 B -0.22 0%
buildSize 6.87 MB 6.87 MB 0 B 0.34 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B 0.25 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.9 MB 1.9 MB 0 B 0.34 0%
buildSbPreviewSize 271 kB 271 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.88 MB 3.88 MB 0 B 0.34 0%
buildPreviewSize 3 MB 3 MB 0 B 4.36 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 15.1s 11.3s -3s -833ms -0.78 -33.9%
generateTime 21.3s 22.6s 1.2s -0.17 5.5%
initTime 15.6s 16.9s 1.3s 0.21 8%
buildTime 8.3s 9.5s 1.1s 0.46 12.1%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 7.4s 6s -1s -445ms -0.47 -24%
devManagerResponsive 4.5s 3.7s -760ms -0.54 -20%
devManagerHeaderVisible 779ms 606ms -173ms -0.41 -28.5%
devManagerIndexVisible 837ms 673ms -164ms -0.41 -24.4%
devStoryVisibleUncached 1.5s 1.1s -458ms -0.04 -41.2%
devStoryVisible 823ms 673ms -150ms -0.35 -22.3%
devAutodocsVisible 624ms 537ms -87ms -0.51 -16.2%
devMDXVisible 610ms 540ms -70ms -0.21 -13%
buildManagerHeaderVisible 603ms 588ms -15ms -0.31 -2.6%
buildManagerIndexVisible 627ms 612ms -15ms -0.22 -2.5%
buildStoryVisible 601ms 587ms -14ms -0.29 -2.4%
buildAutodocsVisible 527ms 489ms -38ms -0.41 -7.8%
buildMDXVisible 457ms 454ms -3ms -0.89 -0.7%

Greptile Summary

Updates peer dependency constraints across multiple deprecated Storybook packages, replacing workspace-scoped versions with explicit version ranges to improve compatibility and installation flexibility.

  • Changes all deprecated packages' peer dependencies from workspace:^ to ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0
  • Affects 16 deprecated packages including core components like builder-manager, channels, core-events
  • Maintains minimum version requirement of 8.2.0 while allowing compatibility with pre-releases up to 8.6.0
  • All packages consistently use the same version range pattern for standardization

@kasperpeulen kasperpeulen added ci:normal patch:yes Bugfix & documentation PR that need to be picked to main branch maintenance User-facing maintenance tasks labels Oct 31, 2024
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.

18 file(s) reviewed, 22 comment(s)
Edit PR Review Bot Settings | Greptile

code/deprecated/channels/package.json Show resolved Hide resolved
@@ -39,7 +39,7 @@
"*.d.ts"
],
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Version range starts at 8.2.0 but package is at 8.5.0-alpha.0 - consider if 8.2.0 is actually compatible

Comment on lines 40 to +41
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding an upper bound version constraint to prevent potential compatibility issues with future major versions

Comment on lines 72 to 74
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding an upper bound version constraint to prevent potential compatibility issues with future major versions

Comment on lines 41 to +42
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The version range allows pre-release versions (e.g. 8.3.0-0) which could potentially introduce instability. Consider if this is intentional.

Comment on lines 42 to +43
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The version range allows pre-release versions (e.g. 8.3.0-0) which could potentially introduce instability. Consider if this is intentional.

Comment on lines 41 to +42
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
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 new peer dependency range starts at 8.2.0 but the package version is 8.5.0-alpha.0, which could allow installation with older major versions that may be incompatible

Comment on lines 41 to +42
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding an upper bound to prevent installation with future major versions that may break compatibility

Comment on lines 41 to +42
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
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 peer dependency range starts at 8.2.0 but the package version is 8.5.0-alpha.0. Consider if packages should work with older 8.x versions or if minimum should be 8.5.0

Comment on lines 41 to +42
"peerDependencies": {
"storybook": "workspace:^"
"storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Including pre-release versions (8.3.0-0, 8.4.0-0, etc) in peer deps may cause npm/yarn to show unnecessary warnings

Copy link
Member

@ndelangen ndelangen left a comment

Choose a reason for hiding this comment

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

Not tested. Looks good on first glance.

Can't wait to delete these shim packages

Copy link

nx-cloud bot commented Oct 31, 2024

☁️ Nx Cloud Report

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

@kasperpeulen kasperpeulen merged commit cb93190 into next Oct 31, 2024
59 checks passed
@kasperpeulen kasperpeulen deleted the kasper/fix-peer-constraints branch October 31, 2024 16:48
kasperpeulen added a commit that referenced this pull request Nov 1, 2024
Core: Relax peer dep constraint of shim packages
(cherry picked from commit cb93190)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Nov 1, 2024
Copy link

@baxitfund baxitfund left a comment

Choose a reason for hiding this comment

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

Approved

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 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.

3 participants