Skip to content

Standardization (BREAKING CHANGES)

Compare
Choose a tag to compare
@ysa23 ysa23 released this 08 Feb 18:25
· 64 commits to master since this release
ceb0eae

Refactor the package according to current standards:

  • All files under src folder
  • Avoid using this in constructor functions as much as possible
  • RORO in all constructors
  • Return object in exports

In this release there are breaking changes with reference to version 0.10.1 and eariler:

  • Metrics object constructor now uses RORO instead of inline parameters: new Metrics([reporter1, reporter1]) => new Metrics({ reporters: [reporter1,reporter2] })
  • InMemoryReporter object constructor now uses RORO instead of inline parameters: new InMemoryReporter([]) => `new InMemoryReporter({ buffer: [] })
  • StringReporter object constructor now use RORO instead of inline parameters: new StringReporter(stat => { }) => new StringReporter({ action: stat => {} })
  • DataDogReporter: defaultTags option has been renamed to tags
  • All exported objects (Metrics and reporters) now has rigid input validation with reference to previous versions, so they will fail early upon intialization

All of these changes have been reflected in the documentation.