Skip to content

Commit

Permalink
Merge pull request #111 from htbkoo/upgrade-react-scripts
Browse files Browse the repository at this point in the history
Upgraded `react-scripts` to `4.0.3`
  • Loading branch information
htbkoo authored Apr 5, 2022
2 parents 743051b + e82533b commit 05ec39a
Show file tree
Hide file tree
Showing 18 changed files with 5,480 additions and 6,303 deletions.
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hey-personal-portfolio",
"version": "0.6.2",
"version": "0.7.3",
"private": true,
"homepage": "https://htbkoo.github.io/personal-portfolio",
"scripts": {
Expand All @@ -17,6 +17,15 @@
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
],
"plugins": [
"only-warn"
]
},
"browserslist": [
">0.2%",
"not dead",
Expand Down Expand Up @@ -49,15 +58,16 @@
"@types/cheerio": "0.22.30",
"@types/jest": "26.0.20",
"@types/node": "14.14.20",
"@types/react": "17.0.33",
"@types/react-dom": "17.0.10",
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",
"args": "^5.0.0",
"cross-env": "^5.2.0",
"eslint-plugin-only-warn": "^1.0.3",
"jest-when": "^2.2.0",
"mv": "^2.1.1",
"prettier": "^2.2.1",
"prop-types": "15.7.2",
"react-scripts": "3.4.4",
"react-scripts": "4.0.3",
"rimraf": "^2.6.3",
"typescript": "4.6.3"
},
Expand Down
3 changes: 2 additions & 1 deletion src/components/about/AboutInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const useStyles = makeStyles((theme: Theme) => ({
},
}));

export default () => {
const AboutInformation = () => {
const classes = useStyles();
return (
<Paper className={classes.root}>
Expand Down Expand Up @@ -72,3 +72,4 @@ export default () => {
);
}
};
export default AboutInformation;
3 changes: 2 additions & 1 deletion src/components/about/AboutPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from "react";
import Section from "../common/Section";
import AboutInformation from "./AboutInformation";

export default () => (
const AboutPanel = () => (
<Section
id="about"
hasDivider={false}
Expand All @@ -13,3 +13,4 @@ export default () => (
<AboutInformation />
</Section>
);
export default AboutPanel;
17 changes: 9 additions & 8 deletions src/components/common/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ interface SectionProps {
isBodyOpaque?: boolean;
}

export default ({
id,
title,
subtitle,
hasDivider = false,
isBodyOpaque = false,
children,
}: PropsWithChildren<SectionProps>) => {
const Section = ({
id,
title,
subtitle,
hasDivider = false,
isBodyOpaque = false,
children,
}: PropsWithChildren<SectionProps>) => {
const classes = useStyles();
return (
<div id={id} className={classes.section}>
Expand All @@ -51,6 +51,7 @@ export default ({
</div>
);
};
export default Section;

function optionalTitle(title?: string) {
return optionalTypography({ text: title, variant: "h3" });
Expand Down
3 changes: 2 additions & 1 deletion src/components/contact/ContactIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface ContactIconProps {
cappedIconSize?: ContactIconSize;
}

export default ({ metadata, cappedIconSize }: ContactIconProps) => {
const ContactIcon = ({ metadata, cappedIconSize }: ContactIconProps) => {
const classes = useStyles({ cappedIconSize });
return (
<div className={classes.icon}>
Expand All @@ -41,3 +41,4 @@ export default ({ metadata, cappedIconSize }: ContactIconProps) => {
</div>
);
};
export default ContactIcon;
3 changes: 2 additions & 1 deletion src/components/contact/ContactPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const useStyles = makeStyles((theme: Theme) => ({
},
}));

export default () => {
const ContactPanel = () => {
const classes = useStyles();
return (
<Section id="contact" hasDivider={true} title="Contact" subtitle="Check me out at the following!">
Expand All @@ -43,6 +43,7 @@ export default () => {
</Section>
);
};
export default ContactPanel;

function GitHubIcon() {
const color = useGitHubMarkImgColorBasedOnTheme();
Expand Down
3 changes: 2 additions & 1 deletion src/components/page/DrawerItemsWithScrollspy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ interface DrawerItemsWithScrollspyProps {

const EMPIRICAL_OFFSET = -80;

export default (props: DrawerItemsWithScrollspyProps) => {
const DrawerItemsWithScrollspy = (props: DrawerItemsWithScrollspyProps) => {
const classes = useStyles();
const { items } = props;

Expand Down Expand Up @@ -85,6 +85,7 @@ export default (props: DrawerItemsWithScrollspyProps) => {
</React.Fragment>
);
};
export default DrawerItemsWithScrollspy;

function itemToHref(item: string): string {
return `#${item.replace(/ /g, "-").toLowerCase()}`;
Expand Down
3 changes: 2 additions & 1 deletion src/components/page/OldVersionLinkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ const useStyles = makeStyles((theme: Theme) => ({

const OLD_VERSION_URL = "https://codepen.io/htbkoo/";

export default () => {
const OldVersionLinkButton = () => {
const classes = useStyles();
return (
<Button href={OLD_VERSION_URL} variant="contained" color="secondary" className={classes.button}>
View on CodePen
</Button>
);
};
export default OldVersionLinkButton;
3 changes: 2 additions & 1 deletion src/components/page/PageDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface PageDrawerProps {
sectionConfigs: SectionMetadata[];
}

export default (props: PageDrawerProps) => {
const PageDrawer = (props: PageDrawerProps) => {
const classes = useStyles();
const { sectionConfigs } = props;

Expand All @@ -40,6 +40,7 @@ export default (props: PageDrawerProps) => {
</Drawer>
);
};
export default PageDrawer;

function asItems(sectionConfigs: SectionMetadata[]): string[] {
return sectionConfigs.map((config) => config.name);
Expand Down
3 changes: 2 additions & 1 deletion src/components/page/PageMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface PageMainProps {
sectionConfigs: SectionMetadata[];
}

export default (props: PageMainProps) => {
const PageMain = (props: PageMainProps) => {
const classes = useStyles();
const { sectionConfigs } = props;

Expand All @@ -42,3 +42,4 @@ export default (props: PageMainProps) => {
</main>
);
};
export default PageMain;
3 changes: 2 additions & 1 deletion src/components/page/PortfolioPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface PortfolioPageProps {
sectionConfigs: SectionMetadata[];
}

export default ({ sectionConfigs }: PortfolioPageProps) => {
const PortfolioPage = ({ sectionConfigs }: PortfolioPageProps) => {
const [drawerOpen, setDrawerOpen] = useState(false);

const handleDrawerToggle = () => setDrawerOpen((prevDrawerOpen) => !prevDrawerOpen);
Expand All @@ -56,3 +56,4 @@ export default ({ sectionConfigs }: PortfolioPageProps) => {
</div>
);
};
export default PortfolioPage;
3 changes: 2 additions & 1 deletion src/components/page/ResponsivePageDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const DrawerContent = ({ items }: { items: string[] }) => {
);
};

export default (props: ResponsivePageDrawerProps) => {
const ResponsivePageDrawer = (props: ResponsivePageDrawerProps) => {
const classes = useStyles();
const theme = useTheme();

Expand Down Expand Up @@ -83,3 +83,4 @@ export default (props: ResponsivePageDrawerProps) => {
</>
);
};
export default ResponsivePageDrawer;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { PortfolioProps } from "./PortfolioProps";

interface DirectlyDisplayHtmlContentPortfolioProps extends PortfolioProps {}

export default (props: DirectlyDisplayHtmlContentPortfolioProps) => {
const DirectlyDisplayHtmlContentPortfolio = (props: DirectlyDisplayHtmlContentPortfolioProps) => {
const { title, link, content } = props;
return (
<div>
Expand All @@ -15,3 +15,4 @@ export default (props: DirectlyDisplayHtmlContentPortfolioProps) => {
</div>
);
};
export default DirectlyDisplayHtmlContentPortfolio;
3 changes: 2 additions & 1 deletion src/components/portfolio/EmbeddedPenPortfolio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const MAPPING_HEIGHTS: { [b in Breakpoint]: number } = {
xl: 768,
};

export default (props: EmbeddedPenPortfolioProps) => {
const EmbeddedPenPortfolio = (props: EmbeddedPenPortfolioProps) => {
const classes = useStyles();
const width = useWidth();

Expand All @@ -50,3 +50,4 @@ export default (props: EmbeddedPenPortfolioProps) => {
</div>
);
};
export default EmbeddedPenPortfolio;
3 changes: 2 additions & 1 deletion src/components/portfolio/EmbeddedPenPortfolios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Props {
rssFeedUrl: string;
}

export default ({ parser, rssFeedUrl }: Props) => {
const EmbeddedPenPortfolios = ({ parser, rssFeedUrl }: Props) => {
const [loaded, setLoaded] = useState(false);
const [items, setItems] = useState<Items[]>([]);

Expand Down Expand Up @@ -43,3 +43,4 @@ export default ({ parser, rssFeedUrl }: Props) => {
</div>
);
};
export default EmbeddedPenPortfolios;
3 changes: 2 additions & 1 deletion src/components/portfolio/PortfoliosPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface PortfoliosPanelProps {
portfoliosFactory: PortfoliosFactory;
}

export default ({ portfoliosFactory }: PortfoliosPanelProps) => {
const PortfoliosPanel = ({ portfoliosFactory }: PortfoliosPanelProps) => {
const classes = useStyles();

const [portfolios, setPortfolios] = useState<React.ReactNode>([]);
Expand All @@ -30,3 +30,4 @@ export default ({ portfoliosFactory }: PortfoliosPanelProps) => {
</Section>
);
};
export default PortfoliosPanel;
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
"strict": true,
"noImplicitAny": false,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve"
"jsx": "react-jsx",
},
"include": [
"src"
Expand Down
Loading

0 comments on commit 05ec39a

Please sign in to comment.