Skip to content

Commit

Permalink
chore: update packages (#46)
Browse files Browse the repository at this point in the history
* update packages.json

* migrating files

* update footer.tsx
  • Loading branch information
meleksomai authored Aug 14, 2024
1 parent f144cfb commit 737bb4b
Show file tree
Hide file tree
Showing 26 changed files with 3,016 additions and 2,211 deletions.
2 changes: 1 addition & 1 deletion apps/somai.me/app/about/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ export default function Head() {
siteName: "Melek Somai",
},
};
return <NextSeo {...updateMeta} useAppDir={true} />;
return <NextSeo {...updateMeta} />;
}
4 changes: 1 addition & 3 deletions apps/somai.me/app/api/spotify/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { type NextRequest } from "next/server";

import { getNowPlaying } from "../../../lib/spotify";

export async function GET() {
Expand Down Expand Up @@ -48,6 +46,6 @@ export async function GET() {
"content-type": "application/json",
"cache-control": "public, s-maxage=60, stale-while-revalidate=30",
},
}
},
);
}
2 changes: 1 addition & 1 deletion apps/somai.me/app/essay/[slug]/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ export default function Head({ params }: { params: { slug: string } }) {
siteName: "Melek Somai",
},
};
return <NextSeo {...updateMeta} useAppDir={true} />;
return <NextSeo {...updateMeta} />;
}
2 changes: 1 addition & 1 deletion apps/somai.me/app/essay/[slug]/section.details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface DetailsSectionProps {
}

export default function DetailsSection(
props: PropsWithChildren<DetailsSectionProps>
props: PropsWithChildren<DetailsSectionProps>,
) {
const { post } = props;
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/somai.me/app/essays/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ export default function Head() {
siteName: "Melek Somai",
},
};
return <NextSeo {...updateMeta} useAppDir={true} />;
return <NextSeo {...updateMeta} />;
}
2 changes: 1 addition & 1 deletion apps/somai.me/app/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const Footer = () => {
external
href="https://www.mcw.edu/departments/medicine/divisions/general-internal-medicine/people/melek-somai-md"
>
Medical College of Wisconsin
MCW
</FooterMenuLink>
<FooterMenuLink href="https://rethinkhealth.io" external>
Rethink Health
Expand Down
2 changes: 1 addition & 1 deletion apps/somai.me/app/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function Head() {
<>
<title>Melek Somai | Personal Website</title>
<meta content="width=device-width, initial-scale=1" name="viewport" />
<NextSeo {...NEXT_SEO_DEFAULT} useAppDir={true} />
<NextSeo {...NEXT_SEO_DEFAULT} />
</>
);
}
11 changes: 5 additions & 6 deletions apps/somai.me/app/og/route.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ImageResponse } from "next/server";
import { ImageResponse } from "next/og";

// Route segment config
export const runtime = "edge";
Expand All @@ -11,11 +11,11 @@ const size = {

// Font
const interBold = fetch(
new URL("../../public/fonts/Inter-Bold.ttf", import.meta.url)
new URL("../../public/fonts/Inter-Bold.ttf", import.meta.url),
).then((res) => res.arrayBuffer());

const interRegular = fetch(
new URL("../../public/fonts/Inter-Regular.ttf", import.meta.url)
new URL("../../public/fonts/Inter-Regular.ttf", import.meta.url),
).then((res) => res.arrayBuffer());

// Image generation
Expand Down Expand Up @@ -81,10 +81,9 @@ export async function GET(request: Request) {
weight: 400,
},
],
}
},
);
} catch (e: any) {
console.log(`${e.message}`);
} catch (e: unknown) {
return new Response(`Failed to generate the image`, {
status: 500,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/somai.me/app/paper/[slug]/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export default function Head({ params }: { params: { slug: string } }) {
siteName: "Melek Somai",
},
};
return <NextSeo {...updateMeta} useAppDir={true} />;
return <NextSeo {...updateMeta} />;
}
2 changes: 1 addition & 1 deletion apps/somai.me/app/papers/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ export default function Head() {
siteName: "Melek Somai",
},
};
return <NextSeo {...updateMeta} useAppDir={true} />;
return <NextSeo {...updateMeta} />;
}
2 changes: 1 addition & 1 deletion apps/somai.me/app/papers/section.popular.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getAllPapers } from "../../lib/papers";

export default async function MostPopularStack() {
const publications = (await getAllPapers()).filter(
(paper) => paper.meta.popular
(paper) => paper.meta.popular,
);
return (
<Stack space="800">
Expand Down
2 changes: 1 addition & 1 deletion apps/somai.me/app/papers/section.publications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default async function PublicationsSection() {
const years = new Set(
publications
.map((a) => new Date(a.publishedAt.iso).getFullYear())
.sort((a, b) => b - a)
.sort((a, b) => b - a),
);
return (
<Stack space="1200">
Expand Down
2 changes: 1 addition & 1 deletion apps/somai.me/components/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Title = forwardRef<any, TitleProps>(
<Text>{description}</Text>
</Stack>
);
}
},
);

Title.displayName = "Title";
2 changes: 1 addition & 1 deletion apps/somai.me/lib/fetcher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default async function fetcher<JSON = any>(
input: RequestInfo,
init?: RequestInit
init?: RequestInit,
): Promise<JSON> {
const res = await fetch(input, init);
return res.json();
Expand Down
2 changes: 1 addition & 1 deletion apps/somai.me/lib/papers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function getPaperBySlug(slug: string): Publication {
"content",
"papers",
"cache",
`${slug}.json`
`${slug}.json`,
);
return JSON.parse(fs.readFileSync(filepath, "utf-8"));
}
Expand Down
4 changes: 0 additions & 4 deletions apps/somai.me/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ const withVanillaExtract = createVanillaExtractPlugin();

const nextConfig = {
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdoc"],
experimental: {
appDir: true,
// mdxRs: true,
},
// Workaround for making Vanilla Extract work with Next.js
// https://github.com/vanilla-extract-css/vanilla-extract/issues/1085#issuecomment-1555986222
webpack: (config) => {
Expand Down
37 changes: 18 additions & 19 deletions apps/somai.me/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,36 @@
"start": "next start"
},
"dependencies": {
"@markdoc/markdoc": "0.2.2",
"@markdoc/markdoc": "0.4.0",
"@radix-ui/react-icons": "1.1.1",
"@thugga/markdoc": "workspace:*",
"@thugga/ui": "workspace:*",
"@vanilla-extract/css": "1.11.0",
"@vanilla-extract/next-plugin": "2.1.3",
"@vercel/analytics": "1.0.1",
"@vercel/og": "0.0.21",
"dayjs": "1.11.4",
"globby": "13.1.2",
"@vanilla-extract/css": "1.15.3",
"@vanilla-extract/next-plugin": "2.4.3",
"@vercel/analytics": "1.3.1",
"@vercel/og": "0.6.2",
"dayjs": "1.11.12",
"globby": "14.0.2",
"gray-matter": "4.0.3",
"isomorphic-unfetch": "3.1.0",
"next": "13.4.12",
"next-seo": "5.15.0",
"next": "14.2.5",
"next-seo": "6.5.0",
"next-themes": "0.2.1",
"nextjs-google-analytics": "2.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "4.10.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-icons": "5.3.0",
"reading-time": "1.5.0",
"swr": "1.3.0"
"swr": "2.2.5"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@types/node": "17.0.12",
"@types/react": "18.0.28",
"eslint": "8.36.0",
"@babel/core": "7.25.2",
"@types/node": "22.2.0",
"@types/react": "18.3.3",
"eslint": "8.57.0",
"eslint-config-thugga": "workspace:*",
"tsconfig": "workspace:*",
"typescript": "4.9.5",
"webpack": "5.88.2"
"webpack": "5.93.0"
},
"private": true
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
},
"devDependencies": {
"eslint-config-thugga": "workspace:*",
"prettier": "2.7.1",
"prettier": "3.3.3",
"syncpack": "8.2.4",
"turbo": "latest"
"turbo": "2.0.12"
},
"engines": {
"npm": ">=7.0.0",
"node": ">=14.0.0"
"node": ">=20.0.0"
},
"private": true,
"workspaces": [
"apps/*",
"packages/*"
]
],
"packageManager": "[email protected]"
}
8 changes: 4 additions & 4 deletions packages/academic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"@citation-js/date": "0.5.1",
"citation-js": "0.6.5",
"commander": "9.4.1",
"dayjs": "1.11.4",
"dayjs": "1.11.12",
"figlet": "1.5.2",
"globby": "13.1.2",
"globby": "14.0.2",
"gray-matter": "4.0.3"
},
"devDependencies": {
"@types/figlet": "1.5.5",
"@types/node": "17.0.12",
"eslint": "8.36.0",
"@types/node": "22.2.0",
"eslint": "8.57.0",
"eslint-config-thugga": "workspace:*",
"tsconfig": "workspace:*",
"tsx": "3.12.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/academic/src/papers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function getPublication(filepath: string): Publication {

export async function listAllPublications(
filepath = "papers",
extension = "*.md"
extension = "*.md",
): Promise<string[]> {
const paths = await globby([path.join(__dirname, filepath, extension)]);
return paths.map((filepath) => path.parse(filepath).name);
Expand All @@ -85,7 +85,7 @@ export async function listAllPublications(

export async function cacheAllPublications(
filepath = "papers",
extension = "*.md"
extension = "*.md",
) {
const paths = await globby([path.join(__dirname, filepath, extension)]);
paths.map((file) => {
Expand All @@ -94,7 +94,7 @@ export async function cacheAllPublications(
fs.writeFileSync(
path.join(`${path.dirname(file)}/cache`, `${slug}.json`),
JSON.stringify(publication),
"utf8"
"utf8",
);
});
}
2 changes: 2 additions & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module.exports = {
"typescript-sort-keys",
],
rules: {
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@next/next/no-html-link-for-pages": "off",
"react/jsx-key": "off",
"react/display-name": "warn",
Expand Down
34 changes: 17 additions & 17 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
"license": "MIT",
"main": "index.js",
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.18.0",
"@typescript-eslint/parser": "5.12.0",
"eslint": "8.36.0",
"eslint-config-next": "13.4.12",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-simple-import-sort": "7.0.0",
"eslint-plugin-sonarjs": "0.13.0",
"eslint-plugin-tsdoc": "0.2.16",
"eslint-plugin-typescript-sort-keys": "2.1.0",
"eslint-plugin-yaml": "0.5.0"
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"eslint": "8.57.0",
"eslint-config-next": "14.2.5",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-markdown": "5.1.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-simple-import-sort": "12.1.1",
"eslint-plugin-sonarjs": "1.0.4",
"eslint-plugin-tsdoc": "0.3.0",
"eslint-plugin-typescript-sort-keys": "3.2.0",
"eslint-plugin-yaml": "1.0.3"
},
"devDependencies": {
"@types/node": "17.0.12",
"eslint": "8.36.0",
"prettier": "2.7.1",
"@types/node": "22.2.0",
"eslint": "8.57.0",
"prettier": "3.3.3",
"typescript": "4.9.5"
},
"publishConfig": {
Expand Down
14 changes: 7 additions & 7 deletions packages/markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
"lint": "eslint ./src/*.ts*"
},
"peerDependencies": {
"@markdoc/markdoc": "0.2.2",
"@markdoc/markdoc": "0.4.0",
"@thugga/ui": "workspace:*",
"react-dom": "18.2.0"
"react-dom": "18.3.1"
},
"dependencies": {
"prism-react-renderer": "1.3.3"
},
"devDependencies": {
"@markdoc/markdoc": "0.2.2",
"@markdoc/markdoc": "0.4.0",
"@thugga/ui": "workspace:*",
"@types/react": "18.0.28",
"@types/react": "18.3.3",
"@types/react-dom": "18.0.11",
"eslint": "8.36.0",
"eslint": "8.57.0",
"eslint-config-thugga": "workspace:*",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"tsconfig": "workspace:*",
"tsup": "5.10.1",
"typescript": "4.9.5"
Expand Down
Loading

0 comments on commit 737bb4b

Please sign in to comment.