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

CLI: Show constraints in error when getting depndencies #29187

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

andrasczeh
Copy link
Contributor

@andrasczeh andrasczeh commented Sep 23, 2024

Closes #

What I did

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 77.5 MB 77.5 MB 100 B 3.74 0%
initSize 162 MB 162 MB 118 B 0.39 0%
diffSize 85 MB 85 MB 18 B -0.45 0%
buildSize 7.57 MB 7.57 MB 0 B -0.42 0%
buildSbAddonsSize 1.66 MB 1.66 MB 0 B -0.42 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.34 MB 2.34 MB 0 B - 0%
buildSbPreviewSize 352 kB 352 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.55 MB 4.55 MB 0 B -0.42 0%
buildPreviewSize 3.02 MB 3.02 MB 0 B -0.42 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 17.5s 22.7s 5.2s 0.98 22.9%
generateTime 22.8s 19.5s -3s -357ms -0.71 -17.2%
initTime 14.6s 15s 479ms -0.8 3.2%
buildTime 9.9s 10.7s 819ms -0.46 7.6%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.6s 8.7s 2.1s 2.84 🔺24.7%
devManagerResponsive 4.4s 5.7s 1.3s 3 🔺23.7%
devManagerHeaderVisible 782ms 1.1s 355ms 4.57 🔺31.2%
devManagerIndexVisible 817ms 1.1s 356ms 4.14 🔺30.3%
devStoryVisibleUncached 1.3s 2.1s 790ms 3.19 🔺37.3%
devStoryVisible 816ms 1.1s 373ms 4.35 🔺31.4%
devAutodocsVisible 632ms 1s 390ms 3.07 🔺38.2%
devMDXVisible 666ms 1s 421ms 4.83 🔺38.7%
buildManagerHeaderVisible 716ms 895ms 179ms 1.1 20%
buildManagerIndexVisible 722ms 897ms 175ms 0.79 19.5%
buildStoryVisible 782ms 934ms 152ms 0.87 16.3%
buildAutodocsVisible 664ms 881ms 217ms 1.73 🔺24.6%
buildMDXVisible 652ms 858ms 206ms 1.81 🔺24%

Greptile Summary

This PR updates the error message in the latestVersion method of the JsPackageManager class to provide more detailed information about package version constraints.

  • Modified code/core/src/common/js-package-manager/JsPackageManager.ts to include constraint details in error messages
  • Improved error handling for cases where no version satisfies a given constraint for a package
  • Enhanced developer experience by providing more context in package version-related errors
  • This change may help in debugging and resolving dependency issues more efficiently

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

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

@kasperpeulen kasperpeulen self-assigned this Sep 23, 2024
@kasperpeulen kasperpeulen added patch:yes Bugfix & documentation PR that need to be picked to main branch feature request ci:normal labels Sep 23, 2024
Copy link

nx-cloud bot commented Sep 23, 2024

☁️ Nx Cloud Report

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

auto-merge was automatically disabled September 24, 2024 07:06

Head branch was pushed to by a user without write access

@kasperpeulen kasperpeulen changed the title #23619 Show constraints in error when getting depndencies CLI: Show constraints in error when getting depndencies Sep 24, 2024
@kasperpeulen kasperpeulen merged commit 71a3eb4 into storybookjs:next Sep 24, 2024
51 of 52 checks passed
storybook-bot pushed a commit that referenced this pull request Sep 24, 2024
CLI: Show constraints in error when getting depndencies
(cherry picked from commit 71a3eb4)
storybook-bot pushed a commit that referenced this pull request Sep 24, 2024
CLI: Show constraints in error when getting depndencies
(cherry picked from commit 71a3eb4)
storybook-bot pushed a commit that referenced this pull request Sep 24, 2024
CLI: Show constraints in error when getting depndencies
(cherry picked from commit 71a3eb4)
storybook-bot pushed a commit that referenced this pull request Sep 24, 2024
CLI: Show constraints in error when getting depndencies
(cherry picked from commit 71a3eb4)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:normal feature request 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.

2 participants