feat(nodejs): switch from npm to bun in parametric and AI framework weblogs#7012
feat(nodejs): switch from npm to bun in parametric and AI framework weblogs#7012rochdev wants to merge 2 commits into
Conversation
…eblogs Replaces npm with bun for dependency installation in parametric tests and AI framework weblogs (anthropic-js, openai-js, google-genai-js), using frozen lockfiles and hoisted linker for reproducible builds. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
|
|
The install_ddtrace.sh script now uses bun, but it was not installed in the weblog images (express4, express5, express4-typescript, fastify, nextjs, uds-express4). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad9ef10a6b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| target=$(run_without_node_env npm pack /binaries/dd-trace-js) | ||
| echo "install from local folder /binaries/dd-trace-js" | ||
| install_custom_target "$target" | ||
| run_without_node_env bun add "${BUN_ARGS[@]}" /binaries/dd-trace-js || run_without_node_env bun add "${BUN_ARGS[@]}" /binaries/dd-trace-js |
There was a problem hiding this comment.
Restore packing for cloned dd-trace-js sources
When binaries/dd-trace-js is present (the documented “clone a custom tracer in binaries” flow), this now installs the source directory directly with bun add instead of first running npm pack. The previous npm pack path ran the package lifecycle before producing the tarball; npm documents npm pack as running prepack/prepare, and current dd-trace-js defines those scripts plus a files list for generated artifacts. I also checked bun add --help/Bun docs and reproduced that bun add --trust /path/to/pkg does not run prepack, so the image can end up with an unprepared dd-trace checkout and fail to load missing generated files. Please keep packaging the local checkout (or explicitly run the equivalent lifecycle) before installing it.
Useful? React with 👍 / 👎.
Summary
npmwithbunfor dependency installation in parametric testsanthropic-js,openai-js, andgoogle-genai-jsweblogs to usebun installbun.locklockfiles for reproducible buildsinstall_ddtrace.shfrom the shellcheck TODO list (now clean)Dependencies
None — this PR is independent and can be merged in any order.
Test plan
🤖 Generated with Claude Code