docs/plans/benchmark-improvements/002-bump-codspeed-plugin-version.md
Update @codspeed/benchmark.js-plugin from version 4.0.0 to 5.0.1 across all packages that use it. This is a prerequisite if staying with benchmark.js, or can be skipped if migrating directly to tinybench (see task 001).
The following packages use @codspeed/benchmark.js-plugin at version 4.0.0:
| Package | File |
|---|---|
@prisma/client | packages/client/package.json |
@prisma/client-engine-runtime | packages/client-engine-runtime/package.json |
@prisma/get-platform | packages/get-platform/package.json |
@codspeed/[email protected]@codspeed/[email protected]Based on the CodSpeed changelog, the major version bump includes:
^20.19 || ^22.12 || >=24.0 requirement)withCodSpeed wrapper API remains the sameFor each package, update the version in package.json:
{
"devDependencies": {
"@codspeed/benchmark.js-plugin": "5.0.1"
}
}
Packages to update:
packages/client/package.jsonpackages/client-engine-runtime/package.jsonpackages/get-platform/package.jsonpnpm install
This will update pnpm-lock.yaml with the new versions.
# Run all benchmarks
pnpm bench
# Test CodSpeed integration locally
CODSPEED_BENCHMARK=true pnpm bench
.github/workflows/benchmark.yml passespackages/client/package.json updated to 5.0.1packages/client-engine-runtime/package.json updated to 5.0.1packages/get-platform/package.json updated to 5.0.1pnpm-lock.yaml regeneratedpnpm bench runs successfully locally@codspeed/[email protected] insteadIf issues arise, revert the version changes:
git checkout -- packages/client/package.json packages/client-engine-runtime/package.json packages/get-platform/package.json
pnpm install
CodSpeedHQ/action@v3) in .github/workflows/benchmark.yml is compatible with plugin v5.xrhysd/github-action-benchmark@v1 action for storing results is unaffected by this change