Repository navigation
fix: restore pnpm visibility and remove pacquet from charts #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c9c97f0
4a3d002
86f2a11
df52ce4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ const PACKAGE_MANAGERS = [ | |
| "npm", | ||
| "yarn", | ||
| "pnpm", | ||
| "pacquet", | ||
|
|
||
| "berry", | ||
| "zpm", | ||
| "deno", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ const COLORS = { | |
| yarn: "#117cad", | ||
| pnpm: "#f9ad00", | ||
| pnpm11: "#e68a00", | ||
| pacquet: "#d4740a", | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '1,115p' scripts/generate-chart.js
rg -n 'COLORS|packageManagers|histor|pacquet|pnpm|chart-data' scripts/generate-chart.jsRepository: vltpkg/benchmarks Length of output: 4216 🏁 Script executed: #!/bin/bash
set -eu
BASE=3861a27e6df47b379791e9b46fa2989ae8a70982
HEAD=86f2a11ec2eda87749f336320b6af1b103901a4a
printf '%s\n' '--- changed generator hunk ---'
git diff --unified=20 "$BASE" "$HEAD" -- scripts/generate-chart.js
printf '%s\n' '--- generator lines 85-300 ---'
nl -ba scripts/generate-chart.js | sed -n '85,300p'
printf '%s\n' '--- generator lines 300-510 ---'
nl -ba scripts/generate-chart.js | sed -n '300,510p'
printf '%s\n' '--- result files and pacquet references in relevant sources ---'
rg --files results scripts app .github 2>/dev/null | rg '(^results/|generate-chart|process-results|history|chart|benchmark)' | head -240
rg -n -i 'pacquet|generateChartData|generate-chart|chart-data|packageManagers|COLORS' scripts app .github --glob '!**/node_modules/**' || test "$?" -eq 1
printf '%s\n' '--- result JSON manager keys ---'
python3 - <<'PY'
from pathlib import Path
import json
for p in sorted(Path("results").glob("*/*.json")):
try:
obj = json.loads(p.read_text())
except Exception:
continue
if "results" in obj:
rows = obj["results"]
managers = sorted({str(r.get("package_manager", r.get("packageManager", r.get("pm", "")))) for r in rows if isinstance(r, dict)})
if any("pacquet" in m.lower() for m in managers) or managers:
print(f"{p}: manager fields={managers[:30]}; row-count={len(rows)}")
PYRepository: vltpkg/benchmarks Length of output: 41545 🏁 Script executed: #!/bin/bash
set -eu
BASE=3861a27e6df47b379791e9b46fa2989ae8a70982
HEAD=86f2a11ec2eda87749f336320b6af1b103901a4a
printf '%s\n' '--- PR changed paths ---'
git diff --name-status "$BASE" "$HEAD"
printf '%s\n' '--- history hook ---'
nl -ba app/src/hooks/use-history-data.ts | sed -n '1,250p'
printf '%s\n' '--- history hook PR diff ---'
git diff --unified=25 "$BASE" "$HEAD" -- app/src/hooks/use-history-data.ts
printf '%s\n' '--- process-results input/transform blocks ---'
nl -ba scripts/process-results.sh | sed -n '1,240p'
printf '%s\n' '--- producer references ---'
rg -n -F 'generate-chart.js' scripts .github README.md package.json 2>/dev/null || test "$?" -eq 1
rg -n -i 'pacquet|pnpm' scripts/process-results.sh scripts/benchmark.sh .github/workflows/benchmark.yaml
printf '%s\n' '--- tracked benchmark/chart data paths ---'
git ls-tree -r --name-only "$HEAD" -- results app | rg '(^results/|/chart-data\.json$|/package-count\.json$)' | head -200
printf '%s\n' '--- current result tree files ---'
rg --files results 2>/dev/null | head -100 || test "$?" -eq 1Repository: vltpkg/benchmarks Length of output: 18384 🏁 Script executed: #!/bin/bash
set -eu
BASE=3861a27e6df47b379791e9b46fa2989ae8a70982
HEAD=86f2a11ec2eda87749f336320b6af1b103901a4a
printf '%s\n' '--- changed paths ---'
git diff --name-status "$BASE" "$HEAD"
printf '%s\n' '--- history hook lines 1-230 ---'
nl -ba app/src/hooks/use-history-data.ts | sed -n '1,230p'
printf '%s\n' '--- history hook diff ---'
git diff --unified=18 "$BASE" "$HEAD" -- app/src/hooks/use-history-data.ts
printf '%s\n' '--- benchmark result producer ---'
nl -ba scripts/process-results.sh | sed -n '1,190p'
printf '%s\n' '--- generator callers and package-manager source references ---'
rg -n -F 'generate-chart.js' scripts .github README.md package.json 2>/dev/null || test "$?" -eq 1
rg -n -i 'pacquet|pnpm' scripts/process-results.sh scripts/benchmark.sh .github/workflows/benchmark.yaml || test "$?" -eq 1
printf '%s\n' '--- tracked result/chart data paths ---'
git ls-tree -r --name-only "$HEAD" -- results app | rg '(^results/|/chart-data\.json$|/package-count\.json$)' | head -160 || test "$?" -eq 1
printf '%s\n' '--- current result files ---'
rg --files results 2>/dev/null | head -80 || test "$?" -eq 1Repository: vltpkg/benchmarks Length of output: 17354 🏁 Script executed: #!/bin/bash
set -eu
BASE=3861a27e6df47b379791e9b46fa2989ae8a70982
HEAD=86f2a11ec2eda87749f336320b6af1b103901a4a
printf '%s\n' '--- changed paths ---'
git diff --name-status "$BASE" "$HEAD"
printf '%s\n' '--- history hook lines 1-230 ---'
nl -ba app/src/hooks/use-history-data.ts | sed -n '1,230p'
printf '%s\n' '--- history hook diff ---'
git diff --unified=18 "$BASE" "$HEAD" -- app/src/hooks/use-history-data.ts
printf '%s\n' '--- benchmark result producer ---'
nl -ba scripts/process-results.sh | sed -n '1,190p'
printf '%s\n' '--- benchmark entrypoints and manager references ---'
rg -n -F 'generate-chart.js' scripts .github README.md package.json 2>/dev/null || test "$?" -eq 1
rg -n -i 'pacquet|pnpm' scripts/process-results.sh scripts/benchmark.sh .github/workflows/benchmark.yaml || test "$?" -eq 1
printf '%s\n' '--- tracked result/chart data paths ---'
git ls-tree -r --name-only "$HEAD" -- results app | rg '(^results/|/chart-data\.json$|/package-count\.json$)' | head -160 || test "$?" -eq 1
printf '%s\n' '--- current result files ---'
rg --files results 2>/dev/null | head -80 || test "$?" -eq 1Repository: vltpkg/benchmarks Length of output: 17343 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- reprocessing workflow and benchmark workflow ---'
for f in .github/workflows/reprocess.yml .github/workflows/benchmark.yaml; do
if [ -f "$f" ]; then
echo "### $f"
nl -ba "$f" | sed -n '1,230p'
fi
done
printf '%s\n' '--- pacquet references at base and current ---'
git grep -n -i 'pacquet' 3861a27e6df47b379791e9b46fa2989ae8a70982 -- ':!package-lock.json' || true
git grep -n -i 'pacquet' 86f2a11ec2eda87749f336320b6af1b103901a4a -- ':!package-lock.json' || true
printf '%s\n' '--- manager command producers at base ---'
git grep -n -E 'pacquet|pnpm|benchmarks.json|command' 3861a27e6df47b379791e9b46fa2989ae8a70982 -- scripts .github fixtures 2>/dev/null | head -240 || true
printf '%s\n' '--- current history hook remainder ---'
nl -ba app/src/hooks/use-history-data.ts | sed -n '230,330p'Repository: vltpkg/benchmarks Length of output: 45662 Map legacy When the reprocess workflow handles an older artifact, its benchmark rows and package counts can use Suggested fix- if (
- countData &&
- typeof countData === "object" &&
- countData[pm] &&
- typeof countData[pm].count === "number"
- ) {
- packageCounts[pm] = countData[pm].count;
+ const countEntry =
+ countData?.[pm] ??
+ (pm === "pnpm" ? countData?.pacquet : undefined);
+ if (countEntry && typeof countEntry.count === "number") {
+ packageCounts[pm] = countEntry.count;
}
@@
- const pmResult = results.find((r) => r.command === pm);
+ const pmResult =
+ results.find((r) => r.command === pm) ??
+ (pm === "pnpm"
+ ? results.find((r) => r.command === "pacquet")
+ : undefined);🤖 Prompt for AI Agents |
||
| berry: "#9555bb", | ||
| zpm: "#7388ff", | ||
| deno: "#70ffaf", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: vltpkg/benchmarks
Length of output: 13902
🤖 get_repo_knowledge executed:
get_repo_knowledge vltpkg/benchmarks /tmp/coderabbit-repo-knowledge/vltpkg-benchmarks-aded1151/conventionsLength of output: 39420
🏁 Script executed:
Repository: vltpkg/benchmarks
Length of output: 6484
Preserve the legacy
pacquetfield until historical data is repaired.If an affected
chart-data.jsonstill stores pnpm values underpacquet, this hook now omits those values from the pnpm history series. Read the legacy field as pnpm until the repair is deployed.🐛 Suggested fix
for (const fixture of fixtures) { for (const pm of PACKAGE_MANAGERS) { - const val = fixture[pm]; + const raw = fixture[pm]; + const val = + typeof raw === "number" && Number.isFinite(raw) + ? raw + : pm === "pnpm" && typeof fixture.pacquet === "number" + ? fixture.pacquet + : undefined; if (typeof val === "number" && Number.isFinite(val)) {🤖 Prompt for AI Agents