Skip to content

Commit

Permalink
restore exceptions to check-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sndrs committed Nov 28, 2024
1 parent a43748b commit 0789e74
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dotcom-rendering/scripts/env/check-deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]',
]);

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.');
Expand Down

0 comments on commit 0789e74

Please sign in to comment.