Skip to content

Boltzmann v0.5.0

Compare
Choose a tag to compare
@github-actions github-actions released this 01 Jun 22:52
v0.5.0
eb4252a

Boltzmann is now implemented in 100% TypeScript. It can scaffold either JavaScript or TypeScript projects.

$ npm init boltzmann --typescript # for typescript
$ npm init boltzmann # for javascript

If you had previously used Boltzmann for TypeScript you will find that the type definitions are much more complete & fully featured.

Breaking changes

  • TypeScript users must use import { .. } from './boltzmann' instead of import { .. } from './boltzmann.js' – note the lack of the .js.
  • The signatures of handlers changed. Handlers are no longer called with route parameters as a second argument. Parameters are now available as context.params.
  • Routing happens before middleware; middleware that adjusts the URL will no longer affect routing behavior
  • AJV validates schemas for validate.{body,params,query}; invalid schemas will throw errors in development.
  • AJV version bumped from v6 to v8.
    • dataPath is now instancePath. Dotted lookup inside is now /-based
      instead. E.g., given an error at "foo":
      • BEFORE: {"dataPath": ".foo.bar"}
      • AFTER: {"instancePath": "/foo/bar"}
    • Error messaging changed ("must" replaces "should"):
      • BEFORE: "should have required property 'bar'"
      • AFTER: "must have required property 'bar'"
    • All schema errors are now returned, not just the first.
    • ajv@7 changes how ajv instances are constructed and removes builtin
      formats and keywords. See 1.
    • ajv@8 changes some details about error formatting. See 2.
  • Handy-redis upgraded from 1.8.1 to v2.2.1
    • This changes the exported type.