Skip to content

Commit abf5430

Browse files
authored
Upgrade Next.js to 15 (#4257)
1 parent b56e20f commit abf5430

32 files changed

Lines changed: 2120 additions & 1203 deletions

File tree

Dockerfile.node.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.17.1
1+
FROM node:23
22

33
WORKDIR /home/node/app
44

frontend/next.config.js

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
require("dotenv").config();
2-
const webpack = require("webpack");
3-
const path = require("node:path");
42
const { withSentryConfig } = require("@sentry/nextjs");
53

64
const {
@@ -12,9 +10,10 @@ const {
1210
CMS_HOSTNAME,
1311
CMS_ADMIN_HOST = "admin.pycon.it",
1412
NEXT_PUBLIC_SITE_URL,
13+
SENTRY_AUTH_TOKEN,
1514
} = process.env;
1615

17-
module.exports = withSentryConfig({
16+
const nextConfig = {
1817
output: "standalone",
1918
i18n: {
2019
locales: ["default", "en", "it"],
@@ -27,7 +26,7 @@ module.exports = withSentryConfig({
2726
? undefined
2827
: require.resolve("./cache-handler.mjs"),
2928
generateBuildId:
30-
process.env.VERCEL_ENV === "preview"
29+
process.env.VERCEL_ENV === "preview" || !process.env.GIT_HASH
3130
? undefined
3231
: async () => {
3332
return process.env.GIT_HASH;
@@ -54,12 +53,12 @@ module.exports = withSentryConfig({
5453
return [
5554
{
5655
source: "/admin/:match*",
57-
destination: "https://admin.pycon.it/admin/:match",
56+
destination: "https://admin.pycon.it/admin/:match*",
5857
permanent: false,
5958
},
6059
{
6160
source: "/cms-admin/:match*",
62-
destination: "https://admin.pycon.it/cms-admin/:match",
61+
destination: "https://admin.pycon.it/cms-admin/:match*",
6362
permanent: false,
6463
},
6564
{
@@ -127,18 +126,8 @@ module.exports = withSentryConfig({
127126
"pycon-backend",
128127
],
129128
},
130-
webpack: (config, options) => {
131-
config.resolve.alias["~"] = `${path.resolve(__dirname)}/src`;
132-
133-
config.plugins.push(
134-
new webpack.DefinePlugin({
135-
__DEV__: process.env.NODE_ENV !== "production",
136-
}),
137-
);
129+
};
138130

139-
return config;
140-
},
141-
experimental: {
142-
instrumentationHook: true,
143-
},
131+
module.exports = withSentryConfig(nextConfig, {
132+
authToken: SENTRY_AUTH_TOKEN,
144133
});

frontend/package.json

Lines changed: 93 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,95 @@
11
{
2-
"private": true,
3-
"name": "pyconit",
4-
"version": "1.0.0",
5-
"main": "index.js",
6-
"author": "Python Italia",
7-
"license": "MIT",
8-
"scripts": {
9-
"dev": "concurrently \"npm run codegen:watch\" \"next dev\"",
10-
"build": "npm run codegen && next build",
11-
"start": "next start",
12-
"codegen": "graphql-codegen -r dotenv/config -c codegen.yml",
13-
"codegen:watch": "pnpm run codegen --watch",
14-
"test": "jest src/"
15-
},
16-
"dependencies": {
17-
"@apollo/client": "^3.11.4",
18-
"@graphql-codegen/add": "^5.0.3",
19-
"@graphql-codegen/cli": "^2.11.3",
20-
"@graphql-codegen/fragment-matcher": "^3.3.0",
21-
"@graphql-codegen/introspection": "^4.0.3",
22-
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
23-
"@graphql-codegen/typescript": "^2.7.2",
24-
"@graphql-codegen/typescript-operations": "^2.5.2",
25-
"@graphql-codegen/typescript-react-apollo": "^4.3.2",
26-
"@neshca/cache-handler": "^1.9.0",
27-
"@python-italia/pycon-styleguide": "0.1.201",
28-
"@sentry/nextjs": "^8.24.0",
29-
"@vercel/analytics": "^1.1.1",
30-
"@vercel/og": "^0.6.2",
31-
"@vercel/speed-insights": "^1.0.12",
32-
"@xstate/react": "^3.0.1",
33-
"clsx": "^1.2.1",
34-
"concurrently": "^8.2.2",
35-
"date-fns": "^2.29.3",
36-
"date-fns-tz": "^2.0.0",
37-
"deepmerge": "^4.2.2",
38-
"dotenv": "^16.3.1",
39-
"eslint-config-next": "^13.0.5",
40-
"framer-motion": "^11.5.5",
41-
"graphql": "^16.8.1",
42-
"graphql-tag": "^2.12.6",
43-
"marksy": "^8.0.0",
44-
"moment": "^2.29.1",
45-
"next": "14.2.10",
46-
"next-cookies": "^2.0.3",
47-
"pdfkit": "^0.13.0",
48-
"react": "^18.3.1",
49-
"react-dnd": "^11.1.3",
50-
"react-dnd-html5-backend": "^11.1.3",
51-
"react-dom": "^18.3.1",
52-
"react-hook-form": "^7.53.0",
53-
"react-intl": "^6.6.6",
54-
"react-intl-formatted-duration": "^4.0.0",
55-
"react-qr-code": "^2.0.15",
56-
"react-select": "^5.8.0",
57-
"react-use-form-state": "^0.13.2",
58-
"react-use-sync-scroll": "^0.1.0",
59-
"react-wrap-balancer": "^1.1.1",
60-
"redis": "^4.7.0",
61-
"styled-system": "^5.1.5",
62-
"svg-to-pdfkit": "^0.1.8",
63-
"xstate": "^4.38.3",
64-
"yup": "^0.29.3"
65-
},
66-
"devDependencies": {
67-
"@biomejs/biome": "1.9.4",
68-
"@python-italia/eslint-config": "^1.0.13",
69-
"@tailwindcss/typography": "^0.5.9",
70-
"@testing-library/dom": "^8.1.0",
71-
"@testing-library/jest-dom": "^5.14.1",
72-
"@testing-library/react": "^14.2.1",
73-
"@testing-library/user-event": "^13.2.1",
74-
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
75-
"@types/jest": "^29.5.12",
76-
"@types/node": "^14.14.6",
77-
"@types/react": "^17.0.33",
78-
"@types/react-dom": "^18.3.0",
79-
"@types/testing-library__jest-dom": "^5.14.1",
80-
"@xstate/inspect": "^0.8.0",
81-
"autoprefixer": "^10.4.20",
82-
"jest": "^29.7.0",
83-
"postcss": "^8.4.35",
84-
"tailwindcss": "^3.3.5",
85-
"tailwindcss-blend-mode": "^1.0.0",
86-
"ts-jest": "^27.0.4",
87-
"typescript": "^5.5.4"
88-
}
2+
"private": true,
3+
"name": "pyconit",
4+
"version": "1.0.0",
5+
"main": "index.js",
6+
"author": "Python Italia",
7+
"license": "MIT",
8+
"scripts": {
9+
"dev": "concurrently \"npm run codegen:watch\" \"next dev --turbopack\"",
10+
"build": "npm run codegen && next build",
11+
"start": "next start",
12+
"codegen": "graphql-codegen -r dotenv/config -c codegen.yml",
13+
"codegen:watch": "pnpm run codegen --watch",
14+
"test": "jest src/"
15+
},
16+
"dependencies": {
17+
"@apollo/client": "^3.12.3",
18+
"@graphql-codegen/add": "^5.0.3",
19+
"@graphql-codegen/cli": "^2.11.3",
20+
"@graphql-codegen/fragment-matcher": "^3.3.0",
21+
"@graphql-codegen/introspection": "^4.0.3",
22+
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
23+
"@graphql-codegen/typescript": "^2.7.2",
24+
"@graphql-codegen/typescript-operations": "^2.5.2",
25+
"@graphql-codegen/typescript-react-apollo": "^4.3.2",
26+
"@neshca/cache-handler": "^1.9.0",
27+
"@python-italia/pycon-styleguide": "0.1.201",
28+
"@sentry/nextjs": "^8.45.0",
29+
"@vercel/analytics": "^1.1.1",
30+
"@vercel/og": "^0.6.2",
31+
"@vercel/speed-insights": "^1.0.12",
32+
"@xstate/react": "^3.0.1",
33+
"clsx": "^1.2.1",
34+
"concurrently": "^9.1.0",
35+
"date-fns": "^4.1.0",
36+
"date-fns-tz": "^3.2.0",
37+
"deepmerge": "^4.3.1",
38+
"dotenv": "^16.4.7",
39+
"eslint-config-next": "15.1.0",
40+
"framer-motion": "^11.5.5",
41+
"graphql": "^16.9.0",
42+
"graphql-tag": "^2.12.6",
43+
"marksy": "^8.0.0",
44+
"moment": "^2.29.1",
45+
"next": "15.1.0",
46+
"next-cookies": "^2.0.3",
47+
"pdfkit": "^0.15.1",
48+
"react": "19.0.0",
49+
"react-dnd": "^11.1.3",
50+
"react-dnd-html5-backend": "^11.1.3",
51+
"react-dom": "19.0.0",
52+
"react-hook-form": "^7.53.0",
53+
"react-intl": "^6.6.6",
54+
"react-intl-formatted-duration": "^4.0.0",
55+
"react-qr-code": "^2.0.15",
56+
"react-select": "^5.9.0",
57+
"react-use-form-state": "^0.13.2",
58+
"react-use-sync-scroll": "^0.1.0",
59+
"react-wrap-balancer": "^1.1.1",
60+
"redis": "^4.7.0",
61+
"styled-system": "^5.1.5",
62+
"svg-to-pdfkit": "^0.1.8",
63+
"xstate": "^4.38.3",
64+
"yup": "^0.29.3"
65+
},
66+
"devDependencies": {
67+
"@biomejs/biome": "1.9.4",
68+
"@python-italia/eslint-config": "^1.0.13",
69+
"@tailwindcss/typography": "^0.5.9",
70+
"@testing-library/dom": "^8.1.0",
71+
"@testing-library/jest-dom": "^5.14.1",
72+
"@testing-library/react": "^14.2.1",
73+
"@testing-library/user-event": "^13.2.1",
74+
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
75+
"@types/jest": "^29.5.12",
76+
"@types/node": "^14.14.6",
77+
"@types/react": "19.0.1",
78+
"@types/react-dom": "19.0.2",
79+
"@types/testing-library__jest-dom": "^5.14.1",
80+
"@xstate/inspect": "^0.8.0",
81+
"autoprefixer": "^10.4.20",
82+
"jest": "^29.7.0",
83+
"postcss": "^8.4.35",
84+
"tailwindcss": "^3.3.5",
85+
"tailwindcss-blend-mode": "^1.0.0",
86+
"ts-jest": "^27.0.4",
87+
"typescript": "^5.5.4"
88+
},
89+
"pnpm": {
90+
"overrides": {
91+
"@types/react": "19.0.1",
92+
"@types/react-dom": "19.0.2"
93+
}
94+
}
8995
}

0 commit comments

Comments
 (0)