Skip to content

Conversation

@LBHCallumM
Copy link
Member

@LBHCallumM LBHCallumM commented Nov 3, 2025

Summary of changes:

  • Most of the changes are snapshot updates
  • Used the legacyBehaviour tag for links. These can be upgraded in a future PR
  • Many tests had to be modified slightly to pass
  • Updated next to deploy in standalone mode (required adding a separate package.json file to reduce bundle size below the 250mb limit)

Too many changes to list everything, so may be better to ask questions.

I am due to do some extensive smoke testing to ensure no functionality is lost. But with a PR this size, its inevitable something will break.

Comment on lines -219 to -229
// Configure cookie removal in Sentry scope
Sentry.getCurrentScope().addEventProcessor((event) => {
if (event.request?.cookies[GSSO_TOKEN_NAME])
event.request.cookies[GSSO_TOKEN_NAME] = '[REMOVED]'

if (event.request?.cookies[NEXT_PUBLIC_DRS_SESSION_COOKIE_NAME])
event.request.cookies[NEXT_PUBLIC_DRS_SESSION_COOKIE_NAME] =
'[REMOVED]'

return event
})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rm server-side sentry config

Comment on lines +21 to +30
let isReady = false
let nextRequestHandler

server.all('*', (req, res) => nextRequestHandler(req, res))
async function init() {
if (!isReady) {
await app.prepare()
nextRequestHandler = app.getRequestHandler()
isReady = true
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Track when application is ready

>
<TD className="lbh-body-xs">
<Link href={`/work-orders/${reference}`}>
<Link href={`/work-orders/${reference}`} legacyBehavior>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add legacyBehavior tag because links containing an anchor tag is now depricated

Comment on lines -39 to -47
const { NODE_ENV, SENTRY_RELEASE } = process.env

const sentryWebpackPluginOptions = {
dryRun: !(NODE_ENV === 'production'),
release: SENTRY_RELEASE,
silent: !(NODE_ENV === 'production'),
}

module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RM Sentry config

Comment on lines +1 to +10
{
"name": "repairs-hub-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"restana": "^4.8.0",
"serve-static": "^1.14.1",
"serverless-http": "^2.6.0"
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add package.json for lambda.js file, to minimize bundle size

@LBHCallumM LBHCallumM changed the title WIP -> update nextjs Upgrade to Next@15 Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants