mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 18:29:06 +00:00
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>
32 lines
735 B
TypeScript
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();
|