storybookjs/storybook

[Bug]: The migration removedglobalclientapis report false positive

Open

#24,629 创建于 2023年10月31日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)TypeScript (89,909 star) (10,058 fork)batch import
automigrationsbughelp wantedsev:S3

描述

Describe the bug

When running npx storybook@latest upgrade and in .storybook/preview.tsx you have a property of function named e.g. getStorybookTheme, the removedglobalclientapis migration will trigger a "Manual migration detected" warning on that getStorybook API is deprecated.

So, this is truly a minor one, but it requires me to change the name of the method in order for the migration to run without prompting me to do something.

To Reproduce

  1. Add for example const getStorybookColor = '#fff'; to the .storybook/preview.tsx
  2. run npx storybook@latest upgrade

System

Storybook Environment Info:

  System:
    OS: macOS 12.6.8
    CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 8.19.4 - ~/Work/develop/spx-react-ui/node_modules/.bin/npm <----- active
  Browsers:
    Chrome: 118.0.5993.117
    Safari: 16.6
  npmPackages:
    @storybook/addon-actions: ^7.5.2 => 7.5.2 
    @storybook/addon-docs: ^7.5.2 => 7.5.2 
    @storybook/addon-essentials: ^7.5.2 => 7.5.2 
    @storybook/addon-interactions: ^7.5.2 => 7.5.2 
    @storybook/addon-links: ^7.5.2 => 7.5.2 
    @storybook/addon-mdx-gfm: ^7.5.2 => 7.5.2 
    @storybook/addon-storysource: ^7.5.2 => 7.5.2 
    @storybook/addons: ^7.5.2 => 7.5.2 
    @storybook/blocks: ^7.5.2 => 7.5.2 
    @storybook/core-events: ^7.5.2 => 7.5.2 
    @storybook/jest: ^0.2.3 => 0.2.3 
    @storybook/react: ^7.5.2 => 7.5.2 
    @storybook/react-webpack5: ^7.5.2 => 7.5.2 
    @storybook/testing-library: ^0.2.2 => 0.2.2 
    @storybook/theming: ^7.5.2 => 7.5.2 
    eslint-plugin-storybook: ^0.6.15 => 0.6.15 
    storybook: ^7.5.2 => 7.5.2 
    storybook-dark-mode: ^3.0.1 => 3.0.1

Additional context

No response

贡献者指南