Skip to content

v4.0.0

Compare
Choose a tag to compare
@callum-oakley callum-oakley released this 20 Oct 10:18
· 56 commits to master since this release

[BREAKING CHANGE] Methods that previously took callbacks now return promises.

  • trigger, triggerBatch, get, and post return a promise which resolves
    to a Response (as provided by node-fetch),
    or rejects to a RequestError. Of particular note:
    • Response has a status where is used to have a statusCode.
    • RequestError has a status where is used to have a statusCode to
      mirror the above.
    • Response has
      json,
      text, etc to
      access the body where before it exposed body as a string.

[BREAKING CHANGE] The Pusher constructor no longer accepts proxy or keepAlive, but instead accepts agent.

const pusher = new Pusher.forURL(process.env.PUSHER_URL, {
  agent: new HttpsProxyAgent("http://localhost:8321"),
})
  • To configure keep alive:
const pusher = new Pusher.forURL(process.env.PUSHER_URL, {
  agent: new https.Agent({ keepAlive: true }),
})

[REMOVED] Specific Parse Cloud build. I don't believe it is required any more, but please open an issue if there are any problems using this release on Parse Cloud!