Skip to content

Commit

Permalink
Merge pull request #326 from incubateur-ademe/chore/nextjs15-migration
Browse files Browse the repository at this point in the history
Chore/nextjs15 migration
  • Loading branch information
rtaieb authored Jan 14, 2025
2 parents 968779d + b43feff commit 1f54c91
Show file tree
Hide file tree
Showing 41 changed files with 2,780 additions and 1,512 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ certificates
/scripts/ficheSolution.json
/scripts/retourExperience.json
/scripts/ficheDiagnostic.json

# Sentry Config File
.env.sentry-build-plugin
71 changes: 36 additions & 35 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('next').NextConfig} */
/** @type {import("next").NextConfig} */

const nextConfig = {
async headers() {
Expand Down Expand Up @@ -71,44 +71,45 @@ module.exports = nextConfig;
// Injected content via Sentry wizard below
const { withSentryConfig } = require("@sentry/nextjs");

module.exports = withSentryConfig(
module.exports,
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
errorHandler: (err, invokeErr, compilation) => {
compilation.warnings.push("Sentry CLI Plugin: " + err.message);
},

// Suppresses source map uploading logs during build
silent: true,
org: "betagouv",
project: "plusfraichemaville",
url: "https://sentry.incubateur.net/",
module.exports = withSentryConfig(module.exports, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
errorHandler: (err, invokeErr, compilation) => {
compilation.warnings.push("Sentry CLI Plugin: " + err.message);
},
{
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
org: "incubateur-ademe",
project: "plusfraichemaville",
sentryUrl: "https://sentry.incubateur.net/",

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Only print logs for uploading source maps in CI
silent: !process.env.CI,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: true,
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
tunnelRoute: "/monitoring",
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Hides source maps from generated client bundles
hideSourceMaps: true,
// Automatically annotate React components to show their full name in breadcrumbs and session replay
reactComponentAnnotation: {
enabled: true,
},

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
tunnelRoute: "/monitoring",

// Enables automatic instrumentation of Vercel Cron Monitors.
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
},
);
// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
});
56 changes: 31 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,67 +23,73 @@
},
"dependencies": {
"@auth/prisma-adapter": "^2.7.4",
"@codegouvfr/react-dsfr": "^1.14.10",
"@headlessui/react": "^1.7.19",
"@hookform/resolvers": "^3.9.1",
"@codegouvfr/react-dsfr": "^1.16.7",
"@headlessui/react": "^2.2.0",
"@hookform/resolvers": "^3.10.0",
"@hubspot/api-client": "^12.0.1",
"@incubateur-ademe/legal-pages-react": "^0.3.0",
"@nlux/react": "^2.17.1",
"@nlux/themes": "^2.17.1",
"@prisma/client": "^5.22.0",
"@sentry/nextjs": "7.120.1",
"@sentry/nextjs": "^8.48.0",
"@splidejs/react-splide": "^0.7.12",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"html-to-image": "^1.11.11",
"jspdf": "^2.5.2",
"leaflet": "^1.9.4",
"lodash": "^4.17.21",
"next": "14.2.21",
"next": "15.1.4",
"next-auth": "^4.24.11",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.2",
"react-hot-toast": "^2.4.1",
"react-leaflet": "^4.2.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-hook-form": "^7.54.2",
"react-hot-toast": "^2.5.1",
"react-leaflet": "^5.0.0",
"react-leaflet-cluster": "^2.1.0",
"react-markdown": "^9.0.1",
"react-select": "^5.8.3",
"react-markdown": "^9.0.3",
"react-select": "^5.9.0",
"rehype-raw": "^7.0.0",
"server-only": "^0.0.1",
"sharp": "^0.32.6",
"swr": "^2.2.5",
"swr": "^2.3.0",
"usehooks-ts": "^2.16.0",
"uuid": "^9.0.1",
"zod": "^3.23.8",
"zustand": "^4.5.5"
"zod": "^3.24.1",
"zustand": "^4.5.6"
},
"devDependencies": {
"@types/geojson": "^7946.0.14",
"@types/leaflet": "^1.9.14",
"@types/lodash": "^4.17.13",
"@types/node": "^20.17.9",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/geojson": "^7946.0.15",
"@types/leaflet": "^1.9.16",
"@types/lodash": "^4.17.14",
"@types/node": "^20.17.12",
"@types/react": "19.0.4",
"@types/react-dom": "19.0.2",
"@types/react-image-gallery": "^1.2.4",
"@types/uuid": "^9.0.8",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.1",
"eslint-config-next": "14.0.4",
"eslint-config-next": "15.1.4",
"eslint-config-prettier": "^9.1.0",
"i": "^0.3.7",
"postcss": "^8.4.49",
"prettier": "3.1.1",
"prettier-plugin-classnames": "^0.6.6",
"prettier-plugin-tailwindcss": "^0.5.14",
"prisma": "^5.22.0",
"sass": "^1.81.0",
"tailwindcss": "^3.4.15",
"sass": "^1.83.1",
"tailwindcss": "^3.4.17",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
"typescript": "^5.7.3"
},
"engines": {
"node": "20.14.0",
"pnpm": "^9"
},
"pnpm": {
"overrides": {
"@types/react": "19.0.4",
"@types/react-dom": "19.0.2"
}
}
}
Loading

0 comments on commit 1f54c91

Please sign in to comment.