chore: bump nextjs and @sentry/nextjs

deps
Amio 2025-06-03 11:54:41 +08:00
rodzic 878dbcd816
commit 355de9bc20
9 zmienionych plików z 4395 dodań i 348 usunięć

Wyświetl plik

@ -19,3 +19,5 @@ if (SENTRY_DSN) {
release: `${NOW_GITHUB_COMMIT_REF || '-'}@${NOW_GITHUB_COMMIT_SHA || '-'}`
})
}
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart

18
instrumentation.ts 100644
Wyświetl plik

@ -0,0 +1,18 @@
import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
export function register() {
Sentry.init({
dsn: SENTRY_DSN || 'https://d8b75844db7846be8fa0ad17fa02b39a@o274494.ingest.sentry.io/1490481',
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
})
}
export const onRequestError = Sentry.captureRequestError

Wyświetl plik

@ -172,10 +172,9 @@ export function createBadgenHandler (conf: BadgenServeConfig): BadgenHandler {
})
}
sentry.configureScope((scope) => {
scope.setTag('path', url)
scope.setTag('service', defaultLabel)
})
const scope = sentry.getCurrentScope()
scope.setTag('path', url)
scope.setTag('service', defaultLabel)
sentry.captureException(error)
// uncatched error

2
next-env.d.ts vendored
Wyświetl plik

@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

Wyświetl plik

@ -6,23 +6,11 @@ const badgeList = require('./public/.meta/badges.json')
const nextConfig = {
reactStrictMode: true,
optimizeFonts: false,
experimental: {
appDir: false,
forceSwcTransforms: true,
},
sentry: {
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool`
// for client-side builds. (This will be the default starting in
// `@sentry/nextjs` version 8.0.0.) See
// https://webpack.js.org/configuration/devtool/ and
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
// for more information.
hideSourceMaps: true,
},
async rewrites() {
const badgeApis = [
'/static',

4656
package-lock.json wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -18,7 +18,7 @@
]
},
"dependencies": {
"@sentry/nextjs": "^7.119.2",
"@sentry/nextjs": "^9.24.0",
"@sentry/tracing": "^7.36.0",
"@vercel/analytics": "^1.0.1",
"@vercel/kv": "^3.0.0",
@ -46,8 +46,8 @@
"@types/fs-extra": "^11.0.1",
"@types/lodash.debounce": "^4.0.6",
"@types/node": "^22.15.29",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.5",
"@types/semver": "^7.3.4",
"@types/supertest": "^6.0.2",
"@types/url-parse": "^1.4.3",
@ -57,9 +57,9 @@
"eslint": "^8.30.0",
"eslint-plugin-react": "^7.23.2",
"fs-extra": "^11.1.0",
"next": "^14.2.22",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"next": "^15.3.3",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tsx": "^4.7.1",
"typescript": "^5.0.2"
},

Wyświetl plik

@ -1,17 +0,0 @@
// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever middleware or an Edge route handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
Sentry.init({
dsn: SENTRY_DSN || 'https://d8b75844db7846be8fa0ad17fa02b39a@o274494.ingest.sentry.io/1490481',
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
})

Wyświetl plik

@ -1,17 +0,0 @@
// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
Sentry.init({
dsn: SENTRY_DSN || 'https://d8b75844db7846be8fa0ad17fa02b39a@o274494.ingest.sentry.io/1490481',
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1.0,
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
})