Skip to content

Commit 719515b

Browse files
committed
Updated dependencies, Next.js 13
1 parent 7c63b6c commit 719515b

9 files changed

+3368
-6743
lines changed

.eslintrc.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": "next/core-web-vitals",
3+
"rules": {
4+
"@next/next/no-img-element": "off"
5+
}
36
}

components/FeaturesSideNav.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ interface MenuEntry {
8383
children: (string | PageLink)[];
8484
}
8585

86-
function isPageLink(child: PageLink): boolean {
87-
return true;
88-
}
89-
9086
function FeaturesSideNav() {
9187
const router = useRouter();
9288
const pageUrl = router.asPath + "/";
@@ -125,7 +121,7 @@ function FeaturesSideNav() {
125121
<div className="icon-text">
126122
{icon ? (
127123
<span className="icon">
128-
<img src={icon} />
124+
<img src={icon} alt="" />
129125
</span>
130126
) : null}
131127
<span>{pageTitle ?? page.title}</span>

components/ItemIcon.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export interface ItemIconProps {
1010
function ItemIcon({ itemId, nolink }: ItemIconProps) {
1111
const itemInfo = getItemInfo(itemId);
1212

13-
// eslint-disable-next-line @next/next/no-img-element
1413
const icon = (
1514
<img src={itemInfo.icon} alt={itemInfo.displayName} className="item-icon" />
1615
);

components/MdxImage.tsx

+17-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,25 @@ function MdxImage({
1818
if (!src) {
1919
return null;
2020
}
21+
22+
let actualWidth: number|undefined;
23+
if (typeof width === "string") {
24+
actualWidth = parseInt(width);
25+
} else if (typeof width === "number") {
26+
actualWidth = width;
27+
}
28+
let actualHeight: number|undefined;
29+
if (typeof height === "string") {
30+
actualHeight = parseInt(height);
31+
} else if (typeof height === "number") {
32+
actualHeight = height;
33+
}
34+
2135
return (
2236
<Image
23-
alt={alt}
24-
width={width}
25-
height={height}
37+
alt={alt ?? ""}
38+
width={actualWidth}
39+
height={actualHeight}
2640
src={src}
2741
loader={loadImage}
2842
unoptimized

components/loadImage.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { ImageLoader } from "next/image";
2-
import { ImageLoaderProps } from "next/dist/client/image";
1+
import { ImageLoader, ImageLoaderProps } from "next/image";
32

43
const loadImage: ImageLoader = ({ src }: ImageLoaderProps) => {
54
return src;

components/recipes/SmeltingRecipe.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function SmeltingRecipe({ recipe }: SmeltingRecipeProps) {
2121
<div className={css.smeltingInputBox}>
2222
<RecipeIngredient itemIds={recipe.ingredient} />
2323
<div className={css.ingredientBox}>
24-
<img className="item-icon" src={smelt.src} />
24+
<img className="item-icon" src={smelt.src} alt="" />
2525
</div>
2626
</div>
2727
<RecipeArrow />

next.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const path = require("path");
44

55
module.exports = {
6-
swcMinify: true,
6+
output: 'export',
77
reactStrictMode: true,
88
images: {
99
loader: "custom",

package-lock.json

+3,329-6,717
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+14-12
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,37 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7-
"build": "next build && next export",
8-
"start": "next start",
7+
"build": "next build",
8+
"serve": "serve out",
99
"lint": "next lint",
1010
"prettier": "prettier --write .",
1111
"prettier:check": "prettier --check ."
1212
},
1313
"dependencies": {
14-
"@docsearch/react": "^3.0.0-alpha.41",
14+
"@docsearch/react": "^3.5.1",
1515
"@mdi/js": "^6.3.95",
16-
"@mdi/react": "^1.5.0",
17-
"@mdx-js/loader": "^2.1.1",
18-
"@mdx-js/react": "^1.6.22",
16+
"@mdi/react": "^1.6.1",
17+
"@mdx-js/loader": "^2.3.0",
18+
"@mdx-js/react": "^2.3.0",
1919
"@octokit/rest": "^18.12.0",
2020
"@tippyjs/react": "^4.2.5",
21-
"@types/mdx-js__react": "^1.5.4",
21+
"@types/mdx-js__react": "^1.5.5",
2222
"adm-zip": "^0.5.9",
2323
"bulma": "^0.9.3",
24-
"next": "^12.1.6",
25-
"react": "^17.0.2",
26-
"react-dom": "^17.0.2",
24+
"next": "^13.4.13",
25+
"react": "^18.2.0",
26+
"react-dom": "^18.2.0",
2727
"remark-gfm": "^3.0.1",
28-
"remark-slug": "^7.0.1"
28+
"remark-slug": "^7.0.1",
29+
"serve": "^14.2.0",
30+
"sharp": "^0.32.4"
2931
},
3032
"devDependencies": {
3133
"@next/mdx": "^11.1.2",
3234
"@types/glob": "^7.1.4",
3335
"@types/react": "17.0.27",
3436
"eslint": "7.32.0",
35-
"eslint-config-next": "11.1.2",
37+
"eslint-config-next": "^13.4.13",
3638
"glob": "^7.2.0",
3739
"gray-matter": "^4.0.3",
3840
"image-size": "^1.0.0",

0 commit comments

Comments
 (0)