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

Good 6.0.0 Release Notes #323

Closed
arb opened this issue Apr 3, 2015 · 1 comment
Closed

Good 6.0.0 Release Notes #323

arb opened this issue Apr 3, 2015 · 1 comment

Comments

@arb
Copy link
Contributor

@arb arb commented Apr 3, 2015

Summary

The main goal of the 6.0.0 release was to change the main reporter interface to make it a little cleaner and more expandable. Also adding some new features as well.

  • Upgrade time: low - you'll just have to change your config options into good
  • Complexity: low - change your options and your version of hapi
  • Risk: low to moderate - the usual risks with a new major release.
  • Dependencies: high - all of the good-reporter will have to be updated to newest versions that adhere to the new pipe interface.

Breaking Changes

  • Rename logRequestHeaders, logRequestPayload, logResponsePayload to requestHeaders, requestPayload, responsePayload.
  • Completed overhauled the reporter interface. The quick summary is that reporter need to implement a constructor that accepts events and config values and returns a new reporter object. The object must have an init function that accepts three arguments; a readable stream, and event emitter, and a callback. To report events, you can either pipe the read stream though a series of transforms and write streams or listen for the "data" events.

New Features

  • Listen for "wreck" events
  • Listen for custom events emitted from hapi via extensions
  • More robust reporting options dia to pipe and stream interface

Updated Dependencies

  • None

Migration

  • Change any uses of logRequestHeaders, logRequestPayload, logResponsePayload to requestHeaders, requestPayload, responsePayload
  • Update major versions of all the reporters you are using
  • Update your reporter options
var options = {
    reporters: [{
        reporter: require('good-file'),
        args: ['./__log.log', {
            request: '*'
        }]
    }]
};

needs to be updated to

var options = {
    reporters: [{
        reporter: require('good-file'),
        events: {
            request: '*'
        },
        config: './__log.log'
    }]
};
@arb arb added this to the 6.0.0 milestone Apr 3, 2015
@arb arb closed this Apr 7, 2015
@gergoerdosi

This comment has been minimized.

Copy link
Contributor

@gergoerdosi gergoerdosi commented Apr 8, 2015

Just a note, there is a missing comma in the example after the events object:

events: {
    request: '*'
},
config: './__log.log'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.