Add danger rule to check all pnpm-lock.yaml dependencies have integrity

This commit is contained in:
Jamie Kyle
2025-04-09 12:42:19 -07:00
committed by GitHub
parent a575597396
commit 9337adbc20
4 changed files with 85 additions and 17 deletions
+6 -1
View File
@@ -5,6 +5,7 @@ import { run } from 'endanger';
import migrateBackboneToRedux from './rules/migrateBackboneToRedux';
import packageJsonVersionsShouldBePinned from './rules/packageJsonVersionsShouldBePinned';
import pnpmLockDepsShouldHaveIntegrity from './rules/pnpmLockDepsShouldHaveIntegrity';
function isGitDeletedError(error: unknown) {
return (
@@ -17,7 +18,11 @@ function isGitDeletedError(error: unknown) {
async function main() {
try {
await run(migrateBackboneToRedux(), packageJsonVersionsShouldBePinned());
await run(
migrateBackboneToRedux(),
packageJsonVersionsShouldBePinned(),
pnpmLockDepsShouldHaveIntegrity()
);
} catch (error: unknown) {
if (!isGitDeletedError(error)) {
throw error;