Skip to content

[Bug]: npx sb@latest upgrade unpins pinned dependencies #28569

Open

Description

Describe the bug

If you have pinned dependencies in package.json

"@storybook/addon-essentials": "8.1.5",
"@storybook/addon-interactions": "8.1.5",
"@storybook/addon-links": "8.1.5",
"@storybook/blocks": "8.1.5",
"@storybook/preview-api": "8.1.5",
"@storybook/react": "8.1.5",
"@storybook/react-vite": "8.1.5",
"@storybook/test": "8.1.5",
"@storybook/theming": "8.1.5",
"@storybook/types": "8.1.5",
"storybook": "8.1.5",

When npx sb@latest upgrade is run, the dependencies should remain pinned.

"@storybook/addon-essentials": "8.2.2",
"@storybook/addon-interactions": "8.2.2",
"@storybook/addon-links": "8.2.2",
"@storybook/blocks": "8.2.2",
"@storybook/preview-api": "8.2.2",
"@storybook/react": "8.2.2",
"@storybook/react-vite": "8.2.2",
"@storybook/test": "8.2.2",
"@storybook/theming": "8.2.2",
"@storybook/types": "8.2.2",
"storybook": "8.2.2",

But it currently adds a ^ caret before the version:

"@storybook/addon-essentials": "^8.2.2",
"@storybook/addon-interactions": "^8.2.2",
"@storybook/addon-links": "^8.2.2",
"@storybook/blocks": "^8.2.2",
"@storybook/preview-api": "^8.2.2",
"@storybook/react": "^8.2.2",
"@storybook/react-vite": "^8.2.2",
"@storybook/test": "^8.2.2",
"@storybook/theming": "^8.2.2",
"@storybook/types": "^8.2.2",
"storybook": "^8.2.2",

Reproduction link

https://storybook.js.org/docs/configure/upgrading

Reproduction steps

  1. Pin dependencies in package.json with previous version of storybook
  2. Run npx sb@latest upgrade

System

Storybook Environment Info:

  System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    npm: 10.8.1 - ~/.nvm/versions/node/v20.11.0/bin/npm <----- active
    pnpm: 8.1.0 - ~/.nvm/versions/node/v20.11.0/bin/pnpm
  Browsers:
    Chrome: 126.0.6478.127
    Safari: 17.5
  npmPackages:
    @storybook/addon-essentials: 8.2.2 => 8.2.2 
    @storybook/addon-interactions: 8.2.2 => 8.2.2 
    @storybook/addon-links: 8.2.2 => 8.2.2 
    @storybook/blocks: 8.2.2 => 8.2.2 
    @storybook/preview-api: 8.2.2 => 8.2.2 
    @storybook/react: 8.2.2 => 8.2.2 
    @storybook/react-vite: 8.2.2 => 8.2.2 
    @storybook/test: 8.2.2 => 8.2.2 
    @storybook/theming: 8.2.2 => 8.2.2 
    @storybook/types: 8.2.2 => 8.2.2 
    chromatic: 11.5.5 => 11.5.5 
    eslint-plugin-storybook: 0.8.0 => 0.8.0 
    storybook: 8.2.2 => 8.2.2 
    storybook-dark-mode: 4.0.2 => 4.0.2 
    storybook-react-i18next: 3.1.1 => 3.1.1

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Empathy Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions