Closed JReinhold closed 1 month ago
Thanks for the detailed information and the implementation of the indexer API. This was really easy to use.
However, it seems currently it doesn't support type: docs
index results. I've opened https://github.com/storybookjs/storybook/issues/28803 to track this and workaround it by adding a autodocs
tag.
As you know @tobiasdiez, we've been working on a new story indexer API for some time, that is more official and public and actually documented. The API currently used by this addon was "internal" and undocumented. It has officially been deprecated in Storybook 7.5.0 in favor of the new API.
The new API is documented here: storybook.js.org/docs/svelte/api/main-config-indexers
I suggest migrating this addon to the new API for multiple reasons:
The new API is not very different from the old one so migrating should hopefully be straight forward. The biggest difference is that an indexer now doesn't return an instance of
CSFFile
but rather a list of more detailedIndexInput
, allowing the indexer to specify some properties that was not exposed before.The documentation also details how transpiling CSF files is necessary etc. but that should already have been taken care of here as that remains the same.
The deprecation warning is implemented in way that allows addons to support both the new and old API simultaneously if they want to. Storybook 7.4.0+ will use the
experimental_indexers
if found and fallback tostoryIndexers
with a warning. Older versions will usestoryIndexers
with no warnings.The plan is to completely remove support for the old API in Storybook 8.0.
This API is behind an experimental flag right now until we feel like the API is stable It's not because it could potentially be removed since Storybook Core uses it for all story indexing internally.
Feel free to ask any questions as I implemented most of the new API.