Skip to content

Releases: asd-xiv/blocks

v3.6.0

18 Feb 15:23
Compare
Choose a tag to compare

3.6.0 (2020-02-18)

Features

  • Add tests for permission checks and response accept header (d3a3f0d)
  • AuthError and NotFoundError respond with same template (f5d62f9)

v3.5.0

18 Feb 12:22
Compare
Choose a tag to compare

3.5.0 (2020-02-18)

Features

  • Add tests for form submission with fields and files (03ab7a7)

v3.4.0

18 Feb 11:52
Compare
Choose a tag to compare

3.4.0 (2020-02-18)

Features

  • Respect req.accept header. Support application/json and text/plain. (0b1494d)

v3.3.0

18 Feb 11:50
Compare
Choose a tag to compare

3.3.0 (2020-02-18)

Features

  • Add multipart/form-data and file upload support to body parser (ec7cd3a)

v3.2.0

18 Feb 11:45
Compare
Choose a tag to compare

3.2.0 (2020-02-18)

Features

  • Add "x-content-type" header with parsed data from "content-type" lib. Will make schema validation simple, not needing regexp anymore. (bf64145)

v3.1.0

18 Feb 10:48
Compare
Choose a tag to compare

3.1.0 (2020-02-18)

Features

  • Move route-exists check middleware before processing request data (f6f8a9f)

v3.0.0

11 Jan 21:55
Compare
Choose a tag to compare

3.0.0 (2020-01-11)

Features

  • Change "block" resolve and update plugin manager. (e9574ee)

BREAKING CHANGES

  • Change what block resolves to:
const app = block({
  plugins: glob.sync(...),
  routes: glob.sync(...),
})

  // old
  .then(({ Plugins, middlewarePipeline }) => {
  ...
  })

  // new
  .then(([middleware, plugins]) => {
  ...
  })

Defining plugins:

module.exports = {
  depend: ["Lorem"],

  // old
  create: (/* props */) => Lorem => {
    console.log("Checking DB connection")

    // Database connection, model loading etc
    ...
    return {
      Todos: ...,
      Comments: ...,
    }
  }

  // new - no more props, use env vars
  create: Lorem => {
    console.log("Checking DB connection")

    // Database connection, model loading etc
    ...
    return {
      Todos: ...,
      Comments: ...,
    }
  }
}

v2.0.1

21 Nov 18:09
Compare
Choose a tag to compare

2.0.1 (2019-11-21)

Bug Fixes

  • Refactor Helmet middleware (691043c)

v2.0.0

20 Nov 12:03
Compare
Choose a tag to compare

2.0.0 (2019-11-20)

Features

  • Deprecate Config Plugin (d54f2c8)
  • Parse body content with "qs" for req with content type "x-www-form-urlencoded" (e1c54f6)

BREAKING CHANGES

  • Default Config plugin is no longer available in Plugin object.

All env setting should be accessed directly from "process.env" and processed locally where they are used.

v1.3.2

22 Oct 12:26
Compare
Choose a tag to compare

1.3.2 (2019-10-22)

Bug Fixes

  • If route action returns null or undefined, respond with empty object (1335df3)