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: Disable corepack auto pin behavior #29627

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Nov 15, 2024

Closes #29146

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-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 pull request has been released as version 0.0.0-pr-29627-sha-69905647. Try it out in a new sandbox by running npx storybook@0.0.0-pr-29627-sha-69905647 sandbox or in an existing project with npx storybook@0.0.0-pr-29627-sha-69905647 upgrade.

More information
Published version 0.0.0-pr-29627-sha-69905647
Triggered by @yannbf
Repository storybookjs/storybook
Branch yann/disable-corepack-pin-issue
Commit 69905647
Datetime Fri Nov 15 14:53:04 UTC 2024 (1731682384)
Workflow run 11858405242

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

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 78.5 MB 78.5 MB 0 B 1.22 0%
initSize 144 MB 144 MB 296 B 1.23 0%
diffSize 65.2 MB 65.2 MB 296 B 1.63 0%
buildSize 6.87 MB 6.87 MB 0 B -1.22 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B - 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.9 MB 1.9 MB 0 B 1.07 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 1.07 0%
buildPreviewSize 2.99 MB 2.99 MB 0 B -1.22 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 24.9s 6.7s -18s -187ms -1.07 -269.6%
generateTime 21s 28s 6.9s 1.29 🔺24.8%
initTime 19.1s 20.2s 1.1s 3 🔺5.6%
buildTime 8.9s 9s 83ms 0.45 0.9%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.4s 6.1s -263ms 0.79 -4.3%
devManagerResponsive 3.9s 3.7s -261ms 0.33 -7.1%
devManagerHeaderVisible 737ms 658ms -79ms 1.24 🔰-12%
devManagerIndexVisible 828ms 743ms -85ms 1.32 🔰-11.4%
devStoryVisibleUncached 1.3s 1.2s -67ms 1.21 -5.3%
devStoryVisible 786ms 745ms -41ms 1.75 🔰-5.5%
devAutodocsVisible 508ms 413ms -95ms -1.67 🔰-23%
devMDXVisible 460ms 531ms 71ms 0.27 13.4%
buildManagerHeaderVisible 667ms 638ms -29ms 0.81 -4.5%
buildManagerIndexVisible 703ms 662ms -41ms 0.84 -6.2%
buildStoryVisible 668ms 610ms -58ms 0.47 -9.5%
buildAutodocsVisible 564ms 513ms -51ms 0.34 -9.9%
buildMDXVisible 528ms 556ms 28ms 1.66 🔺5%

Greptile Summary

Modified JsPackageManagerFactory to prevent unwanted package manager version pinning by disabling Corepack's auto-pin behavior across npm, pnpm, yarn, and bun version checks.

  • Added COREPACK_ENABLE_AUTO_PIN='0' environment variable to all package manager version checks in code/core/src/common/js-package-manager/JsPackageManagerFactory.ts
  • Added COREPACK_ENABLE_STRICT='0' environment variable for additional Corepack control
  • Prevents automatic injection of package manager specifications into package.json files
  • Maintains consistent behavior across all supported package managers (npm, pnpm, yarn, bun)

@yannbf yannbf added bug cli patch:yes Bugfix & documentation PR that need to be picked to main branch ci:normal labels Nov 15, 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.

LGTM

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

Copy link

nx-cloud bot commented Nov 15, 2024

☁️ Nx Cloud Report

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

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Nov 15, 2024

Package Benchmarks

Commit: bd5a918, ran on 18 November 2024 at 13:29:22 UTC

No significant changes detected, all good. 👏

@yannbf yannbf merged commit b2f3fc9 into next Nov 18, 2024
60 checks passed
@yannbf yannbf deleted the yann/disable-corepack-pin-issue branch November 18, 2024 14:02
shilman pushed a commit that referenced this pull request Nov 20, 2024
…issue

CLI: Disable corepack auto pin behavior
(cherry picked from commit b2f3fc9)
yannbf added a commit that referenced this pull request Nov 20, 2024
…issue

CLI: Disable corepack auto pin behavior
(cherry picked from commit b2f3fc9)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ci:normal cli 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
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Storybook injecting packageManager pnpm 8.1.0 when you run npm run storybook
2 participants