From fa0418e0c9531f2776a464f1b8bffa6d56e14d28 Mon Sep 17 00:00:00 2001 From: Aaron Scully Date: Fri, 16 Oct 2026 22:49:22 +0100 Subject: [PATCH 1/2] Updating joi and model. --- jest.config.cjs | 1 + package.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jest.config.cjs b/jest.config.cjs index 3717c478..5c7f0d1d 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -41,6 +41,7 @@ module.exports = { transformIgnorePatterns: [ `node_modules/(?!${[ '@defra/forms-model/.*', + '@joi/date', // Supports ESM only 'nanoid', // Supports ESM only 'slug', // Supports ESM only '@defra/hapi-tracing' // Supports ESM only diff --git a/package.json b/package.json index f44fd8ad..b2b40bcb 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@aws-sdk/client-s3": "^3.1062.0", "@aws-sdk/client-sns": "^3.1062.0", "@aws-sdk/credential-providers": "3.1073.0", - "@defra/forms-model": "^3.0.709", + "@defra/forms-model": "^4.0.0", "@defra/hapi-tracing": "^1.30.0", "@elastic/ecs-pino-format": "^1.5.0", "@hapi/hapi": "^21.4.9", @@ -55,7 +55,7 @@ "dotenv": "^17.4.2", "hapi-pino": "^13.0.0", "http-status-codes": "^2.3.0", - "joi": "^17.13.4", + "joi": "^18.2.9", "migrate-mongo": "^14.0.7", "mongodb": "^7.2.0", "pino": "^10.3.1", From 4360a01eaaa6d70ab0cd7e53e7f1bf574137e694 Mon Sep 17 00:00:00 2001 From: Aaron Scully Date: Thu, 22 Oct 2026 14:59:55 +0100 Subject: [PATCH 2/2] Package lock update --- package-lock.json | 147 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 103 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index 883cc129..132fff38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-s3": "^3.1062.0", "@aws-sdk/client-sns": "^3.1062.0", "@aws-sdk/credential-providers": "3.1073.0", - "@defra/forms-model": "^3.0.709", + "@defra/forms-model": "^4.0.0", "@defra/hapi-tracing": "^1.30.0", "@elastic/ecs-pino-format": "^1.5.0", "@hapi/hapi": "^21.4.9", @@ -24,7 +24,7 @@ "dotenv": "^17.4.2", "hapi-pino": "^13.0.0", "http-status-codes": "^2.3.0", - "joi": "^17.13.4", + "joi": "^18.2.9", "migrate-mongo": "^14.0.7", "mongodb": "^7.2.0", "pino": "^10.3.1", @@ -2499,12 +2499,12 @@ } }, "node_modules/@defra/forms-model": { - "version": "3.0.709", - "resolved": "https://registry.npmjs.org/@defra/forms-model/-/forms-model-3.0.709.tgz", - "integrity": "sha512-U5yOgSY/7Anr4BNBVa8LFT9ypi6aq2f6cN5rhu6J/sj+yLYjbZv2+7l3X6R2Jwn4qVcS9YUEh4me+80cBjbC3Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@defra/forms-model/-/forms-model-4.0.1.tgz", + "integrity": "sha512-9k8AnABUxP5OQYGf9FyVj+0mPn58245y9JRuJDC/m1EiAeMr9rk8qh2MNUCF+gQ4rcaSqTq6hc301gak7zThvg==", "license": "OGL-UK-3.0", "dependencies": { - "@joi/date": "^2.1.1", + "@joi/date": "^3.0.0", "marked": "^15.0.12", "nanoid": "^5.0.7", "slug": "^11.0.0", @@ -2515,7 +2515,7 @@ "npm": "^11.17.0 || >=12.0.2" }, "peerDependencies": { - "joi": "^17.0.0" + "joi": "^18.0.0" } }, "node_modules/@defra/hapi-tracing": { @@ -3263,6 +3263,18 @@ "@hapi/hoek": "^11.0.2" } }, + "node_modules/@hapi/address": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-5.1.1.tgz", + "integrity": "sha512-A+po2d/dVoY7cYajycYI43ZbYMXukuopIsqCjh5QzsBCipDtdofHntljDlpccMjIfTy6UOkg+5KPriwYch2bXA==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^11.0.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@hapi/ammo": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-6.0.1.tgz", @@ -3375,6 +3387,12 @@ "integrity": "sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q==", "license": "BSD-3-Clause" }, + "node_modules/@hapi/formula": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-3.0.2.tgz", + "integrity": "sha512-hY5YPNXzw1He7s0iqkRQi+uMGh383CGdyyIGYtB+W5N3KHPXoqychklvHhKCC9M3Xtv0OCs/IHw+r4dcHtBYWw==", + "license": "BSD-3-Clause" + }, "node_modules/@hapi/hapi": { "version": "21.4.9", "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.4.9.tgz", @@ -3458,6 +3476,40 @@ "integrity": "sha512-CvlW7jmOhWzuqOqiJQ3rQVLMcREh0eel4IBnxDx2FAcK8g7qoJRQK4L1CPBASoCY6y8e6zuCy3f2g+HWdkzcMw==", "license": "BSD-3-Clause" }, + "node_modules/@hapi/jwt/node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@hapi/jwt/node_modules/@hapi/topo/node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@hapi/jwt/node_modules/joi": { + "version": "17.13.8", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.8.tgz", + "integrity": "sha512-iPKOGmiRw1jxf/JOPwxmCcUQAOdF359mdzYiP2DJ+TMX0YK2zjK3D+zYOaGjpumWxOFF/l2xVWjRVK5bGSLdEw==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" + } + }, + "node_modules/@hapi/jwt/node_modules/joi/node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "license": "BSD-3-Clause" + }, "node_modules/@hapi/mimos": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-7.0.1.tgz", @@ -3494,6 +3546,12 @@ "@hapi/nigel": "^5.0.1" } }, + "node_modules/@hapi/pinpoint": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.1.tgz", + "integrity": "sha512-EKQmr16tM8s16vTT3cA5L0kZZcTMU5DUOZTuvpnY738m+jyP3JIUj+Mm1xc1rsLkGBQ/gVnfKYPwOmPg1tUR4Q==", + "license": "BSD-3-Clause" + }, "node_modules/@hapi/podium": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-5.0.2.tgz", @@ -3564,6 +3622,15 @@ "node": ">=14.0.0" } }, + "node_modules/@hapi/tlds": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@hapi/tlds/-/tlds-1.1.7.tgz", + "integrity": "sha512-MgNjRwy9Ti92yVAixLmDc8dd1bJIKwO9qlWCfFQRwRmUEDPQHYn4G6hwPFvFGUTzAa0FsS+inMjLin7GnyBRhA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@hapi/topo": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-6.0.2.tgz", @@ -4722,12 +4789,18 @@ } }, "node_modules/@joi/date": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@joi/date/-/date-2.1.1.tgz", - "integrity": "sha512-oXF8vU8M+O9a6tuItgtTQeboO3+Ed6xunLatt6gq7WEFJ7HjawPH64OmrsX0ch3TEsUgQkU8v4MlOGEsf6PHSQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@joi/date/-/date-3.0.0.tgz", + "integrity": "sha512-lj6T9M+vrvUUBjCxLPeq3kWHkw53XyfvN/V7rushbQ0yvq2upw7iGsPjwTrMfUp058jhvRoXyixMyCwKk7da3Q==", "license": "BSD-3-Clause", "dependencies": { - "moment": "2.x.x" + "dayjs": "^1.11.21" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "joi": ">=18" } }, "node_modules/@jridgewell/gen-mapping": { @@ -5062,7 +5135,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", - "dev": true, "license": "MIT" }, "node_modules/@stylistic/eslint-plugin": { @@ -7408,6 +7480,12 @@ "node": "*" } }, + "node_modules/dayjs": { + "version": "1.11.23", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz", + "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==", + "license": "MIT" + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -12332,31 +12410,21 @@ "license": "MIT" }, "node_modules/joi": { - "version": "17.13.4", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.4.tgz", - "integrity": "sha512-1RuuER6kmt8K8I3nIWvPZKi5RQCb568ZPyY4Pwjlua+yo+63ZTmIwxLZH0heBmiKN4uxjvCiarDrjaeH84xicQ==", - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.3.0", - "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.5", - "@sideway/formula": "^3.0.1", - "@sideway/pinpoint": "^2.0.0" - } - }, - "node_modules/joi/node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", - "license": "BSD-3-Clause" - }, - "node_modules/joi/node_modules/@hapi/topo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-18.3.0.tgz", + "integrity": "sha512-/RwAK4BAfzcdbdFg073tzq4/xhY6Q7lMd5AmjqTL6pu0QFJdEmtswgm8BvgwXvOKuPNYQ8XrdQrrW/gF65LiNw==", "license": "BSD-3-Clause", "dependencies": { - "@hapi/hoek": "^9.0.0" + "@hapi/address": "^5.1.1", + "@hapi/formula": "^3.0.2", + "@hapi/hoek": "^11.0.7", + "@hapi/pinpoint": "^2.0.1", + "@hapi/tlds": "^1.1.1", + "@hapi/topo": "^6.0.2", + "@standard-schema/spec": "^1.1.0" + }, + "engines": { + "node": ">= 20" } }, "node_modules/joycon": { @@ -12968,15 +13036,6 @@ "node": ">=8" } }, - "node_modules/moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/mongodb": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.2.0.tgz",