test: close remaining quality verification gaps
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { existsSync, readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
const root = resolve(import.meta.dirname, '../..');
|
||||
@@ -96,6 +96,12 @@ if (trackedAlternativeLocks) {
|
||||
`${trackedAlternativeLocks.replace(/\r?\n/g, ', ')}: npm/package-lock.json is the only supported committed dependency lock`,
|
||||
);
|
||||
}
|
||||
const presentAlternativeLocks = ['pnpm-lock.yaml', 'yarn.lock'].filter((file) => existsSync(resolve(root, file)));
|
||||
if (presentAlternativeLocks.length) {
|
||||
violations.push(
|
||||
`${presentAlternativeLocks.join(', ')}: remove alternative lock files; npm/package-lock.json is the only supported dependency lock`,
|
||||
);
|
||||
}
|
||||
if (packageJson.packageManager !== 'npm@10.9.4') {
|
||||
violations.push('package.json: packageManager must pin the supported npm baseline');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user