The Wayback Machine - https://web.archive.org/web/20200711045911/https://github.com/IcedFrisby/IcedFrisby/pull/107
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

Reduce the indirection through _outgoing in _request #107

Merged
merged 1 commit into from Jan 30, 2018
Merged

Conversation

@paulmelnikow
Copy link
Collaborator

paulmelnikow commented Dec 30, 2017

This isn't an obvious win, though it should facilitate further cleanup in _makeRequest().

@Fishbowler I'm curious, currently the documentation for the params passed to each command calls out four supported parameters. The implementation, in most cases, actually passes through unknown parameters to request(). Do you think that's desirable? If we were to change the implementation so it only worked with the documented parameters, do you think that would be a breaking change?

const params = typeof args[0] === 'object' && args.shift()
const outgoing = {

This comment has been minimized.

Copy link
@paulmelnikow

paulmelnikow Dec 30, 2017

Author Collaborator

This code was moved into _makeRequest() below, with a few changes.

@Fishbowler
Copy link
Collaborator

Fishbowler commented Jan 6, 2018

I noticed that too. Those 4 params were reverse engineered from having read the code and deduced (incorrectly) what was actually used. In reality, this is a set of options for request plus some extra bits of our own, no?

@Fishbowler
Copy link
Collaborator

Fishbowler commented Jan 6, 2018

This all looks like sensible replumbing. I've checked it out in place of the published npm package, and all of my tests act as I'd expect. There's some slightly different behaviour in failing tests when all run together, but that's looking to be the peculiarities of my repo and caused by #93 (in this case, different tests failing) and hopefully #106 will help to resolve it.

Unless you have any concerns, I'm happy to merge.

@paulmelnikow
Copy link
Collaborator Author

paulmelnikow commented Jan 6, 2018

Yea, sounds great. Let's discuss the params issue further at some point.

@Fishbowler Fishbowler merged commit 27695d3 into master Jan 30, 2018
2 of 3 checks passed
2 of 3 checks passed
coverage/coveralls Coverage decreased (-0.9%) to 94.737%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@paulmelnikow paulmelnikow deleted the refactor-request branch Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.