Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ jobs:
RAW="${{ github.event.release.tag_name || inputs.version }}"
echo "value=${RAW#v}" >> "$GITHUB_OUTPUT"

# The benchmark adapter loads lambda-api from the working tree via require('../../'),
# which resolves through the root package's "main" (./dist/cjs/index.js). That path
# only exists after a build, so the root package must be installed and built first.
- name: Install root dependencies
run: npm ci --ignore-scripts

- name: Build dist (CJS + ESM)
run: npm run build

- name: Install benchmark dependencies
working-directory: benchmarks
run: npm ci
Expand Down
7 changes: 6 additions & 1 deletion benchmarks/frameworks/lambda-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ function build() {
return (event, context) => api.run(event, context);
}

module.exports = { name: 'lambda-api', version: pkg.version, build };
// package.json ships a 0.0.0-development placeholder (the real version is stamped at
// publish time), so prefer the release label the workflow passes in — same precedence
// as the run metadata in run.js.
const version = process.env.LAMBDA_API_VERSION || pkg.version;

module.exports = { name: 'lambda-api', version, build };
Loading