Skip to content

Commit

Permalink
Deprecate @storybook/csf-plugin and remove references
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed May 16, 2024
1 parent 9667b1e commit 17a5637
Show file tree
Hide file tree
Showing 14 changed files with 366 additions and 612 deletions.
1 change: 0 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
# /code/lib/core-events/ @ndelangen @kasperpeulen
# /code/lib/core-server/ @ndelangen @JReinhold @tmeasday @shilman
# /code/lib/core-webpack/ @valentinpalkovic @ndelangen
# /code/lib/csf-plugin/ @ndelangen @valentinpalkovic
# /code/lib/csf-tools/ @kasperpeulen @shilman
# /code/lib/docs-tools/ @JReinhold @shilman
# /code/lib/instrumenter/ @yannbf @kasperpeulen
Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default {
};
```

`csfPluginOptions` is an object for configuring `@storybook/csf-plugin`. When set to `null` it tells docs not to run the `csf-plugin` at all, which can be used as an optimization, or if you're already using `csf-plugin` in your `main.js`.
`csfPluginOptions` is an object for configuring using `@storybook/csf-tools` to transform story files. When set to `null` it tells docs not to run the `csf-tools` at all, which can be used as an optimization, or if you're already using `csf-tools` in your `main.js`.

> With the release of version 7.0, it is no longer possible to import `.md` files directly into Storybook using the `transcludeMarkdown` [option](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#importing-plain-markdown-files-with-transcludemarkdown-has-changed). Instead, we recommend using the [`Markdown`](https://storybook.js.org/docs/react/api/doc-block-markdown) Doc Block for importing Markdown files into your Storybook documentation.
Expand Down
2 changes: 1 addition & 1 deletion code/addons/storysource/src/StoryPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const StoryPanel: React.FC<StoryPanelProps> = ({ api }) => {
const { source: loaderSource, locationsMap }: SourceParams = useParameter('storySource', {});
const { source: { originalSource: docsSource } = {} }: DocsParams = useParameter('docs', {});
// prefer to use the source from source-loader, but fallback to
// source provided by csf-plugin for vite usage
// source provided by csf-tools for vite usage
const source = loaderSource || docsSource || 'loading source...';
const currentLocationIndex = locationsMap
? Object.keys(locationsMap).find((key: string) => {
Expand Down
2 changes: 1 addition & 1 deletion code/lib/csf-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CSF Plugin
# [DEPRECATED] CSF Plugin

The CSF plugin reads CSF files and enriches their content via static analysis.
It supports Webpack, Vite, and other bundlers using [unplugin](https://github.com/unjs/unplugin).
Expand Down
2 changes: 1 addition & 1 deletion code/lib/source-loader/src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function transform(inputSource) {

const { source, sourceJson, addsMap } = sourceObject;

// We do this so the source we display doesn't get clobbered by csf-plugin
// We do this so the source we display doesn't get clobbered by csf-tools
const rawSource = await readFile(this.resourcePath, 'utf-8');
const rawJson = sanitizeSource(rawSource);

Expand Down
28 changes: 2 additions & 26 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5213,7 +5213,6 @@ __metadata:
"@storybook/blocks": "workspace:*"
"@storybook/client-logger": "workspace:*"
"@storybook/components": "workspace:*"
"@storybook/csf-plugin": "workspace:*"
"@storybook/csf-tools": "workspace:*"
"@storybook/global": "npm:^5.0.0"
"@storybook/node-logger": "workspace:*"
Expand Down Expand Up @@ -5655,7 +5654,7 @@ __metadata:
"@storybook/client-logger": "workspace:*"
"@storybook/core-common": "workspace:*"
"@storybook/core-events": "workspace:*"
"@storybook/csf-plugin": "workspace:*"
"@storybook/csf-tools": "workspace:*"
"@storybook/node-logger": "workspace:*"
"@storybook/preview": "workspace:*"
"@storybook/preview-api": "workspace:*"
Expand Down Expand Up @@ -6027,16 +6026,6 @@ __metadata:
languageName: unknown
linkType: soft

"@storybook/csf-plugin@workspace:*, @storybook/csf-plugin@workspace:lib/csf-plugin":
version: 0.0.0-use.local
resolution: "@storybook/csf-plugin@workspace:lib/csf-plugin"
dependencies:
"@storybook/csf-tools": "workspace:*"
typescript: "npm:^5.3.2"
unplugin: "npm:^1.3.1"
languageName: unknown
linkType: soft

"@storybook/csf-tools@workspace:*, @storybook/csf-tools@workspace:lib/csf-tools":
version: 0.0.0-use.local
resolution: "@storybook/csf-tools@workspace:lib/csf-tools"
Expand Down Expand Up @@ -6773,7 +6762,6 @@ __metadata:
"@storybook/core-server": "workspace:*"
"@storybook/core-webpack": "workspace:*"
"@storybook/csf": "npm:^0.1.7"
"@storybook/csf-plugin": "workspace:*"
"@storybook/csf-tools": "workspace:*"
"@storybook/docs-tools": "workspace:*"
"@storybook/ember": "workspace:*"
Expand Down Expand Up @@ -9692,7 +9680,7 @@ __metadata:
languageName: node
linkType: hard

"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.2, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0":
"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0":
version: 8.11.3
resolution: "acorn@npm:8.11.3"
bin:
Expand Down Expand Up @@ -28444,18 +28432,6 @@ __metadata:
languageName: node
linkType: hard

"unplugin@npm:^1.3.1":
version: 1.5.1
resolution: "unplugin@npm:1.5.1"
dependencies:
acorn: "npm:^8.11.2"
chokidar: "npm:^3.5.3"
webpack-sources: "npm:^3.2.3"
webpack-virtual-modules: "npm:^0.6.0"
checksum: 10c0/08cee7d100de3b8697d33eaa32405d821d0f51600640ce79e26f4258ddedcd9ac4c022f0453d6d978e9f75fd939ba9553440827987b2b03078f7087f4bef7c96
languageName: node
linkType: hard

"unset-value@npm:^1.0.0":
version: 1.0.0
resolution: "unset-value@npm:1.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"@storybook/core-events": "file:../../../code/lib/core-events",
"@storybook/core-server": "file:../../../code/lib/core-server",
"@storybook/core-webpack": "file:../../../code/lib/core-webpack",
"@storybook/csf-plugin": "file:../../../code/lib/csf-plugin",
"@storybook/csf-tools": "file:../../../code/lib/csf-tools",
"@storybook/docs-tools": "file:../../../code/lib/docs-tools",
"@storybook/ember": "file:../../../code/frameworks/ember",
Expand Down
Loading

0 comments on commit 17a5637

Please sign in to comment.