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

CLI: Fix sb add / mdx-gfm for addons with non-serializable values #21731

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

shilman
Copy link
Member

@shilman shilman commented Mar 22, 2023

Closes #21286

What I did

Added new helper functions appendToArray to ConfigFile, which can be used to add addons to arrays that contain complex values like require.resolve or variable references.

Note there are still other places in the code that use the old getValue/setValue method that this replaces, but they are more involved to replace so scoping them out for now.

How to test

  • See attached unit tests
  • Test in a sandbox
    • Edit main.js to contain addons with complex values
    • Run sb add @storybook/addon-docs and verify that it doesn't crash

@shilman shilman merged commit b5d6d6b into next Mar 22, 2023
@shilman shilman deleted the shilman/21286-configfile-complex-array branch March 22, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automigrations: GFM fails with complex addon object
2 participants