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

Use @storybook/addon-docs instead of deprecated @storybook/addon-info #119

Closed
sojeri opened this issue Apr 28, 2020 · 2 comments · Fixed by #323 or #348
Closed

Use @storybook/addon-docs instead of deprecated @storybook/addon-info #119

sojeri opened this issue Apr 28, 2020 · 2 comments · Fixed by #323 or #348
Assignees
Labels
type: dependencies Maintaining 3rd-party dependencies type: security Pull requests that address a security vulnerability

Comments

@sojeri
Copy link
Contributor

sojeri commented Apr 28, 2020

Deprecated @storybook/addon-info is pulling in a bad marked dependency via marsky. Although this is already fixed in marked, it is unlikely to be fixed any time soon for marksy: storybookjs/marksy#78. (There were breaking changes which marksy maintainers have yet to resolve; it is a non-trivial fix.)

Since @storybook/addon-info is deprecated, even without the security vulnerability we should be switching to @storybook/addon-docs.

yarn audit output

>> yarn audit
yarn audit v1.22.4
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate      │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ marked                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.6.2                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @storybook/addon-info                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ @storybook/addon-info > marksy > marked                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/812                         │
└───────────────┴──────────────────────────────────────────────────────────────┘
1 vulnerabilities found - Packages audited: 328229
Severity: 1 Moderate
✨  Done in 1.60s.

references

@sojeri sojeri added type: dependencies Maintaining 3rd-party dependencies type: security Pull requests that address a security vulnerability labels Apr 28, 2020
@sojeri sojeri self-assigned this Apr 28, 2020
@haworku haworku assigned haworku and unassigned sojeri Jun 15, 2020
@haworku
Copy link
Contributor

haworku commented Jun 15, 2020

From @sojeri on Slack: "one thing of note is that you can get around the worst of this change by upgrading sb to v6."

Also in SB6 (in beta as of January 2020) TypeScript is zero-config and should work with SB Docs out of the box - https://github.com/storybookjs/storybook/tree/next/addons/docs#typescript-configuration

@haworku haworku removed their assignment Jun 29, 2020
@ahobson
Copy link
Contributor

ahobson commented Jul 15, 2020

I’ve been looking into storybook 5.3.0 in prep for storybook 6, the switch to addon-docs from addon-info and how to get our prop documentation to show up and I’ve finally figured it out.

When we switch from addon-info to addon-docs all stories will have a Happo change because of how things are displayed.

5.3.0 introduces new ways of configuring things that I believe 6.0 will require.

Finally, 6.0 has new typescript config bits that I think simplify our config.

  1. PR to upgrade to 5.3.0 with the new config layout, but still use addon-info. This will also have changes that are needed to support addon-docs, but should work fine with addon-info.
  2. PR to switch to addon-docs with the smallest change possible. This one will have the giant Happo change
  3. Probably by then storybook will be on 6.0 (It's currently on 6.0.0-rc5) and we can upgrade and hopefully don't have any Happo changes
  4. I'll create a separate issue for the typescript config cleanup once we are on 6.0.

@ahobson ahobson self-assigned this Jul 15, 2020
ahobson pushed a commit that referenced this issue Jul 15, 2020
* addon-docs needs the component to be explicitly configured for
  property docs to be generated

references #119
ahobson pushed a commit that referenced this issue Jul 15, 2020
* addon-docs needs the component to be explicitly configured for
  property docs to be generated

references #119
ahobson added a commit that referenced this issue Jul 16, 2020
* feat(storybook): upgrade to 5.3.0, prepare for addon-docs

* addon-docs needs the component to be explicitly configured for
  property docs to be generated

references #119

* Configure happo in preview.js

* Re-add storybook custom-styles
ahobson pushed a commit that referenced this issue Jul 16, 2020
ahobson pushed a commit that referenced this issue Jul 16, 2020
ahobson added a commit that referenced this issue Jul 16, 2020
* feat(storybook): Upgrade babel,jest, remove deprecated types package

* feat(storybook): switch to addon-docs

fixes #119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependencies Maintaining 3rd-party dependencies type: security Pull requests that address a security vulnerability
Projects
None yet
3 participants