Skip to content

Commit

Permalink
Merge pull request #11388 from wellcomecollection/upgrade-next
Browse files Browse the repository at this point in the history
Upgrade next
  • Loading branch information
gestchild authored Nov 11, 2024
2 parents 0cdd6d7 + daea764 commit 146af4b
Show file tree
Hide file tree
Showing 9 changed files with 723 additions and 839 deletions.
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ updates:
update-types: ['version-update:semver-patch'] # Ignore all patch updates for version updates only
# We are looking at updating Chromatic, so don't tell us about it. Remove this once we've upgraded.
- dependency-name: 'chromatic*'
# Bigger piece, has a ticket to upgrade. Remove this once it's done.
- dependency-name: 'next'
- dependency-name: '@next*'
# Needs more work, has its own ticket. Remove this once it's done.
- dependency-name: 'eslint*'
# Needs untangling, has its own ticket. Remove this once it's done.
Expand Down
2 changes: 1 addition & 1 deletion cardigan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@storybook/theming": "^8.3.5",
"chromatic": "^6.21.1",
"husky": "^4.3.0",
"next": "13.5.7",
"next": "14.2.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.6.2",
Expand Down
2 changes: 1 addition & 1 deletion common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"jest-environment-jsdom": "^29.5.0",
"koa-compose": "^4.1.0",
"lodash.debounce": "^4.0.8",
"next": "13.2.3",
"next": "14.2.10",
"nprogress": "^0.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion content/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"koa-router": "^7.4.0",
"lodash.flattendeep": "^4.4.0",
"lodash.throttle": "^4.1.1",
"next": "13.2.3",
"next": "14.2.10",
"next-router-mock": "^0.9.3",
"openseadragon": "^4.0.0",
"react": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion dash/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@babel/runtime": "^7.24.7",
"@types/react": "^18.3.3",
"cookies-next": "^4.2.1",
"next": "^14.2.10",
"next": "14.2.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"styled-components": "^6.1.11",
Expand Down
2 changes: 1 addition & 1 deletion identity/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"koa": "^2.13.0",
"koa-json": "^2.0.2",
"koa-logger": "^3.2.1",
"next": "13.2.3",
"next": "14.2.10",
"next-router-mock": "^0.9.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
8 changes: 8 additions & 0 deletions identity/webapp/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ export async function createApp(): Promise<Koa> {
ctx.respond = false;
});

// Upgrading next passed 13.5.1 led to an issue with the incorrect status code being returned
// So we do it explicitly here
// See https://github.com/vercel/next.js/issues/65691 for similar
app.use(async (ctx, next) => {
ctx.res.statusCode = 200;
await next();
});

app.use(router.routes()).use(router.allowedMethods());

process.on('SIGINT', async () => {
Expand Down
4 changes: 2 additions & 2 deletions identity/webapp/src/frontend/components/PageWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export const PageWrapper: FunctionComponent<PropsWithChildren<Props>> = ({
const { isEnhanced } = useContext(AppContext);
const { collectionVenues } = usePrismicData();
const venues = transformCollectionVenues(collectionVenues);

const fullTitle = `${title} | Wellcome Collection`;
return (
<>
<Head>
<title>{title} | Wellcome Collection</title>
<title>{fullTitle}</title>
<Favicons />
</Head>
<GlobalStyle isFontsLoaded={useIsFontsLoaded()} />
Expand Down
Loading

0 comments on commit 146af4b

Please sign in to comment.