Skip to content

Commit 3636ab0

Browse files
authored
Merge pull request #796 from alan-turing-institute/staging
Release: dependency upgrades, migration fixes, and curriculum bug fix
2 parents 3e6f4e7 + e625f20 commit 3636ab0

File tree

329 files changed

+7618
-7693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+7618
-7693
lines changed

.github/workflows/build.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ jobs:
7070
runs-on: ubuntu-latest
7171
steps:
7272
- name: Checkout repository
73-
uses: actions/checkout@v4
73+
uses: actions/checkout@v6
7474

7575
- name: Setup pnpm
7676
uses: pnpm/action-setup@v4
7777

7878
- name: Setup Node.js with cache
79-
uses: actions/setup-node@v4
79+
uses: actions/setup-node@v6
8080
with:
8181
node-version: '20'
8282
cache: 'pnpm'
@@ -85,11 +85,11 @@ jobs:
8585
run: pnpm install --frozen-lockfile
8686

8787
- name: Cache Prisma Client
88-
uses: actions/cache@v4
88+
uses: actions/cache@v5
8989
id: prisma-cache-validate
9090
with:
91-
path: node_modules/.prisma/client
92-
key: prisma-${{ runner.os }}-${{ hashFiles('prisma/schema.prisma') }}
91+
path: src/generated/prisma
92+
key: prisma-${{ runner.os }}-${{ hashFiles('prisma/schema.prisma', 'pnpm-lock.yaml') }}
9393

9494
- name: Generate Prisma client
9595
if: steps.prisma-cache-validate.outputs.cache-hit != 'true'
@@ -140,13 +140,13 @@ jobs:
140140

141141
steps:
142142
- name: Checkout repository
143-
uses: actions/checkout@v4
143+
uses: actions/checkout@v6
144144

145145
- name: Setup pnpm
146146
uses: pnpm/action-setup@v4
147147

148148
- name: Setup Node.js with cache
149-
uses: actions/setup-node@v4
149+
uses: actions/setup-node@v6
150150
with:
151151
node-version: '20'
152152
cache: 'pnpm'
@@ -155,11 +155,11 @@ jobs:
155155
run: pnpm install --frozen-lockfile
156156

157157
- name: Cache Prisma Client
158-
uses: actions/cache@v4
158+
uses: actions/cache@v5
159159
id: prisma-cache-test
160160
with:
161-
path: node_modules/.prisma/client
162-
key: prisma-${{ runner.os }}-${{ hashFiles('prisma/schema.prisma') }}
161+
path: src/generated/prisma
162+
key: prisma-${{ runner.os }}-${{ hashFiles('prisma/schema.prisma', 'pnpm-lock.yaml') }}
163163

164164
- name: Generate Prisma client
165165
if: steps.prisma-cache-test.outputs.cache-hit != 'true'
@@ -207,7 +207,7 @@ jobs:
207207
cp -r .next/static .next/standalone/.next/static
208208
209209
- name: Cache Playwright browsers
210-
uses: actions/cache@v4
210+
uses: actions/cache@v5
211211
id: playwright-cache
212212
with:
213213
path: ~/.cache/ms-playwright
@@ -225,15 +225,15 @@ jobs:
225225
run: pnpm exec playwright test
226226

227227
- name: Upload Playwright report
228-
uses: actions/upload-artifact@v4
228+
uses: actions/upload-artifact@v7
229229
if: ${{ !cancelled() }}
230230
with:
231231
name: playwright-report
232232
path: playwright-report/
233233
retention-days: 14
234234

235235
- name: Upload test results
236-
uses: actions/upload-artifact@v4
236+
uses: actions/upload-artifact@v7
237237
if: ${{ !cancelled() }}
238238
with:
239239
name: test-results
@@ -251,21 +251,21 @@ jobs:
251251

252252
steps:
253253
- name: Checkout repository
254-
uses: actions/checkout@v4
254+
uses: actions/checkout@v6
255255

256256
- name: Set up Docker Buildx
257-
uses: docker/setup-buildx-action@v3
257+
uses: docker/setup-buildx-action@v4
258258

259259
- name: Log in to Container Registry
260-
uses: docker/login-action@v3
260+
uses: docker/login-action@v4
261261
with:
262262
registry: ${{ env.REGISTRY }}
263263
username: ${{ github.actor }}
264264
password: ${{ secrets.GITHUB_TOKEN }}
265265

266266
- name: Extract metadata
267267
id: meta
268-
uses: docker/metadata-action@v5
268+
uses: docker/metadata-action@v6
269269
with:
270270
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
271271
tags: |
@@ -288,7 +288,7 @@ jobs:
288288
289289
- name: Build and push Docker image (Production - main branch)
290290
if: github.ref == 'refs/heads/main'
291-
uses: docker/build-push-action@v5
291+
uses: docker/build-push-action@v7
292292
with:
293293
context: .
294294
file: ./Dockerfile
@@ -309,7 +309,7 @@ jobs:
309309

310310
- name: Build and push Docker image (Staging branch)
311311
if: github.ref == 'refs/heads/staging'
312-
uses: docker/build-push-action@v5
312+
uses: docker/build-push-action@v7
313313
with:
314314
context: .
315315
file: ./Dockerfile
@@ -330,7 +330,7 @@ jobs:
330330

331331
- name: Build and push Docker image (PR/other branches)
332332
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/staging'
333-
uses: docker/build-push-action@v5
333+
uses: docker/build-push-action@v7
334334
with:
335335
context: .
336336
file: ./Dockerfile

.github/workflows/cleanup-images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Delete PR images older than 14 days
17-
uses: snok/container-retention-policy@v3
17+
uses: snok/container-retention-policy@v3.0.1
1818
with:
1919
account: alan-turing-institute
2020
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
fetch-depth: 0
2525
token: ${{ secrets.RELEASE_TOKEN }}
@@ -28,7 +28,7 @@ jobs:
2828
uses: pnpm/action-setup@v4
2929

3030
- name: Setup Node.js
31-
uses: actions/setup-node@v4
31+
uses: actions/setup-node@v6
3232
with:
3333
node-version: "20"
3434
cache: "pnpm"

.github/workflows/seed-staging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1818

1919
- name: Setup Node.js
20-
uses: actions/setup-node@v4
20+
uses: actions/setup-node@v6
2121
with:
2222
node-version: "20"
2323

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ repos:
3434
hooks:
3535
- id: ultracite-lint
3636
name: ultracite lint (staged files)
37-
entry: bash -c 'FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.(jsx?|tsx?|json)$" || true); [ -z "$FILES" ] && exit 0; echo "$FILES" | xargs npx ultracite lint'
37+
entry: bash -c 'FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.(jsx?|tsx?|json)$" || true); [ -z "$FILES" ] && exit 0; echo "$FILES" | xargs npx ultracite check'
3838
language: system
3939
pass_filenames: false
4040
files: '\.(jsx?|tsx?|json)$'
4141
exclude: '(node_modules|\.next|public/documentation|logs)/'
4242

4343
- id: ultracite-format
4444
name: ultracite format (staged files, safe fixes only)
45-
entry: bash -c 'FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.(jsx?|tsx?|json)$" || true); [ -z "$FILES" ] && exit 0; echo "$FILES" | xargs npx ultracite format || true'
45+
entry: bash -c 'FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.(jsx?|tsx?|json)$" || true); [ -z "$FILES" ] && exit 0; echo "$FILES" | xargs npx ultracite fix || true'
4646
language: system
4747
pass_filenames: false
4848
files: '\.(jsx?|tsx?|json)$'

.secrets.baseline

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
"filename": "lib/services/user-management-service.ts",
316316
"hashed_secret": "8911a1ef22f1dfd8cd71925c676afa4fb2959a12",
317317
"is_verified": false,
318-
"line_number": 248
318+
"line_number": 254
319319
}
320320
],
321321
"lib/services/user-service.ts": [
@@ -13103,7 +13103,7 @@
1310313103
"filename": "prisma/seed/dev-seed.ts",
1310413104
"hashed_secret": "8911a1ef22f1dfd8cd71925c676afa4fb2959a12",
1310513105
"is_verified": false,
13106-
"line_number": 129
13106+
"line_number": 130
1310713107
}
1310813108
],
1310913109
"public/documentation/docs/technical-guide/setup-installation/cloud-deployment/index.html": [
@@ -13130,7 +13130,7 @@
1313013130
"filename": "scripts/create-test-users.ts",
1313113131
"hashed_secret": "8911a1ef22f1dfd8cd71925c676afa4fb2959a12",
1313213132
"is_verified": false,
13133-
"line_number": 31
13133+
"line_number": 32
1313413134
}
1313513135
],
1313613136
"scripts/seed-test-user.ts": [
@@ -13572,5 +13572,5 @@
1357213572
}
1357313573
]
1357413574
},
13575-
"generated_at": "2026-03-09T18:01:04Z"
13575+
"generated_at": "2026-03-13T14:56:39Z"
1357613576
}

actions/assurance-cases.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import {
88
} from "@/lib/schemas/assurance-case";
99
import { validateInput } from "@/lib/validation/input-validation";
1010

11-
type AssuranceCase = {
11+
interface AssuranceCase {
12+
createdDate?: string;
13+
description?: string;
1214
id: number | string;
15+
isDemo?: boolean;
1316
name: string;
14-
description?: string;
15-
createdDate?: string;
16-
updatedDate?: string;
1717
owner?: number | string;
18-
isDemo?: boolean;
19-
};
18+
updatedDate?: string;
19+
}
2020

2121
export const fetchAssuranceCases = async (): Promise<
2222
AssuranceCase[] | null
@@ -89,15 +89,15 @@ export const fetchPublishedAssuranceCases = async (): Promise<
8989
return await Promise.resolve([]);
9090
};
9191

92-
type PublishedCaseForStudy = {
92+
interface PublishedCaseForStudy {
93+
description: string;
9394
id: string;
95+
markedReadyAt: string | null;
9496
name: string;
95-
description: string;
96-
publishStatus: string;
9797
publishedAt: string | null;
98-
markedReadyAt: string | null;
9998
publishedVersionId: string | null;
100-
};
99+
publishStatus: string;
100+
}
101101

102102
/**
103103
* Fetches the current user's cases that are available for linking to case studies

actions/case-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export async function loadStaticCaseData(
1111
caseFile: string
1212
): Promise<{ data: unknown } | { error: string }> {
1313
// Validate filename to prevent path traversal
14-
if (caseFile.includes("..") || caseFile.includes("/")) {
14+
if (caseFile.includes("..") || caseFile.startsWith("/")) {
1515
return { error: "Invalid case file name" };
1616
}
1717

actions/export-case.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { validateSession } from "@/lib/auth/validate-session";
44
import { uuidSchema } from "@/lib/schemas/base";
55
import type { CaseExportNested } from "@/lib/schemas/case-export";
66

7-
type ExportOptions = {
7+
interface ExportOptions {
88
includeComments: boolean;
9-
};
9+
}
1010

1111
type ExportResult = { data: CaseExportNested } | { error: string };
1212

actions/export-document.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { validateSession } from "@/lib/auth/validate-session";
44
import { uuidSchema } from "@/lib/schemas/base";
55
import type { CaseExportNested } from "@/lib/schemas/case-export";
66

7-
type DocumentExportOptions = {
7+
interface DocumentExportOptions {
88
includeComments: boolean;
9-
};
9+
}
1010

1111
type DocumentExportResult = { data: CaseExportNested } | { error: string };
1212

0 commit comments

Comments
 (0)