From 0789e748cc692d97bed0b6b9bd58ca1391ddebd6 Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Thu, 28 Nov 2024 17:52:09 +0000 Subject: [PATCH] restore exceptions to check-deps --- dotcom-rendering/scripts/env/check-deps.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dotcom-rendering/scripts/env/check-deps.js b/dotcom-rendering/scripts/env/check-deps.js index c34c6ed0fec..f117465a13b 100644 --- a/dotcom-rendering/scripts/env/check-deps.js +++ b/dotcom-rendering/scripts/env/check-deps.js @@ -8,10 +8,16 @@ if (pkg.devDependencies) { process.exit(1); } -const mismatches = Object.entries(pkg.dependencies).filter( - ([, version]) => - !semver.valid(version) && !version.startsWith('workspace:'), -); +const exceptions = /** @type {const} */ ([ + 'npm:@guardian/react-crossword@0.0.0-canary-20241128162754', +]); + +const mismatches = Object.entries(pkg.dependencies) + .filter(([, version]) => !exceptions.includes(version)) + .filter( + ([, version]) => + !semver.valid(version) && !version.startsWith('workspace:'), + ); if (mismatches.length !== 0) { warn('dotcom-rendering dependencies should be pinned.');