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

Release 3.0 #52

Closed
greim opened this issue Jul 25, 2015 · 2 comments
Closed

Release 3.0 #52

greim opened this issue Jul 25, 2015 · 2 comments

Comments

@greim
Copy link
Owner

greim commented Jul 25, 2015

Major version bump for the following breaking changes:

1) Interceptor done callbacks will be replaced by the cycle object.

// old signature
proxy.intercept('request', function(req, resp, done) {
  assert(typeof done === 'function');
  doSomethingAsyncThatTakesCallback(function(err) {
    done(err);
  });
});
// new signature
proxy.intercept('request', function(req, resp, cycle) {
  assert(typeof cycle !== 'function');
  assert(this === cycle);
  return doSomethingAsyncThatReturnsPromise();
});

The reason for this is that it simplifies the internals a bit, which makes the project incrementally less bug-prone and easier to maintain. But also, it allows writing interceptors as arrow functions, which otherwise wouldn't have access to the cycle object. (@nerdbeere)

2) CLI goes away

Not sure how many people used it beyond myself. I often forgot to update it as the project evolved, and by removing it I can focus on the core. Someone else is welcome to spin up a separate CLI project based on Hoxy, if they want.

3) hoxy.forever() goes away

This is an undocumented function that will go away.

@greim
Copy link
Owner Author

greim commented Jul 25, 2015

#42

@greim greim mentioned this issue Jul 25, 2015
@greim
Copy link
Owner Author

greim commented Jul 25, 2015

3.0.0-beta.0 is published.

@greim greim closed this as completed Jul 27, 2015
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

No branches or pull requests

1 participant