-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Disable setting default user-agent #1495
Conversation
Can you please fix the tests @apoorv-mishra? |
Revert "Disable setting default user-agent" This reverts commit 01841cc6fc2e5884b2259bf369d0ffba8d5618c1. Disable setting default user-agent Remove unused var
@niftylettuce Updated. |
I've released this as v5.1.0 to npm, it has a minor version bump because existing users may have issues with the user-agent being stripped in this version.
https://github.com/visionmedia/superagent/releases/tag/v5.1.0 |
IMHO, this would have been better as a breaking / major change. |
For instance this does break https://github.com/lambtron/get-stargazers-emails - FWIW |
Previously we were relying on VERSION.txt for the name of the latest release, however this doesn't work in scenarios where we have changed the version number in preperation but have not yet made the release, as we found recently (see issue #1205). Instead we get the latest release version using the GitHub API [[1]]. Note that we have to drop the `v` at the beginning of the tag name, because for some reason GitHub doesn't include that in the archive file name. This commit uses the `superagent` library to do the request to avoid a lot of boilerplate; note that we have to set the user agent to something, because otherwise GitHub will forbid the request [[2]]. [1]: #1205 (comment) [2]: ladjs/superagent#1495 (comment)
Fixes #1479