Skip to content

fix(profiling-node): Fix NODE_VERSION rendered as [object Object] in warning #19789

@github-actions

Description

@github-actions

Note

The pull request "fix(profiling-node): Fix NODE_VERSION rendered as [object Object] in warning" was created by @logaretm but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.

Summary

  • NODE_VERSION is a SemVer object ({ major, minor, patch }) from parseSemver() with no custom toString(). Interpolating it in a template literal produced [object Object] instead of the actual version number.
  • Since the surrounding check is ![16, 18, 20, 22, 24].includes(NODE_MAJOR), it makes more sense to log NODE_MAJOR (a number) in the warning message anyway.
  • Added a test verifying that NODE_VERSION has no custom toString() to prevent future misuse.

Test plan

  • Added unit test confirming NODE_VERSION stringifies as [object Object]
  • Existing profiling-node tests pass

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions