mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-24 01:41:42 +02:00
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>
This commit is contained in:
6 files changed
+31
-8
No files matched your search
@@ -0,0 +1,24 @@
|
||||
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/);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
- name: Refresh lockfile for Docker build context
|
||||
run: |
|
||||
set -euo pipefail
|
||||
pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile
|
||||
pnpm install --ignore-scripts --no-frozen-lockfile
|
||||
|
||||
changed="$(git status --porcelain)"
|
||||
if [ -z "$changed" ]; then
|
||||
@@ -281,7 +281,7 @@ jobs:
|
||||
- name: Refresh lockfile for Docker build context
|
||||
run: |
|
||||
set -euo pipefail
|
||||
pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile
|
||||
pnpm install --ignore-scripts --no-frozen-lockfile
|
||||
|
||||
changed="$(git status --porcelain)"
|
||||
if [ -z "$changed" ]; then
|
||||
|
||||
@@ -337,7 +337,7 @@ jobs:
|
||||
id: regen_lockfile
|
||||
run: |
|
||||
cp pnpm-lock.yaml "$RUNNER_TEMP/pnpm-lock.before.yaml"
|
||||
pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile
|
||||
pnpm install --ignore-scripts --no-frozen-lockfile
|
||||
if cmp -s "$RUNNER_TEMP/pnpm-lock.before.yaml" pnpm-lock.yaml; then
|
||||
echo "regenerated=0" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
cache: pnpm
|
||||
|
||||
- name: Refresh pnpm lockfile
|
||||
run: pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile
|
||||
run: pnpm install --ignore-scripts --no-frozen-lockfile
|
||||
|
||||
- name: Fail on unexpected file changes
|
||||
run: |
|
||||
|
||||
Reference in new issue
Block a user