npm fastify-micro 3.0.0
v3.0.0

latest releases: 3.1.1, 3.1.1-beta.1, 3.1.0...
2 years ago

3.0.0 (2021-11-20)

Features

  • Add log path redaction option (fc23205), closes #405
  • Listen by default on port 3000 (71904ce)
  • Simplify Sentry request reporting (c8ac70e), closes #398
  • Use native under-pressure health check (9ee68f5)
  • Use TypeScript declaration merging (a2cdcd7), closes #399

BREAKING CHANGES

General: Options and the createServer function are no longer generic (leveraging TypeScript declaration merging).

Sentry: rather than passing the request object as the second argument of the server's report function, the Sentry decoration can now be accessed from the request object, for request-enriched reports.

Migration example from the documentation:

const exampleRoute = (req, res) => {
  const error = new Error('Error from a route')

  // version 2.x.x
  server.sentry.report(error, req, {
    // Extra context
  })

  // version 3.x.x
  req.sentry.report(error, {
    // Extra context
  })
}

Don't miss a new fastify-micro release

NewReleases is sending notifications on new releases.