Commit 287b665
fix: lock promptfoo transitive dependencies to prevent CI breakage (#1115)
## Summary
- Add `package.json` + `package-lock.json` in `evals/promptfoo/` to lock
the full promptfoo dependency tree, preventing transitive dependency
breakage like the `@asamuzakjp/css-color@5.1.5` incident ([#1110
comment](#1110 (comment)))
- The eval script now runs `npm ci` before invoking promptfoo instead of
`npx -y promptfoo@0.121.3`
- Extended `scripts/audit_deps.ts` to scan the npm lockfile for
vulnerabilities alongside `deno.lock`
- Updated the CI outdated-deps check to read the version from
`package.json` via `jq`
## Test Plan
- All existing tests pass (4174 passed)
- `deno check`, `deno lint`, `deno fmt --check` all pass
- Verified `npm ci && npx promptfoo --version` works correctly in
`evals/promptfoo/`
- Verified audit script picks up packages from both `deno.lock` (99) and
`package-lock.json` (984)
- Confirmed `css-color@5.1.5` reproduces the `ERR_REQUIRE_ASYNC_MODULE`
error and `5.1.6` (locked in our lockfile) does not
Closes #1110
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 6d9bac1 commit 287b665
7 files changed
Lines changed: 13673 additions & 8 deletions
File tree
- .github/workflows
- evals/promptfoo
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
0 commit comments