Skip to content

Conversation

@ctran88
Copy link
Contributor

@ctran88 ctran88 commented Feb 12, 2025

What's New?

adds missing passage-node prefix to version header value

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have manually tested my code thoroughly
  • I have added/updated inline documentation for public facing interfaces if relevant
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing integration and unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional context

@ctran88 ctran88 marked this pull request as ready for review February 12, 2025 19:15
...config?.headers,
'Authorization': `Bearer ${config?.accessToken}`,
'Passage-Version': process.env.npm_package_version || '',
'Passage-Version': `passage-node ${process.env.npm_package_version ?? ''}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be cleaner to leave the header unset if process.env.npm_package_version isn’t defined, to avoid a trailing space in "passage-node ".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it would still be useful to log requests that are coming from this sdk even if the version were missing instead of not at all?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah possibly. The only case where this would happen seems to be if someone were testing the source repo directly rather than the package itself. Using a dev or v0.0.0 placeholder could help in those cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in 276dd32

… the source code instead of the published package
@sonarqubecloud
Copy link

@ctran88 ctran88 merged commit bedfb81 into main Feb 13, 2025
7 checks passed
@ctran88 ctran88 deleted the PSG-5910-add-version-header-prefix branch February 13, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants