Files
PaperClipAI/.github/scripts/tests/lockfile-refresh-workflows.test.mjs
T
fa16f88d6b chore(lockfile): refresh pnpm-lock.yaml (#12771)
Use full dependency resolution in automated lockfile repair paths, add regression coverage, and refresh the stale Rollup snapshot.

Co-Authored-By: Dotta <cryppadotta@users.noreply.github.com>
Co-Authored-By: Codex <codex@openai.com>
Co-Authored-By: lockfile-bot <lockfile-bot@users.noreply.github.com>
2026-09-03 11:08:34 -05:00

25 lines
868 B
JavaScript

import { readFile } from 'node:fs/promises';
import { test } from 'node:test';
import assert from 'node:assert/strict';
const workflows = [
'.github/workflows/refresh-lockfile.yml',
'.github/workflows/pr-trusted.yml',
'.github/workflows/docker.yml',
];
test('lockfile repair workflows resolve dependencies instead of updating metadata only', async () => {
for (const workflow of workflows) {
const contents = await readFile(workflow, 'utf8');
const repairCommands = contents
.split('\n')
.filter((line) => line.includes('pnpm install') && line.includes('--no-frozen-lockfile'));
assert.ok(repairCommands.length > 0, `${workflow} must contain a lockfile repair command`);
for (const command of repairCommands) {
assert.match(command, /--ignore-scripts/);
assert.doesNotMatch(command, /--lockfile-only/);
}
}
});