Socket
Socket
Sign inDemoInstall

fastify-plugin

Package Overview
Dependencies
1
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0 to 1.6.0

test/types.test.ts

3

fastify-plugin.d.ts
/// <reference types="fastify" />
import * as fastify from 'fastify';
import { Server, IncomingMessage, ServerResponse } from 'http'

@@ -14,3 +15,3 @@ /**

*/
declare function fastifyPlugin<HttpServer, HttpRequest, HttpResponse, T>(
declare function fastifyPlugin<HttpServer = Server, HttpRequest = IncomingMessage, HttpResponse = ServerResponse, T = any>(
fn: fastify.Plugin<HttpServer, HttpRequest, HttpResponse, T> | { default: fastify.Plugin<HttpServer, HttpRequest, HttpResponse, T> },

@@ -17,0 +18,0 @@ options?: fastifyPlugin.PluginOptions | string,

{
"name": "fastify-plugin",
"version": "1.5.0",
"version": "1.6.0",
"description": "Plugin helper for Fastify",

@@ -27,18 +27,18 @@ "main": "index.js",

"devDependencies": {
"@types/node": "^9.6.41",
"fastify": "^1.14.1",
"proxyquire": "^2.0.1",
"standard": "^12.0.0",
"tap": "^12.5.1",
"ts-node": "^7.0.0",
"typescript": "^2.9.2"
"fastify": "^2.0.0",
"proxyquire": "^2.1.0",
"standard": "^12.0.1",
"tap": "^12.6.5",
"typescript": "^3.3.3",
"@types/node": "^11.9.3"
},
"dependencies": {
"semver": "^5.5.0"
"semver": "^6.0.0"
},
"greenkeeper": {
"ignore": [
"@types/node"
"@types/node",
"tap"
]
}
}

@@ -228,3 +228,3 @@ 'use strict'

fastify.register(fp((fastify, opts, next) => next(), {
fastify: '1.x',
fastify: '2.x',
name: 'plugin1-name'

@@ -234,3 +234,3 @@ }))

fastify.register(fp((fastify, opts, next) => next(), {
fastify: '1.x',
fastify: '2.x',
name: 'test',

@@ -241,3 +241,3 @@ dependencies: ['plugin1-name', 'plugin2-name']

fastify.ready(err => {
t.is(err.message, `The dependency 'plugin2-name' is not registered`)
t.is(err.message, `The dependency 'plugin2-name' of plugin 'test' is not registered`)
})

@@ -251,3 +251,3 @@ })

fastify.decorate('plugin1', fp((fastify, opts, next) => next(), {
fastify: '1.x',
fastify: '2.x',
name: 'plugin1-name'

@@ -257,3 +257,3 @@ }))

fastify.register(fp((fastify, opts, next) => next(), {
fastify: '1.x',
fastify: '2.x',
name: 'test',

@@ -273,3 +273,3 @@ decorators: { fastify: ['plugin1', 'plugin2'] }

fastify.decorateReply('plugin1', fp((fastify, opts, next) => next(), {
fastify: '1.x',
fastify: '2.x',
name: 'plugin1-name'

@@ -279,3 +279,3 @@ }))

fastify.register(fp((fastify, opts, next) => next(), {
fastify: '1.x',
fastify: '2.x',
name: 'test',

@@ -282,0 +282,0 @@ decorators: { reply: ['plugin1', 'plugin2'] }

@@ -10,4 +10,4 @@ {

"files": [
"./types.test.ts"
"./test/types.test.ts"
]
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc