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

[Bug]: incorrect check for peer dependencies in JsPackageManager.writePackageJson #21982

Closed
geertjansen opened this issue Apr 6, 2023 · 3 comments · Fixed by #22006
Closed
Assignees

Comments

@geertjansen
Copy link

geertjansen commented Apr 6, 2023

Describe the bug

I think this line is incorrect:

packageJsonToWrite.dependencies &&

and should be changed like this

  if (
-   packageJsonToWrite.dependencies &&
+   packageJsonToWrite.peerDependencies &&
    Object.keys(packageJsonToWrite.peerDependencies).length === 0
  ) {
    delete packageJsonToWrite.peerDependencies;
  }

To Reproduce

No response

System

No response

Additional context

No response

@shilman
Copy link
Member

shilman commented Apr 10, 2023

Thanks @geertjansen ! #22006

@shilman
Copy link
Member

shilman commented Apr 11, 2023

Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.1 containing PR #22006 that references this issue. Upgrade today to the @future NPM tag to try it out!

npx sb@next upgrade --tag future

@shilman
Copy link
Member

shilman commented Apr 12, 2023

Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.3 containing PR #22006 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb@latest upgrade

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

Successfully merging a pull request may close this issue.

2 participants