You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

fastify-cloudevents

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-cloudevents - npm Package Compare versions

Comparing version

to
2.5.0

9

CHANGELOG.md
# Change Log
## [2.5.0](https://github.com/smartiniOnGitHub/fastify-cloudevents/releases/tag/2.5.0) (2020-10-02)
[Full Changelog](https://github.com/smartiniOnGitHub/fastify-cloudevents/compare/2.4.0...2.5.0)
Summary Changelog:
- Update requirements to latest Fastify 2.x, so currently release '^2.15.0'
- Feature: update the 'onReady' hook due to an improvement done in Fastify 2.15.0
- Feature: keep compatibility with Node.js 8 (only for plugin releases 2.x)
## [2.4.0](https://github.com/smartiniOnGitHub/fastify-cloudevents/releases/tag/2.4.0) (2020-10-01)

@@ -10,3 +17,3 @@ [Full Changelog](https://github.com/smartiniOnGitHub/fastify-cloudevents/compare/2.3.0...2.4.0)

- Update requirements to a more recent Fastify, release '^2.12.0'
- Feature: keep compatibility with Node.js 8 (but this is latest release that supports it)
- Feature: keep compatibility with Node.js 8
- Update dependencies for the development environment

@@ -13,0 +20,0 @@ - Other minor changes

4

package.json
{
"name": "fastify-cloudevents",
"version": "2.4.0",
"version": "2.5.0",
"description": "Fastify Plugin to serialize events in the CloudEvents standard format",

@@ -25,3 +25,3 @@ "main": "src/plugin",

"devDependencies": {
"fastify": "^2.12.0",
"fastify": "^2.15.3",
"standard": "^14.3.4",

@@ -28,0 +28,0 @@ "tap": "^14.10.8"

@@ -62,3 +62,3 @@ # fastify-cloudevents

Fastify ^2.12.0 , Node.js 8.17.x or later.
Fastify ^2.15.0 , Node.js 8.17.x or later.
Note that plugin releases 2.x are for Fastify 2.x, etc.

@@ -65,0 +65,0 @@

@@ -168,3 +168,2 @@ /*

onRequestCallback(ce)
done()

@@ -178,3 +177,2 @@ })

preParsingCallback(ce)
done()

@@ -188,3 +186,2 @@ })

preValidationCallback(ce)
done()

@@ -198,3 +195,2 @@ })

preHandlerCallback(ce)
done()

@@ -208,3 +204,2 @@ })

preSerializationCallback(ce)
done()

@@ -240,3 +235,2 @@ })

onErrorCallback(ce)
done() // do not pass the error to the done callback here

@@ -250,3 +244,2 @@ })

onSendCallback(ce)
done()

@@ -261,3 +254,2 @@ })

onResponseCallback(ce)
done()

@@ -268,3 +260,3 @@ })

if (onCloseCallback !== null) {
// hook to plugin shutdown, not server
// hook to plugin shutdown
fastify.addHook('onClose', (instance, done) => {

@@ -279,3 +271,2 @@ const ce = new fastify.CloudEvent(idGenerator.next().value,

onCloseCallback(ce)
done()

@@ -312,11 +303,14 @@ })

if (onReadyCallback !== null) {
// hook to plugin successful startup, not server
const ce = new fastify.CloudEvent(idGenerator.next().value,
`${baseNamespace}.onReady`,
builders.buildSourceUrl(),
builders.buildPluginDataForCE('plugin startup successfully'), // data
cloudEventOptions,
cloudEventExtensions
)
fastify.ready(onReadyCallback(ce))
// triggered before the server starts listening for requests
fastify.addHook('onReady', (done) => {
const ce = new fastify.CloudEvent(idGenerator.next().value,
`${baseNamespace}.onReady`,
builders.buildSourceUrl(),
builders.buildPluginDataForCE('plugin ready'), // data
cloudEventOptions,
cloudEventExtensions
)
onReadyCallback(ce)
done()
})
}

@@ -367,4 +361,4 @@

module.exports = fp(fastifyCloudEvents, {
fastify: '^2.12.0',
fastify: '^2.15.0',
name: 'fastify-cloudevents'
})