Skip to content

Commit f60506a

Browse files
committed
fix(codemod): tests after upgrading deps
1 parent d558d40 commit f60506a

File tree

85 files changed

+914
-790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+914
-790
lines changed
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { Typography, TextContainer } from '@react-md/typography';
22

33
export default function Example() {
4-
return (<>
5-
<Typography>Hello</Typography>
6-
<TextContainer>
7-
<Typography>World!</Typography>
8-
<Typography type="headline-1">Headline</Typography>
9-
</TextContainer>
10-
</>);
4+
return (
5+
<>
6+
<Typography>Hello</Typography>
7+
<TextContainer>
8+
<Typography>World!</Typography>
9+
<Typography type="headline-1">Headline</Typography>
10+
</TextContainer>
11+
</>
12+
);
1113
}

packages/codemod/transforms/v3-to-v4/__testfixtures__/javascript/scale-transition-props.output.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import { ScaleTransition } from '@react-md/transition';
33

44
export default function Example() {
55
const [visible, setVisible] = useState(false);
6-
return (<>
7-
<button type="button" onClick={() => setVisible((p) => !p)}>
8-
Toggle
9-
</button>
10-
<ScaleTransition transitionIn={visible}>
11-
<div>Something</div>
12-
</ScaleTransition>
13-
</>);
6+
return (
7+
<>
8+
<button type="button" onClick={() => setVisible((p) => !p)}>
9+
Toggle
10+
</button>
11+
<ScaleTransition transitionIn={visible}>
12+
<div>Something</div>
13+
</ScaleTransition>
14+
</>
15+
);
1416
}

packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/rename-text-to-typography.output.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ const props: TypographyProps = {};
3131
let element: TypographyHTMLElement;
3232

3333
export default function Example() {
34-
return (<>
35-
<Typography>Hello</Typography>
36-
<TextContainer>
37-
<Typography>World!</Typography>
38-
<Typography type="headline-1">Headline</Typography>
39-
</TextContainer>
40-
</>);
34+
return (
35+
<>
36+
<Typography>Hello</Typography>
37+
<TextContainer>
38+
<Typography>World!</Typography>
39+
<Typography type="headline-1">Headline</Typography>
40+
</TextContainer>
41+
</>
42+
);
4143
}

packages/codemod/transforms/v3-to-v4/__testfixtures__/typescript/scale-transition-props.output.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import { ScaleTransition } from "@react-md/transition";
33

44
export default function Example() {
55
const [visible, setVisible] = useState(false);
6-
return (<>
7-
<button type="button" onClick={() => setVisible((p) => !p)}>
8-
Toggle
9-
</button>
10-
<ScaleTransition transitionIn={visible}>
11-
<div>Something</div>
12-
</ScaleTransition>
13-
</>);
6+
return (
7+
<>
8+
<button type="button" onClick={() => setVisible((p) => !p)}>
9+
Toggle
10+
</button>
11+
<ScaleTransition transitionIn={visible}>
12+
<div>Something</div>
13+
</ScaleTransition>
14+
</>
15+
);
1416
}

packages/codemod/transforms/v5-to-v6/__testfixtures__/simple-scss-variables.output.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ const aspectRatio = "16 9";
1515

1616
function Example() {
1717
return (
18-
(<div
18+
<div
1919
style={{
2020
backgroundColor:
2121
"var(--rmd-theme-primary, #9c27b0)",
2222
}}
23-
/>)
23+
/>
2424
);
2525
}

packages/codemod/transforms/v5-to-v6/app-bar/__testfixtures__/ActionMenu.output.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const options = {
2424

2525
export default function ActionMenu(): ReactElement {
2626
return (
27-
(<DropdownMenu
27+
<DropdownMenu
2828
id="main-app-actions"
2929
aria-label="Actions"
3030
menuLabel="Actions"
@@ -44,6 +44,6 @@ export default function ActionMenu(): ReactElement {
4444
>
4545
<PreviousDocsMenuItems />
4646
</DropdownMenu>
47-
</DropdownMenu>)
47+
</DropdownMenu>
4848
);
4949
}

packages/codemod/transforms/v5-to-v6/app-bar/__testfixtures__/GithubLink.output.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ export default function GithubLink({ as }: GithubLinkProps): ReactElement {
2525
</MenuItemLink>
2626
);
2727
}
28-
return (<>
29-
<GithubLinkOriginal {...elementProps} inherit />
30-
<Tooltip {...tooltipProps}>View GitHub</Tooltip>
31-
</>);
28+
return (
29+
<>
30+
<GithubLinkOriginal {...elementProps} inherit />
31+
<Tooltip {...tooltipProps}>View GitHub</Tooltip>
32+
</>
33+
);
3234
}

packages/codemod/transforms/v5-to-v6/app-bar/__testfixtures__/NavHeaderTitle.output.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ import PreviousDocsMenuItems from "./PreviousDocsMenuItems";
1515

1616
export default function NavHeaderTitle(): ReactElement {
1717
const { layout } = useLayoutConfig();
18-
return (<>
19-
<AppBarTitle keyline={!isToggleableLayout(layout)}>react-md</AppBarTitle>
20-
<DropdownMenu
21-
id="version-picker"
22-
icon={<ArrowDropDownSVGIcon />}
23-
anchor={BELOW_INNER_RIGHT_ANCHOR}
24-
buttonChildren={`@v${RMD_MAJOR_VERSION}`}
25-
className={styles.menu}
26-
>
27-
<PreviousDocsMenuItems small />
28-
</DropdownMenu>
29-
</>);
18+
return (
19+
<>
20+
<AppBarTitle keyline={!isToggleableLayout(layout)}>react-md</AppBarTitle>
21+
<DropdownMenu
22+
id="version-picker"
23+
icon={<ArrowDropDownSVGIcon />}
24+
anchor={BELOW_INNER_RIGHT_ANCHOR}
25+
buttonChildren={`@v${RMD_MAJOR_VERSION}`}
26+
className={styles.menu}
27+
>
28+
<PreviousDocsMenuItems small />
29+
</DropdownMenu>
30+
</>
31+
);
3032
}

packages/codemod/transforms/v5-to-v6/app-bar/__testfixtures__/aliased-class-name-constants.output.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export default function Example() {
88
const [prominent, setProminent] = useState(false);
99

1010
return (
11-
(<div
11+
<div
1212
className={cn(styles.content, {})}
1313
>content
14-
</div>)
14+
</div>
1515
);
1616
}
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import { AppBar } from "react-md";
22

33
function Example() {
4-
return (<>
5-
<AppBar as="div">Hello</AppBar>
6-
<AppBar position="fixed">Hello</AppBar>
7-
<AppBar position="fixed" disableFixedElevation>
8-
Hello
9-
</AppBar>
10-
<AppBar>
11-
Hello
12-
</AppBar>
13-
<AppBar>
14-
Hello
15-
</AppBar>
16-
</>);
4+
return (
5+
<>
6+
<AppBar as="div">Hello</AppBar>
7+
<AppBar position="fixed">Hello</AppBar>
8+
<AppBar position="fixed" disableFixedElevation>
9+
Hello
10+
</AppBar>
11+
<AppBar>
12+
Hello
13+
</AppBar>
14+
<AppBar>
15+
Hello
16+
</AppBar>
17+
</>
18+
);
1719
}

0 commit comments

Comments
 (0)