Skip to content

v52.0.0

Latest
Compare
Choose a tag to compare
@cozy-bot cozy-bot released this 20 Dec 17:16

52.0.0 (2024-12-20)

Features

  • Allow to enforce Stack link on request chain (6aac845)

BREAKING CHANGES

  • CozyLink's request methods now takes an additional
    options argument that can be used to enforce usage of Stack link.
    Although .request() is meant to be an internal API, if your code
    calls it, you'll want to introduce a new argument for options. This
    is also the case if you instanciate a new CozyLink with a handler
    argument for request

Before:

// Initialization
new CozyLink((operation, result = '', forward) => {
  return forward(operation, result + 'foo')
})

// Call
link.request(operation)

// Call with result and forward
link.request(operation, null, () => { /* do stuff */ })

After:

// Initialization
new CozyLink((operation, options, result = '', forward) => {
  return forward(operation, options, result + 'foo')
})

// Call
link.request(operation, options)

// Call with result and forward
link.request(operation, options, null, () => { /* do stuff */ })