@storybook/codemod 0.0.0-pr-28882-sha-2310d8df → 0.0.0-pr-28920-sha-480f404a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,17 +3,16 @@
3
3
  *
4
4
  * For example:
5
5
  *
6
- * input { Button } from './Button';
7
- * storiesOf('Button', module).add('story', () => <Button label="The Button" />);
6
+ * Input { Button } from './Button'; storiesOf('Button', module).add('story', () => <Button
7
+ * label="The Button" />);
8
8
  *
9
9
  * Becomes:
10
10
  *
11
- * input { Button } from './Button';
12
- * storiesOf('Button', module)
13
- * .addParameters({ component: Button })
14
- * .add('story', () => <Button label="The Button" />);
11
+ * Input { Button } from './Button'; storiesOf('Button', module) .addParameters({ component: Button
12
+ * }) .add('story', () => <Button label="The Button" />);
15
13
  *
16
14
  * Heuristics:
15
+ *
17
16
  * - The storiesOf "kind" name must be Button
18
17
  * - Button must be imported in the file
19
18
  */
@@ -1,24 +1,24 @@
1
1
  /**
2
2
  * Hoist CSF .story annotations
3
3
  *
4
- * For example:
4
+ * @example
5
5
  *
6
- * ```
6
+ * ```jsx
7
7
  * export const Basic = () => <Button />
8
8
  * Basic.story = {
9
9
  * name: 'foo',
10
- * parameters: { ... },
11
- * decorators = [ ... ],
10
+ * parameters: { },
11
+ * decorators = [ ],
12
12
  * };
13
13
  * ```
14
14
  *
15
15
  * Becomes:
16
16
  *
17
17
  * ```
18
- * export const Basic = () => <Button />
18
+ * export const Basic = () => <Button />;
19
19
  * Basic.storyName = 'foo';
20
- * Basic.parameters = { ... };
21
- * Basic.decorators = [ ... ];
20
+ * Basic.parameters = {};
21
+ * Basic.decorators = [];
22
22
  * ```
23
23
  */
24
24
  declare function transformer(file: any, api: any): any;
@@ -18,6 +18,7 @@
18
18
  * export const story = () => <Button label="The Button" />;
19
19
  *
20
20
  * NOTES: only support chained storiesOf() calls
21
+ * ```
21
22
  */
22
23
  declare function transformer(file: any, api: any, options: any): Promise<any>;
23
24
 
@@ -1,26 +1,22 @@
1
1
  /**
2
- * Takes the deprecated addon-info API, addWithInfo, and
3
- * converts to the new withInfo API.
2
+ * Takes the deprecated addon-info API, addWithInfo, and converts to the new withInfo API.
4
3
  *
5
- * Example of deprecated addWithInfo API:
4
+ * @example Of deprecated addWithInfo API:
6
5
  *
7
- * storiesOf('Button')
8
- * .addWithInfo(
9
- * 'story name',
10
- * 'Story description.',
11
- * () => (
12
- * <Button label="The Button" />
13
- * )
14
- * )
6
+ * ```jsx
7
+ * storiesOf('Button').addWithInfo('story name', 'Story description.', () => (
8
+ * <Button label="The Button" />
9
+ * ));
10
+ * ```
15
11
  *
16
12
  * Converts to the new withInfo API:
17
13
  *
18
- * storiesOf('Button')
19
- * .add('story name', withInfo(
20
- * 'Story description.'
21
- * )(() => (
22
- * <Button label="The Button" />
23
- * )))
14
+ * ```jsx
15
+ * storiesOf('Button').add(
16
+ * 'story name',
17
+ * withInfo('Story description.')(() => <Button label="The Button" />)
18
+ * );
19
+ * ```
24
20
  */
25
21
  declare function transformer(file: any, api: any): any;
26
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/codemod",
3
- "version": "0.0.0-pr-28882-sha-2310d8df",
3
+ "version": "0.0.0-pr-28920-sha-480f404a",
4
4
  "description": "A collection of codemod scripts written with JSCodeshift",
5
5
  "keywords": [
6
6
  "storybook"
@@ -57,7 +57,7 @@
57
57
  "@babel/core": "^7.24.4",
58
58
  "@babel/preset-env": "^7.24.4",
59
59
  "@babel/types": "^7.24.0",
60
- "@storybook/core": "0.0.0-pr-28882-sha-2310d8df",
60
+ "@storybook/core": "0.0.0-pr-28920-sha-480f404a",
61
61
  "@storybook/csf": "^0.1.11",
62
62
  "@types/cross-spawn": "^6.0.2",
63
63
  "cross-spawn": "^7.0.3",