-
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
Mixin RequestBase functions from a prototype #1088
Mixin RequestBase functions from a prototype #1088
Conversation
* Make RequestBase a constructor function * Make it mixin its prototype functions when called as a function * Unifies mixin approach with Emitter * Fixes global scope issues in module bundlers like rollup.js
Red build on TravisCI doesn't seem to be a code issue. |
Thank you for the PR. That looks like a good way to solve it. I wonder if we need to bump semver-major for this? (will this impact supertest, plugins or mocking?) WDYT @focusaurus? |
It might be worth getting some explicit coordination from the supertest maintainers on this branch before merging. I believe their mechanism to integrate with superagent will continue to work but I think it would be worthwhile to test. Looks like @mikelax is the most recent active maintainer. Perhaps I could try to pull down the supertest repo, integrate it with this branch of superagent, and see if their unit tests still pass. |
I was able to:
So that's a good sign. |
Pragmatically I don't think there's much harm done in treating this as semver major even if in retrospect we find out nothing important broke. That's probably better than semver minor that unexpectedly breaks some integration, so I wouldn't sweat it too much. |
Cool. Let's do that as semver-major. It's now (unrelated to this issue) also a good time to drop Node 0.10 support (official support has ended), which might be seen as semver-major too. |
Hi, this patch is in master but not in the latest release: would it be possible to release so that |
This PR is an alternative solution to #1076
References #1076
See also:
rollup/rollup#1007
rollup/rollup#1023
rollup/rollup-plugin-commonjs#127