From 88343474c0b407864b49568f699c8fb665fa63e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Thune?= Date: Tue, 31 Oct 2023 11:05:33 +0100 Subject: [PATCH] chore: fix devsite caching issue and update devsite to next 14 (#998) --- apps/dev/package.json | 2 +- apps/dev/src/app/api/alias/list/route.ts | 4 + yarn.lock | 129 ++++++++++++++++++++++- 3 files changed, 132 insertions(+), 3 deletions(-) diff --git a/apps/dev/package.json b/apps/dev/package.json index 4daba416bc..e6035f8f15 100644 --- a/apps/dev/package.json +++ b/apps/dev/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "next": "13.5.4" + "next": "^14.0.0" }, "devDependencies": { "@navikt/aksel-icons": "^5.6.5", diff --git a/apps/dev/src/app/api/alias/list/route.ts b/apps/dev/src/app/api/alias/list/route.ts index f3227b1c7a..c56e12b3a6 100644 --- a/apps/dev/src/app/api/alias/list/route.ts +++ b/apps/dev/src/app/api/alias/list/route.ts @@ -1,3 +1,5 @@ +export const dynamic = 'force-dynamic'; + export async function GET() { const requestHeaders: HeadersInit = new Headers(); requestHeaders.set('Content-Type', 'application/json'); @@ -7,6 +9,8 @@ export async function GET() { 'https://api.vercel.com/v4/aliases?teamId=' + process.env.VERCEL_TEAM_ID, { headers: requestHeaders, + next: { revalidate: 0 }, + cache: 'no-store', }, ); const data = (await res.json()) as Promise; diff --git a/yarn.lock b/yarn.lock index 2ca5ff99f5..6c57aefb9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5274,6 +5274,13 @@ __metadata: languageName: node linkType: hard +"@next/env@npm:14.0.1": + version: 14.0.1 + resolution: "@next/env@npm:14.0.1" + checksum: 1fab6732f877c3702fce12396f16046f9b7a59c70b0d0b3db713995eed431706d12175530709d21c613682865ce82ef965a5719a43d6bc84142462a8ed558cda + languageName: node + linkType: hard + "@next/eslint-plugin-next@npm:^13.2.4": version: 13.2.4 resolution: "@next/eslint-plugin-next@npm:13.2.4" @@ -5290,6 +5297,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-darwin-arm64@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-darwin-arm64@npm:14.0.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@next/swc-darwin-x64@npm:13.5.4": version: 13.5.4 resolution: "@next/swc-darwin-x64@npm:13.5.4" @@ -5297,6 +5311,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-darwin-x64@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-darwin-x64@npm:14.0.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@next/swc-linux-arm64-gnu@npm:13.5.4": version: 13.5.4 resolution: "@next/swc-linux-arm64-gnu@npm:13.5.4" @@ -5304,6 +5325,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-linux-arm64-gnu@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-linux-arm64-gnu@npm:14.0.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + "@next/swc-linux-arm64-musl@npm:13.5.4": version: 13.5.4 resolution: "@next/swc-linux-arm64-musl@npm:13.5.4" @@ -5311,6 +5339,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-linux-arm64-musl@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-linux-arm64-musl@npm:14.0.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + "@next/swc-linux-x64-gnu@npm:13.5.4": version: 13.5.4 resolution: "@next/swc-linux-x64-gnu@npm:13.5.4" @@ -5318,6 +5353,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-linux-x64-gnu@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-linux-x64-gnu@npm:14.0.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + "@next/swc-linux-x64-musl@npm:13.5.4": version: 13.5.4 resolution: "@next/swc-linux-x64-musl@npm:13.5.4" @@ -5325,6 +5367,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-linux-x64-musl@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-linux-x64-musl@npm:14.0.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + "@next/swc-win32-arm64-msvc@npm:13.5.4": version: 13.5.4 resolution: "@next/swc-win32-arm64-msvc@npm:13.5.4" @@ -5332,6 +5381,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-win32-arm64-msvc@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-win32-arm64-msvc@npm:14.0.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@next/swc-win32-ia32-msvc@npm:13.5.4": version: 13.5.4 resolution: "@next/swc-win32-ia32-msvc@npm:13.5.4" @@ -5339,6 +5395,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-win32-ia32-msvc@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-win32-ia32-msvc@npm:14.0.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@next/swc-win32-x64-msvc@npm:13.5.4": version: 13.5.4 resolution: "@next/swc-win32-x64-msvc@npm:13.5.4" @@ -5346,6 +5409,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-win32-x64-msvc@npm:14.0.1": + version: 14.0.1 + resolution: "@next/swc-win32-x64-msvc@npm:14.0.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -12653,7 +12723,7 @@ __metadata: "@navikt/aksel-icons": ^5.6.5 "@types/luxon": ^3.3.2 luxon: ^3.4.3 - next: 13.5.4 + next: ^14.0.0 normalize.css: ^8.0.1 react-countdown-circle-timer: ^3.2.1 languageName: unknown @@ -19102,7 +19172,7 @@ __metadata: languageName: node linkType: hard -"next@npm:13.5.4, next@npm:^13.5.4": +"next@npm:^13.5.4": version: 13.5.4 resolution: "next@npm:13.5.4" dependencies: @@ -19157,6 +19227,61 @@ __metadata: languageName: node linkType: hard +"next@npm:^14.0.0": + version: 14.0.1 + resolution: "next@npm:14.0.1" + dependencies: + "@next/env": 14.0.1 + "@next/swc-darwin-arm64": 14.0.1 + "@next/swc-darwin-x64": 14.0.1 + "@next/swc-linux-arm64-gnu": 14.0.1 + "@next/swc-linux-arm64-musl": 14.0.1 + "@next/swc-linux-x64-gnu": 14.0.1 + "@next/swc-linux-x64-musl": 14.0.1 + "@next/swc-win32-arm64-msvc": 14.0.1 + "@next/swc-win32-ia32-msvc": 14.0.1 + "@next/swc-win32-x64-msvc": 14.0.1 + "@swc/helpers": 0.5.2 + busboy: 1.6.0 + caniuse-lite: ^1.0.30001406 + postcss: 8.4.31 + styled-jsx: 5.1.1 + watchpack: 2.4.0 + peerDependencies: + "@opentelemetry/api": ^1.1.0 + react: ^18.2.0 + react-dom: ^18.2.0 + sass: ^1.3.0 + dependenciesMeta: + "@next/swc-darwin-arm64": + optional: true + "@next/swc-darwin-x64": + optional: true + "@next/swc-linux-arm64-gnu": + optional: true + "@next/swc-linux-arm64-musl": + optional: true + "@next/swc-linux-x64-gnu": + optional: true + "@next/swc-linux-x64-musl": + optional: true + "@next/swc-win32-arm64-msvc": + optional: true + "@next/swc-win32-ia32-msvc": + optional: true + "@next/swc-win32-x64-msvc": + optional: true + peerDependenciesMeta: + "@opentelemetry/api": + optional: true + sass: + optional: true + bin: + next: dist/bin/next + checksum: d142407f47012eb57ba3932f91453960c79d7df2fef03ded581f32195b98a4378e13c49709f498a112d142109a8edd73f40357ee102a6bd4d7b1f76de9f0877a + languageName: node + linkType: hard + "no-case@npm:^3.0.4": version: 3.0.4 resolution: "no-case@npm:3.0.4"