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

telemetry: improve addon extraction logic #18868

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Aug 4, 2022

What I did

This PR changes the logic in extracting addon names, which were not entirely correct before, e.g. :

'@storybook/preset-create-react-app',
'@storybook/addon-ends-with-js/preset.js',
'@storybook/addon-postcss/dist/index.js',

Similar logic has to be implemented in the eslint-plugin too. Perhaps the addon extraction from main.js + sanitization should be a utility in a package shared between them?

How to test

Run yarn test storybook-metadata

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@yannbf yannbf added patch:yes Bugfix & documentation PR that need to be picked to main branch telemetry labels Aug 4, 2022
@yannbf yannbf force-pushed the yann/sb-641-storybook-metadata-extracts-addons branch from 9f6ed23 to 3840fb1 Compare August 4, 2022 11:26
@shilman shilman added the bug label Aug 4, 2022
@yannbf yannbf force-pushed the yann/sb-641-storybook-metadata-extracts-addons branch from 3840fb1 to 2104842 Compare August 8, 2022 13:23
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@yannbf yannbf merged commit ddef015 into next Aug 10, 2022
@yannbf yannbf deleted the yann/sb-641-storybook-metadata-extracts-addons branch August 10, 2022 05:41
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Aug 17, 2022
shilman pushed a commit that referenced this pull request Aug 17, 2022
…data-extracts-addons

telemetry: improve addon extraction logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 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 telemetry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants