Skip to content

Commit 90d80e8

Browse files
authored
deps: Bump Next version to mitigate CVE-2025-29927 (#568)
Bump Next to the last stable version to mitigate CVE-2025-29927 despite this site isn't affected because it's a static website. The new major version required to fix the robots and sitemap files. The build reported warning about using `img` tags instead of `Image`, where the second is more optimal These warnings have been resolved in this commit.
1 parent d9a4711 commit 90d80e8

File tree

8 files changed

+6272
-7637
lines changed

8 files changed

+6272
-7637
lines changed

app/(blog)/blog/page.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -143,28 +143,10 @@ export default function BlogIndex() {
143143
post.excerpt}
144144
</p>
145145
</div>
146-
{/*
147-
<div className="relative flex items-center mt-8 gap-x-4">
148-
<img
149-
src={post.author.imageUrl}
150-
alt=""
151-
className="w-10 h-10 bg-gray-100 rounded-full"
152-
/>
153-
<div className="text-sm leading-6">
154-
<p className="font-semibold text-gray-900">
155-
<a href={post.author.href}>
156-
<span className="absolute inset-0" />
157-
{post.author.name}
158-
</a>
159-
</p>
160-
<p className="text-gray-600">{post.author.role}</p>
161-
</div>
162-
</div>
163-
*/}
164146
</div>
165147
<div className="relative mt-3 flex items-center gap-x-4">
166148
{frontmatter.author && frontmatter.author.imageUrl && (
167-
<img
149+
<LocalImage
168150
src={frontmatter.author.imageUrl}
169151
alt=""
170152
className="h-10 w-10 rounded-full bg-gray-50"

app/robots.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export const dynamic = "force-static"
2+
13
export default function robots() {
24
return {
35
rules: {

app/sitemap.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import {
77
oMountBottomNav,
88
} from '@/markdoc/navigation.mjs'
99

10+
export const dynamic = "force-static"
11+
1012
export default function sitemap() {
1113
return [
1214
dcsBottomNav,

package-lock.json

Lines changed: 6258 additions & 7612 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"dependencies": {
2020
"@algolia/autocomplete-core": "^1.9.2",
21-
"@headlessui/react": "^1.7.17",
21+
"@headlessui/react": "^2.2.4",
2222
"@headlessui/tailwindcss": "^0.1.3",
2323
"@heroicons/react": "^2.0.18",
2424
"@markdoc/markdoc": "^0.3.5",
@@ -33,7 +33,7 @@
3333
"focus-visible": "^5.2.0",
3434
"framer-motion": "^10.16.1",
3535
"js-yaml": "^4.1.0",
36-
"next": "^14.0.2",
36+
"next": "^15.3.5",
3737
"next-themes": "^0.2.1",
3838
"postcss-focus-visible": "^6.0.4",
3939
"postcss-import": "^14.1.0",

src/components/Share.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use client'
2+
import Image from 'next/image'
23
import React from 'react'
34
import { usePathname } from 'next/navigation'
45

@@ -61,7 +62,7 @@ const ShareButtons = ({
6162
)}
6263
{hackernews && (
6364
<a href={hackernews} rel="noreferrer" target="_blank">
64-
<img
65+
<Image
6566
alt="hackernews link"
6667
className="color-red bg-green mr-2 h-10 w-10"
6768
src="/images/misc_logos/hackernews.svg"
@@ -70,7 +71,7 @@ const ShareButtons = ({
7071
)}
7172
{indiehackers && (
7273
<a href={indiehackers} rel="noreferrer" target="_blank">
73-
<img
74+
<Image
7475
alt="indiehackers link"
7576
className="color-red bg-green mr-2 h-10 w-10"
7677
src="/images/misc_logos/indie-hackers.svg"

src/components/bio.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
*/
77

88
import Link from 'next/link'
9+
import LocalImage from '@/components/LocalImage'
910

1011
export default async function Bio({ name = 'Dan Willoughby', image, summary }) {
1112
return (
1213
<div className="my-8 flex flex-col py-2 md:flex-row">
1314
{image && (
1415
<div className="mr-4 inline-flex flex-shrink-0">
15-
<img
16+
<LocalImage
1617
src={image}
1718
alt={name}
1819
className="border-storj-600 h-12 w-12 rounded-full border-2"

src/lib/image-tool.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import sharp from 'sharp'
22
import glob from 'fast-glob'
33
import * as path from 'path'
44
import fs from 'fs'
5+
import Image from 'next/image'
56

67
export function ImageWrap({ src, alt, width, height, noLink }) {
78
let imgStyle = 'xs:max-w-full sm:max-w-sm'
@@ -15,7 +16,7 @@ export function ImageWrap({ src, alt, width, height, noLink }) {
1516
newWidth = (width * newHeight) / height
1617
}
1718
let img = (
18-
<img
19+
<Image
1920
className={`object-fit ${imgStyle}`}
2021
width={newWidth}
2122
height={newHeight}

0 commit comments

Comments
 (0)