Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update user agent string for better debugging #680

Merged
merged 4 commits into from
Jul 28, 2021

Conversation

philnash
Copy link
Contributor

@philnash philnash commented Jul 7, 2021

This PR standardizes the format of our User-Agent string in twilio-node and provides the ability to pass additional information from upstream packages to be included. It follows the agreed pattern of:

<core-api-lib>/<core-api-lib-version> (<os-name> <os-arch>) node/<node-version> <extensions>

Where are being added space separated following:

<library>/<library-version>

or

<tag>

In this case the Twilio class allows you to pass in userAgentExtensions as an array to specify upstream libraries who use it to add their library name and version.

This could possibly be described as a breaking change as it will update the underlying User-Agent used by the default HTTP Client and anything that relies on that will need an update. I have not marked this as breaking yet though, as I am unsure if that would be a problem and I am interested in other opinions on this.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

philnash added 2 commits July 7, 2021 11:58
…de and provides the ability to pass additional information from upstream packages to be included. It follows the agreed pattern of:

<core-api-lib>/<core-api-lib-version> (<os-name> <os-arch>) node/<node-version> <extensions>

Where <extensions> are being added space separated following:

<library>/<library-version>

or

<tag>

In this case the Twilio class allows you to pass in `userAgentExtensions` as an array to specify upstream libraries who use it to add their library name and version.
Copy link
Contributor

@thinkingserious thinkingserious left a comment

Choose a reason for hiding this comment

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

I recommend marking this as a breaking change since the change could break folks.

lib/rest/Twilio.js Show resolved Hide resolved
spec/unit/rest/Twilio.spec.js Outdated Show resolved Hide resolved
@thinkingserious thinkingserious added status: waiting for feedback waiting for feedback from the submitter type: twilio enhancement feature request on Twilio's roadmap labels Jul 8, 2021
Copy link
Contributor

@thinkingserious thinkingserious left a comment

Choose a reason for hiding this comment

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

🎆

@philnash
Copy link
Contributor Author

Is there anything else that needs to be done for this PR? I notice that one of the checks that is required needs to be run, how do I do that?

@childish-sambino childish-sambino merged commit 3f015ce into twilio:main Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for feedback waiting for feedback from the submitter type: twilio enhancement feature request on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants