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 19fb74d
Show file tree
Hide file tree
Showing 14 changed files with 392 additions and 596 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
38 changes: 28 additions & 10 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 @@ -9692,7 +9691,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 @@ -11730,6 +11729,25 @@ __metadata:
languageName: node
linkType: hard

"chokidar@npm:^3.6.0":
version: 3.6.0
resolution: "chokidar@npm:3.6.0"
dependencies:
anymatch: "npm:~3.1.2"
braces: "npm:~3.0.2"
fsevents: "npm:~2.3.2"
glob-parent: "npm:~5.1.2"
is-binary-path: "npm:~2.1.0"
is-glob: "npm:~4.0.1"
normalize-path: "npm:~3.0.0"
readdirp: "npm:~3.6.0"
dependenciesMeta:
fsevents:
optional: true
checksum: 10c0/8361dcd013f2ddbe260eacb1f3cb2f2c6f2b0ad118708a343a5ed8158941a39cb8fb1d272e0f389712e74ee90ce8ba864eece9e0e62b9705cb468a2f6d917462
languageName: node
linkType: hard

"chownr@npm:^1.1.1":
version: 1.1.4
resolution: "chownr@npm:1.1.4"
Expand Down Expand Up @@ -28445,14 +28463,14 @@ __metadata:
linkType: hard

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

Expand Down Expand Up @@ -29496,7 +29514,7 @@ __metadata:
languageName: node
linkType: hard

"webpack-virtual-modules@npm:^0.6.0":
"webpack-virtual-modules@npm:^0.6.0, webpack-virtual-modules@npm:^0.6.1":
version: 0.6.1
resolution: "webpack-virtual-modules@npm:0.6.1"
checksum: 10c0/696bdc1acf3806374bdeb4b9b9856b79ee70b31e92f325dfab9b8c8c7e14bb6ddffa9f895a214770c4fb8fea45a21f34ca64310f74e877292a90f4a9966c9c2f
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 19fb74d

Please sign in to comment.