Skip to content

Commit 38bad8d

Browse files
committed
meta: upgrade to next.js 16
Signed-off-by: Claudio Wunder <cwunder@gnome.org>
1 parent 02eb59a commit 38bad8d

File tree

14 files changed

+784
-337
lines changed

14 files changed

+784
-337
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package-lock.json
1010
# Next.js Build Output
1111
.next
1212
build
13+
next-env.d.ts
1314

1415
# Test Runner
1516
junit.xml

apps/site/app/[locale]/error.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client';
22

3-
import { ArrowRightIcon } from '@heroicons/react/24/solid';
43
import { useTranslations } from 'next-intl';
54

65
import Button from '#site/components/Common/Button';
@@ -13,17 +12,17 @@ const ErrorPage: FC<{ error: Error }> = () => {
1312

1413
return (
1514
<GlowingBackdropLayout kind="default">
16-
500
15+
<span>500</span>
16+
1717
<h1 className="special -mt-4 text-center">
1818
{t('layouts.error.internalServerError.title')}
1919
</h1>
20+
2021
<p className="-mt-4 max-w-sm text-center text-lg">
2122
{t('layouts.error.internalServerError.description')}
2223
</p>
23-
<Button href="/">
24-
{t('layouts.error.backToHome')}
25-
<ArrowRightIcon />
26-
</Button>
24+
25+
<Button href="/">{t('layouts.error.backToHome')}</Button>
2726
</GlowingBackdropLayout>
2827
);
2928
};

apps/site/app/[locale]/not-found.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use server';
22

3-
import { ArrowRightIcon } from '@heroicons/react/24/solid';
43
import { getTranslations } from 'next-intl/server';
54

65
import Button from '#site/components/Common/Button';
@@ -28,10 +27,7 @@ const NotFoundPage: FC = async () => {
2827
{t('layouts.error.notFound.description')}
2928
</p>
3029

31-
<Button href="/">
32-
{t('layouts.error.backToHome')}
33-
<ArrowRightIcon />
34-
</Button>
30+
<Button href="/">{t('layouts.error.backToHome')}</Button>
3531
</GlowingBackdropLayout>
3632
);
3733
};

apps/site/app/global-error.tsx

Lines changed: 0 additions & 34 deletions
This file was deleted.

apps/site/components/withNodeRelease.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,15 @@ type WithNodeReleaseProps = {
1414
// Note that Hooks cannot be used in a RSC async component
1515
// Async Components do not get re-rendered at all.
1616
const WithNodeRelease: FC<WithNodeReleaseProps> = async ({
17-
status,
17+
status: statuses,
1818
children: Component,
1919
}) => {
20-
const releaseData = await provideReleaseData();
21-
22-
let matchingRelease: NodeRelease | undefined;
23-
for (const statusItem of Array.isArray(status) ? status : [status]) {
24-
matchingRelease = releaseData.find(
25-
release => release.status === statusItem
26-
);
27-
if (matchingRelease) {
28-
break;
29-
}
30-
}
20+
const releases = await provideReleaseData();
21+
22+
const matchingRelease = [statuses]
23+
.flat()
24+
.map(status => releases.find(release => release.status === status))
25+
.find(Boolean);
3126

3227
if (matchingRelease) {
3328
return <Component release={matchingRelease} />;

apps/site/eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default baseConfig.concat([
1212

1313
react.configs.flat['jsx-runtime'],
1414
hooks.configs['recommended-latest'],
15-
next.flatConfig.coreWebVitals,
15+
next.configs['core-web-vitals'],
1616
mdx.flatCodeBlocks,
1717

1818
// Type-checking

apps/site/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
33
/// <reference types="next/navigation-types/compat/navigation" />
4-
/// <reference path="./.next/types/routes.d.ts" />
4+
import "./.next/types/routes.d.ts";
55

66
// NOTE: This file should not be edited
77
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/site/next.config.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const getDeploymentId = async () => {
2020

2121
/** @type {import('next').NextConfig} */
2222
const nextConfig = {
23-
allowedDevOrigins: ['10.1.1.232'],
23+
// Full Support of React 18 SSR and Streaming
24+
reactCompiler: true,
2425
// We don't want to redirect with trailing slashes
2526
skipTrailingSlashRedirect: true,
2627
// We allow the BASE_PATH to be overridden in case that the Website
@@ -52,10 +53,7 @@ const nextConfig = {
5253
// Enable statically typed links
5354
// @see https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links
5455
typedRoutes: true,
55-
// We don't want to run ESLint Checking on Production Builds
56-
// as we already check it on the CI within each Pull Request
57-
// we also configure ESLint to run its lint checking on all files
58-
eslint: { ignoreDuringBuilds: true },
56+
// Experimental Flags
5957
experimental: {
6058
useCache: true,
6159
// Ensure that server-side code is also minified
@@ -82,6 +80,8 @@ const nextConfig = {
8280
'tailwindcss',
8381
'shiki',
8482
],
83+
// Faster Development Servers with Turbopack
84+
turbopackFileSystemCacheForDev: true,
8585
},
8686
deploymentId: await getDeploymentId(),
8787
};

apps/site/open-next.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ const cloudflareConfig = defineCloudflareConfig({
2020

2121
const openNextConfig: OpenNextConfig = {
2222
...cloudflareConfig,
23+
buildCommand: 'pnpm build --webpack',
2324
cloudflare: {
24-
skewProtection: {
25-
enabled: true,
26-
},
25+
skewProtection: { enabled: true },
2726
},
2827
};
2928

apps/site/package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"scripts": {
55
"prebuild": "node --run build:blog-data",
6-
"build": "cross-env NODE_NO_WARNINGS=1 next build --turbo",
6+
"build": "cross-env NODE_NO_WARNINGS=1 next build",
77
"build:blog-data": "cross-env NODE_NO_WARNINGS=1 node ./scripts/blog-data/index.mjs",
88
"build:blog-data:watch": "node --watch --watch-path=pages/en/blog ./scripts/blog-data/index.mjs",
99
"cloudflare:build:worker": "OPEN_NEXT_CLOUDFLARE=true opennextjs-cloudflare build",
@@ -12,7 +12,7 @@
1212
"predeploy": "node --run build:blog-data",
1313
"deploy": "cross-env NEXT_PUBLIC_STATIC_EXPORT=true node --run build",
1414
"predev": "node --run build:blog-data",
15-
"dev": "cross-env NODE_NO_WARNINGS=1 next dev --turbo",
15+
"dev": "cross-env NODE_NO_WARNINGS=1 next dev",
1616
"lint": "node --run lint:js && node --run lint:css && node --run lint:md",
1717
"lint:fix": "node --run lint:js:fix && node --run lint:css:fix && node --run lint:md:fix",
1818
"lint:css": "stylelint \"**/*.css\" --allow-empty-input --cache --cache-strategy=content --cache-location=.stylelintcache",
@@ -42,7 +42,7 @@
4242
"@opentelemetry/instrumentation": "~0.206.0",
4343
"@opentelemetry/resources": "~1.30.1",
4444
"@orama/core": "^1.2.13",
45-
"@orama/ui": "^1.5.2",
45+
"@orama/ui": "^1.5.3",
4646
"@opentelemetry/sdk-logs": "~0.206.0",
4747
"@radix-ui/react-tabs": "^1.1.13",
4848
"@radix-ui/react-tooltip": "^1.2.8",
@@ -51,16 +51,16 @@
5151
"@types/react": "catalog:",
5252
"@vcarl/remark-headings": "~0.1.0",
5353
"@vercel/analytics": "~1.5.0",
54-
"@vercel/otel": "~2.0.1",
54+
"@vercel/otel": "~2.1.0",
5555
"@vercel/speed-insights": "~1.2.0",
5656
"classnames": "catalog:",
5757
"cross-env": "catalog:",
5858
"feed": "~5.1.0",
5959
"github-slugger": "~2.0.0",
6060
"gray-matter": "~4.0.3",
6161
"mdast-util-to-string": "^4.0.0",
62-
"next": "15.5.7",
63-
"next-intl": "~4.3.11",
62+
"next": "16.0.7",
63+
"next-intl": "~4.5.3",
6464
"next-themes": "~0.4.6",
6565
"postcss-calc": "~10.1.1",
6666
"react": "catalog:",
@@ -80,16 +80,17 @@
8080
},
8181
"devDependencies": {
8282
"@flarelabs-net/wrangler-build-time-fs-assets-polyfilling": "^0.0.1",
83-
"@next/eslint-plugin-next": "15.5.7",
83+
"@next/eslint-plugin-next": "16.0.7",
8484
"@node-core/remark-lint": "workspace:*",
85-
"@opennextjs/cloudflare": "^1.13.1",
85+
"@opennextjs/cloudflare": "^1.14.4",
8686
"@playwright/test": "^1.56.1",
8787
"@testing-library/user-event": "~14.6.1",
8888
"@types/mdast": "^4.0.4",
8989
"@types/mdx": "^2.0.13",
9090
"@types/semver": "~7.7.1",
91+
"babel-plugin-react-compiler": "^1.0.0",
9192
"dedent": "^1.7.0",
92-
"eslint-config-next": "15.5.4",
93+
"eslint-config-next": "16.0.7",
9394
"eslint-plugin-mdx": "~3.6.2",
9495
"eslint-plugin-react": "~7.37.5",
9596
"eslint-plugin-react-hooks": "^5.2.0",
@@ -107,7 +108,7 @@
107108
"typescript": "catalog:",
108109
"typescript-eslint": "~8.45.0",
109110
"user-agent-data-types": "0.4.2",
110-
"wrangler": "^4.45.3"
111+
"wrangler": "^4.53.0"
111112
},
112113
"imports": {
113114
"#site/*": [

0 commit comments

Comments
 (0)