@storybook/codemod 0.0.0-pr-23724-sha-4dae46aa → 0.0.0-pr-23611-sha-99ac2482
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.
- package/dist/index.d.ts +50 -3
- package/package.json +4 -4
- package/dist/transforms/add-component-parameters.d.ts +0 -22
- package/dist/transforms/csf-hoist-story-annotations.d.ts +0 -26
- package/dist/transforms/move-builtin-addons.d.ts +0 -3
- package/dist/transforms/storiesof-to-csf.d.ts +0 -24
- package/dist/transforms/update-addon-info.d.ts +0 -27
- package/dist/transforms/update-organisation-name.d.ts +0 -25
- package/dist/transforms/upgrade-hierarchy-separators.d.ts +0 -3
package/dist/index.d.ts
CHANGED
@@ -1,7 +1,54 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
declare function transformer$1(file: any, api: any): any;
|
2
|
+
declare const packageNames: {
|
3
|
+
'@kadira/react-storybook-decorator-centered': string;
|
4
|
+
'@kadira/storybook-addons': string;
|
5
|
+
'@kadira/storybook-addon-actions': string;
|
6
|
+
'@kadira/storybook-addon-comments': string;
|
7
|
+
'@kadira/storybook-addon-graphql': string;
|
8
|
+
'@kadira/storybook-addon-info': string;
|
9
|
+
'@kadira/storybook-addon-knobs': string;
|
10
|
+
'@kadira/storybook-addon-links': string;
|
11
|
+
'@kadira/storybook-addon-notes': string;
|
12
|
+
'@kadira/storybook-addon-options': string;
|
13
|
+
'@kadira/storybook-channels': string;
|
14
|
+
'@kadira/storybook-channel-postmsg': string;
|
15
|
+
'@kadira/storybook-channel-websocket': string;
|
16
|
+
'@kadira/storybook-ui': string;
|
17
|
+
'@kadira/react-native-storybook': string;
|
18
|
+
'@kadira/react-storybook': string;
|
19
|
+
'@kadira/getstorybook': string;
|
20
|
+
'@kadira/storybook': string;
|
21
|
+
storyshots: string;
|
22
|
+
getstorybook: string;
|
23
|
+
};
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Takes the deprecated addon-info API, addWithInfo, and
|
27
|
+
* converts to the new withInfo API.
|
28
|
+
*
|
29
|
+
* Example of deprecated addWithInfo API:
|
30
|
+
*
|
31
|
+
* storiesOf('Button')
|
32
|
+
* .addWithInfo(
|
33
|
+
* 'story name',
|
34
|
+
* 'Story description.',
|
35
|
+
* () => (
|
36
|
+
* <Button label="The Button" />
|
37
|
+
* )
|
38
|
+
* )
|
39
|
+
*
|
40
|
+
* Converts to the new withInfo API:
|
41
|
+
*
|
42
|
+
* storiesOf('Button')
|
43
|
+
* .add('story name', withInfo(
|
44
|
+
* 'Story description.'
|
45
|
+
* )(() => (
|
46
|
+
* <Button label="The Button" />
|
47
|
+
* )))
|
48
|
+
*/
|
49
|
+
declare function transformer(file: any, api: any): any;
|
3
50
|
|
4
51
|
declare function listCodemods(): string[];
|
5
52
|
declare function runCodemod(codemod: any, { glob, logger, dryRun, rename, parser }: any): Promise<void>;
|
6
53
|
|
7
|
-
export { listCodemods, runCodemod };
|
54
|
+
export { listCodemods, packageNames, runCodemod, transformer as updateAddonInfo, transformer$1 as updateOrganisationName };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/codemod",
|
3
|
-
"version": "0.0.0-pr-
|
3
|
+
"version": "0.0.0-pr-23611-sha-99ac2482",
|
4
4
|
"description": "A collection of codemod scripts written with JSCodeshift",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -49,9 +49,9 @@
|
|
49
49
|
"@babel/preset-env": "^7.22.9",
|
50
50
|
"@babel/types": "^7.22.5",
|
51
51
|
"@storybook/csf": "^0.1.0",
|
52
|
-
"@storybook/csf-tools": "0.0.0-pr-
|
53
|
-
"@storybook/node-logger": "0.0.0-pr-
|
54
|
-
"@storybook/types": "0.0.0-pr-
|
52
|
+
"@storybook/csf-tools": "0.0.0-pr-23611-sha-99ac2482",
|
53
|
+
"@storybook/node-logger": "0.0.0-pr-23611-sha-99ac2482",
|
54
|
+
"@storybook/types": "0.0.0-pr-23611-sha-99ac2482",
|
55
55
|
"@types/cross-spawn": "^6.0.2",
|
56
56
|
"cross-spawn": "^7.0.3",
|
57
57
|
"globby": "^11.0.2",
|
@@ -1,22 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Adds a `component` parameter for each storiesOf(...) call.
|
3
|
-
*
|
4
|
-
* For example:
|
5
|
-
*
|
6
|
-
* input { Button } from './Button';
|
7
|
-
* storiesOf('Button', module).add('story', () => <Button label="The Button" />);
|
8
|
-
*
|
9
|
-
* Becomes:
|
10
|
-
*
|
11
|
-
* input { Button } from './Button';
|
12
|
-
* storiesOf('Button', module)
|
13
|
-
* .addParameters({ component: Button })
|
14
|
-
* .add('story', () => <Button label="The Button" />);
|
15
|
-
*
|
16
|
-
* Heuristics:
|
17
|
-
* - The storiesOf "kind" name must be Button
|
18
|
-
* - Button must be imported in the file
|
19
|
-
*/
|
20
|
-
declare function transformer(file: any, api: any): any;
|
21
|
-
|
22
|
-
export { transformer as default };
|
@@ -1,26 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Hoist CSF .story annotations
|
3
|
-
*
|
4
|
-
* For example:
|
5
|
-
*
|
6
|
-
* ```
|
7
|
-
* export const Basic = () => <Button />
|
8
|
-
* Basic.story = {
|
9
|
-
* name: 'foo',
|
10
|
-
* parameters: { ... },
|
11
|
-
* decorators = [ ... ],
|
12
|
-
* };
|
13
|
-
* ```
|
14
|
-
*
|
15
|
-
* Becomes:
|
16
|
-
*
|
17
|
-
* ```
|
18
|
-
* export const Basic = () => <Button />
|
19
|
-
* Basic.storyName = 'foo';
|
20
|
-
* Basic.parameters = { ... };
|
21
|
-
* Basic.decorators = [ ... ];
|
22
|
-
* ```
|
23
|
-
*/
|
24
|
-
declare function transformer(file: any, api: any): any;
|
25
|
-
|
26
|
-
export { transformer as default };
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Convert a legacy story API to component story format
|
3
|
-
*
|
4
|
-
* For example:
|
5
|
-
*
|
6
|
-
* ```
|
7
|
-
* input { Button } from './Button';
|
8
|
-
* storiesOf('Button', module).add('story', () => <Button label="The Button" />);
|
9
|
-
* ```
|
10
|
-
*
|
11
|
-
* Becomes:
|
12
|
-
*
|
13
|
-
* ```
|
14
|
-
* input { Button } from './Button';
|
15
|
-
* export default {
|
16
|
-
* title: 'Button'
|
17
|
-
* }
|
18
|
-
* export const story = () => <Button label="The Button" />;
|
19
|
-
*
|
20
|
-
* NOTES: only support chained storiesOf() calls
|
21
|
-
*/
|
22
|
-
declare function transformer(file: any, api: any, options: any): any;
|
23
|
-
|
24
|
-
export { transformer as default };
|
@@ -1,27 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Takes the deprecated addon-info API, addWithInfo, and
|
3
|
-
* converts to the new withInfo API.
|
4
|
-
*
|
5
|
-
* Example of deprecated addWithInfo API:
|
6
|
-
*
|
7
|
-
* storiesOf('Button')
|
8
|
-
* .addWithInfo(
|
9
|
-
* 'story name',
|
10
|
-
* 'Story description.',
|
11
|
-
* () => (
|
12
|
-
* <Button label="The Button" />
|
13
|
-
* )
|
14
|
-
* )
|
15
|
-
*
|
16
|
-
* Converts to the new withInfo API:
|
17
|
-
*
|
18
|
-
* storiesOf('Button')
|
19
|
-
* .add('story name', withInfo(
|
20
|
-
* 'Story description.'
|
21
|
-
* )(() => (
|
22
|
-
* <Button label="The Button" />
|
23
|
-
* )))
|
24
|
-
*/
|
25
|
-
declare function transformer(file: any, api: any): any;
|
26
|
-
|
27
|
-
export { transformer as default };
|
@@ -1,25 +0,0 @@
|
|
1
|
-
declare function transformer(file: any, api: any): any;
|
2
|
-
declare const packageNames: {
|
3
|
-
'@kadira/react-storybook-decorator-centered': string;
|
4
|
-
'@kadira/storybook-addons': string;
|
5
|
-
'@kadira/storybook-addon-actions': string;
|
6
|
-
'@kadira/storybook-addon-comments': string;
|
7
|
-
'@kadira/storybook-addon-graphql': string;
|
8
|
-
'@kadira/storybook-addon-info': string;
|
9
|
-
'@kadira/storybook-addon-knobs': string;
|
10
|
-
'@kadira/storybook-addon-links': string;
|
11
|
-
'@kadira/storybook-addon-notes': string;
|
12
|
-
'@kadira/storybook-addon-options': string;
|
13
|
-
'@kadira/storybook-channels': string;
|
14
|
-
'@kadira/storybook-channel-postmsg': string;
|
15
|
-
'@kadira/storybook-channel-websocket': string;
|
16
|
-
'@kadira/storybook-ui': string;
|
17
|
-
'@kadira/react-native-storybook': string;
|
18
|
-
'@kadira/react-storybook': string;
|
19
|
-
'@kadira/getstorybook': string;
|
20
|
-
'@kadira/storybook': string;
|
21
|
-
storyshots: string;
|
22
|
-
getstorybook: string;
|
23
|
-
};
|
24
|
-
|
25
|
-
export { transformer as default, packageNames };
|