Files
Desktop/danger/rules.ts
Scott Nonnenberg 237e239e05 Remove backbone as a dependency
Co-authored-by: Yash <yash@signal.org>
Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
2025-08-11 14:06:34 -07:00

32 lines
735 B
TypeScript

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { run } from 'endanger';
import packageJsonVersionsShouldBePinned from './rules/packageJsonVersionsShouldBePinned';
import pnpmLockDepsShouldHaveIntegrity from './rules/pnpmLockDepsShouldHaveIntegrity';
function isGitDeletedError(error: unknown) {
return (
typeof error === 'object' &&
error != null &&
error['exitCode'] === 128 &&
error['command']?.startsWith('git show ')
);
}
async function main() {
try {
await run(
packageJsonVersionsShouldBePinned(),
pnpmLockDepsShouldHaveIntegrity()
);
} catch (error: unknown) {
if (!isGitDeletedError(error)) {
throw error;
}
}
}
main();