Reset, clean up and bump deps

This commit is contained in:
2024-11-22 22:08:54 +00:00
parent 1e975f56b6
commit 28cf5edc6a
7 changed files with 870 additions and 1096 deletions

View File

@@ -19,13 +19,6 @@ const nextConfig = {
},
],
},
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
};
const millionConfig = {
@@ -37,5 +30,4 @@ const withMDX = createMDX({
// Add markdown plugins here, as desired
});
// export default withMDX(million.next(nextConfig, millionConfig));
export default withMDX(nextConfig);
export default withMDX(million.next(nextConfig, millionConfig));

1908
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,12 +11,12 @@
"lint:fix": "next lint --fix"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.691.0",
"@aws-sdk/client-s3": "^3.693.0",
"@heroicons/react": "^2.1.5",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/bundle-analyzer": "^14.2.18",
"@next/mdx": "^14.2.18",
"@next/bundle-analyzer": "^15.0.3",
"@next/mdx": "^15.0.3",
"@tailwindcss/typography": "^0.5.15",
"@types/better-sqlite3": "^7.6.11",
"@types/mdx": "^2.0.13",
@@ -25,29 +25,29 @@
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"autoprefixer": "^10.4.20",
"babel-plugin-react-compiler": "^0.0.0-experimental-6067d4e-20240924",
"babel-plugin-react-compiler": "^19.0.0-beta-a7bf2bd-20241110",
"better-sqlite3": "^11.5.0",
"drizzle-kit": "^0.28.1",
"drizzle-orm": "^0.36.1",
"eslint": "^9.11.1",
"eslint-config-next": "^15.0.0-rc.0",
"drizzle-orm": "^0.36.3",
"eslint": "^9.15.0",
"eslint-config-next": "^15.0.4-canary.15",
"exif-reader": "^2.0.1",
"framer-motion": "^11.11.15",
"framer-motion": "^11.11.17",
"glob": "^11.0.0",
"million": "^3.1.11",
"next": "15.0.4-canary.2",
"next-auth": "beta",
"next": "15.0.4-canary.15",
"next-auth": "5.0.0-beta.25",
"postcss": "^8.4.49",
"radash": "^12.1.0",
"react": "19.0.0-rc-5c56b873-20241107",
"react-dom": "19.0.0-rc-5c56b873-20241107",
"react": "19.0.0-rc-e1ef8c95-20241115",
"react-dom": "19.0.0-rc-e1ef8c95-20241115",
"react-zoom-pan-pinch": "^3.6.1",
"reflect-metadata": "^0.2.2",
"server-only": "^0.0.1",
"sharp": "^0.33.5",
"tailwind-scrollbar": "^3.1.0",
"tailwindcss": "^3.4.13",
"tailwindcss": "^3.4.15",
"typescript": "^5.6.2",
"yet-another-react-lightbox": "^3.21.6"
"yet-another-react-lightbox": "^3.21.7"
}
}

View File

@@ -1,5 +1,5 @@
import Image from "next/image";
import Lightbox from "@/components/lightbox";
import FilteredLightbox from "@/components/lightbox";
import { type GetPhotos } from "@/app/api/photos/route";
async function getImageData(): Promise<GetPhotos> {
@@ -12,7 +12,7 @@ export default async function Photos(): Promise<React.JSX.Element> {
return (
<div className="mx-auto">
<Lightbox imageData={imageData.images}>
<FilteredLightbox imageData={imageData.images}>
{imageData.images.map((image) => (
<Image
key={image.src}
@@ -27,7 +27,7 @@ export default async function Photos(): Promise<React.JSX.Element> {
placeholder="blur"
/>
))}
</Lightbox>
</FilteredLightbox>
</div>
);
}

View File

@@ -16,11 +16,8 @@ export async function generateStaticParams(): Promise<{slug: string[]}[]> {
}
export default async function Post({params}: {params: Promise<{ slug: string[] }>}): Promise<React.JSX.Element> {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const mdxFile = await import(`../../../../markdown/posts/[...slug]/${(await params).slug.join('/')}.mdx`);
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-return
const Post = dynamic(() => mdxFile);
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return (
<Post/>
);

View File

@@ -22,12 +22,9 @@ async function loadPostDetails(): Promise<postDetails[]> {
const loadPostData = posts.map(async (post) => {
const slug = [post.split('/').at(-1)!.slice(0, -4)];
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const mdxFile = await import(`../../../../src/markdown/posts/[...slug]/${slug.join('/')}.mdx`);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return {
link: getCurrentUrl() + '/posts/' + slug.join('/'),
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
metadata: mdxFile.metadata,
};
});

View File

@@ -63,7 +63,7 @@ function NextJsImage({ slide, offset, rect, unoptimized = false }: {slide: Image
);
}
export function MyLightbox({imageData, children}: {imageData: ImageData[], children: React.JSX.Element[]}): React.JSX.Element {
export function Lightbox({imageData, children}: {imageData: ImageData[], children: React.JSX.Element[]}): React.JSX.Element {
const [active, setActive] = useState<number | null>(null);
return (
@@ -102,7 +102,7 @@ interface UsernameFormElement extends HTMLFormElement {
readonly elements: FormElements
}
export default function Test(props: {imageData: ImageData[], children: React.JSX.Element[]}): React.JSX.Element {
export default function FilteredLightbox(props: {imageData: ImageData[], children: React.JSX.Element[]}): React.JSX.Element {
const [imageData, setImageData] = useState(props.imageData);
function handleSubmit(event: React.FormEvent<UsernameFormElement>): void {
@@ -124,9 +124,9 @@ export default function Test(props: {imageData: ImageData[], children: React.JSX
</div>
<button type="submit">Submit</button>
</form>
<MyLightbox imageData={imageData}>
<Lightbox imageData={imageData}>
{...children}
</MyLightbox>
</Lightbox>
</>
);
}