Skip to content

Commit 52f1893

Browse files
fvictoriomds1
andauthored
Update nextjs to the latest version (#73)
* Update nextjs to the latest version * Fixes after upgrading to nextjs 14 * ci: fix lint check and remove duplicate job * style: ignore package.json, run fmt * chore: absolute import * ci: ignore lickfile diff * ci: ignore lockfile diff * fix: react does not recognize the prop to resolve, we pin react to an older version until a fix is out: vercel/next.js#65161 --------- Co-authored-by: Matt Solomon <[email protected]>
1 parent 41f974f commit 52f1893

File tree

6 files changed

+53
-66
lines changed

6 files changed

+53
-66
lines changed

.github/workflows/ci.yml

+1-14
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,5 @@ jobs:
3232
- name: Check linting and formatting
3333
run: bun check
3434

35-
chain-list:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- uses: actions/checkout@v4
39-
- uses: oven-sh/setup-bun@v1
40-
41-
- name: Install dependencies
42-
run: bun install
43-
44-
- name: Generate list of chains for the UI
45-
run: bun prepare-chain-data
46-
47-
# When this fails, run `bun prepare-chain-data` locally and commit the changes
4835
- name: Ensure no diff
49-
run: git diff --exit-code script/data
36+
run: git diff --exit-code -- ':!bun.lockb'

biome.jsonc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
33
"files": {
4-
"ignore": ["archive/**/*", ".next/**/*"]
4+
"ignore": ["archive/**/*", ".next/**/*", "package.json"]
55
},
66
"organizeImports": {
77
"enabled": true

bun.lockb

3.48 KB
Binary file not shown.

package.json

+47-47
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
{
2-
"name": "evm-diff",
3-
"version": "0.1.0",
4-
"private": true,
5-
"scripts": {
6-
"dev": "bun prepare-chain-data && NEXT_PUBLIC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) next dev",
7-
"build": "NEXT_PUBLIC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) next build",
8-
"start": "bun prepare-chain-data && NEXT_PUBLIC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) next start",
9-
"lint": "next lint --fix && tsc --noEmit && bunx @biomejs/biome lint --apply .",
10-
"fmt": "bunx @biomejs/biome format --write .",
11-
"check": "bun prepare-chain-data && bun lint && bun fmt",
12-
"fetch-data": "bash script/main.sh",
13-
"prepare-chain-data": "bash script/prepare-chain-data.sh"
14-
},
15-
"dependencies": {
16-
"@headlessui/react": "^1.7.16",
17-
"@heroicons/react": "^2.0.17",
18-
"@vercel/analytics": "^1.0.1",
19-
"@vercel/og": "^0.5.10",
20-
"@wagmi/chains": "^0.3.1",
21-
"next": "^13.4.12",
22-
"next-themes": "^0.2.1",
23-
"react": "18.2.0",
24-
"react-diff-viewer-continued": "^3.4.0",
25-
"react-dom": "18.2.0",
26-
"react-markdown": "^8.0.7",
27-
"sharp": "^0.33.4",
28-
"viem": "^1.5.0"
29-
},
30-
"devDependencies": {
31-
"@biomejs/biome": "^1.7.2",
32-
"@tailwindcss/forms": "^0.5.3",
33-
"@types/bun": "^1.1.0",
34-
"@types/node": "18.16.3",
35-
"@types/react": "18.2.5",
36-
"@types/react-dom": "18.2.3",
37-
"@typescript-eslint/eslint-plugin": "^6.1.0",
38-
"@typescript-eslint/parser": "^6.1.0",
39-
"abitype": "^0.9.6",
40-
"autoprefixer": "10.4.14",
41-
"clipboardy": "^3.0.0",
42-
"eslint": "8.39.0",
43-
"eslint-config-next": "13.4.12",
44-
"eslint-plugin-react": "^7.32.2",
45-
"postcss": "8.4.31",
46-
"tailwindcss": "3.3.2",
47-
"typescript": "5.0.4"
48-
}
2+
"name": "evm-diff",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "bun prepare-chain-data && NEXT_PUBLIC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) next dev",
7+
"build": "NEXT_PUBLIC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) next build",
8+
"start": "bun prepare-chain-data && NEXT_PUBLIC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) next start",
9+
"lint": "next lint --fix && tsc --noEmit && bunx @biomejs/biome lint --apply .",
10+
"fmt": "bunx @biomejs/biome format --write .",
11+
"check": "bun prepare-chain-data && bun lint && bun fmt",
12+
"fetch-data": "bash script/main.sh",
13+
"prepare-chain-data": "bash script/prepare-chain-data.sh"
14+
},
15+
"dependencies": {
16+
"@headlessui/react": "^1.7.16",
17+
"@heroicons/react": "^2.0.17",
18+
"@vercel/analytics": "^1.0.1",
19+
"@vercel/og": "^0.5.10",
20+
"@wagmi/chains": "^0.3.1",
21+
"next": "^14.2.3",
22+
"next-themes": "^0.2.1",
23+
"react": "18.2.0",
24+
"react-diff-viewer-continued": "^3.4.0",
25+
"react-dom": "^18.3.1",
26+
"react-markdown": "^8.0.7",
27+
"sharp": "^0.33.4",
28+
"viem": "^1.5.0"
29+
},
30+
"devDependencies": {
31+
"@biomejs/biome": "^1.7.2",
32+
"@tailwindcss/forms": "^0.5.3",
33+
"@types/bun": "^1.1.0",
34+
"@types/node": "18.16.3",
35+
"@types/react": "^18.3.2",
36+
"@types/react-dom": "^18.3.0",
37+
"@typescript-eslint/eslint-plugin": "^6.1.0",
38+
"@typescript-eslint/parser": "^6.1.0",
39+
"abitype": "^0.9.6",
40+
"autoprefixer": "10.4.14",
41+
"clipboardy": "^3.0.0",
42+
"eslint": "8.39.0",
43+
"eslint-config-next": "^14.2.3",
44+
"eslint-plugin-react": "^7.32.2",
45+
"postcss": "8.4.31",
46+
"tailwindcss": "3.3.2",
47+
"typescript": "5.0.4"
48+
}
4949
}

src/components/layout/Header.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Image from 'next/image';
22
import Link from 'next/link';
33
import { useTheme } from 'next-themes';
4-
import logoDark from 'public/logo-dark.png';
5-
import logoLight from 'public/logo-light.png';
4+
import logoDark from '@/../public/logo-dark.png';
5+
import logoLight from '@/../public/logo-light.png';
66
import { COMPANY_NAME, GITHUB_URL, TWITTER_URL } from '@/lib/constants';
77
import { ExternalLink } from './ExternalLink';
88
import { ThemeSwitcher } from '@/components/layout/ThemeSwitcher';

src/pages/api/og.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export const config = {
88

99
export default async function handler(_request: NextRequest) {
1010
const getLogoImageData = async () => {
11-
return await fetch(new URL('public/logo-dark-tight.png', import.meta.url)).then((res) =>
12-
res.arrayBuffer(),
11+
return await fetch(new URL('public/logo-dark-tight.png', new URL(import.meta.url))).then(
12+
(res) => res.arrayBuffer(),
1313
);
1414
};
1515

0 commit comments

Comments
 (0)