fastify-plugin
Advanced tools
Comparing version 3.0.1 to 4.0.0
{ | ||
"name": "fastify-plugin", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"description": "Plugin helper for Fastify", | ||
@@ -28,8 +28,8 @@ "main": "plugin.js", | ||
"devDependencies": { | ||
"@types/node": "^17.0.0", | ||
"fastify": "^3.3.0", | ||
"@types/node": "^18.0.0", | ||
"fastify": "^4.0.1", | ||
"proxyquire": "^2.1.3", | ||
"standard": "^16.0.3", | ||
"tap": "^15.0.2", | ||
"tsd": "^0.19.0", | ||
"standard": "^17.0.0", | ||
"tap": "^16.0.1", | ||
"tsd": "^0.22.0", | ||
"typescript": "^4.0.5" | ||
@@ -36,0 +36,0 @@ }, |
@@ -5,4 +5,2 @@ # fastify-plugin | ||
[![NPM version](https://img.shields.io/npm/v/fastify-plugin.svg?style=flat)](https://www.npmjs.com/package/fastify-plugin) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-plugin/badge.svg)](https://snyk.io/test/github/fastify/fastify-plugin) | ||
[![Coverage Status](https://coveralls.io/repos/github/fastify/fastify-plugin/badge.svg?branch=master)](https://coveralls.io/github/fastify/fastify-plugin?branch=master) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) | ||
@@ -16,2 +14,3 @@ | ||
__Note: the v4.x series of this module covers Fastify v4__ | ||
__Note: the v2.x & v3.x series of this module covers Fastify v3. For Fastify v2 support, refer to the v1.x series.__ | ||
@@ -57,3 +56,3 @@ | ||
next() | ||
}, { fastify: '3.x' }) | ||
}, { fastify: '4.x' }) | ||
``` | ||
@@ -77,3 +76,3 @@ | ||
module.exports = fp(plugin, { | ||
fastify: '3.x', | ||
fastify: '4.x', | ||
name: 'your-plugin-name' | ||
@@ -95,3 +94,3 @@ }) | ||
module.exports = fp(plugin, { | ||
fastify: '3.x', | ||
fastify: '4.x', | ||
decorators: { | ||
@@ -98,0 +97,0 @@ fastify: ['plugin1', 'plugin2'], |
@@ -23,3 +23,3 @@ 'use strict' | ||
}, { | ||
fastify: '^3.0.0' | ||
fastify: '^4.0.0' | ||
}) | ||
@@ -26,0 +26,0 @@ |
@@ -20,3 +20,3 @@ 'use strict' | ||
}, { | ||
fastify: '^3.0.0' | ||
fastify: '^4.0.0' | ||
}) | ||
@@ -44,3 +44,3 @@ | ||
}, { | ||
fastify: '^3.0.0' | ||
fastify: '^4.0.0' | ||
}) | ||
@@ -71,3 +71,3 @@ | ||
}, { | ||
fastify: '^3.0.0' | ||
fastify: '^4.0.0' | ||
}) | ||
@@ -74,0 +74,0 @@ |
@@ -186,3 +186,3 @@ 'use strict' | ||
fastify.register(fp((fastify, opts, next) => next(), { | ||
fastify: '3.x', | ||
fastify: '4.x', | ||
name: 'plugin1-name' | ||
@@ -192,3 +192,3 @@ })) | ||
fastify.register(fp((fastify, opts, next) => next(), { | ||
fastify: '3.x', | ||
fastify: '4.x', | ||
name: 'test', | ||
@@ -208,3 +208,3 @@ dependencies: ['plugin1-name', 'plugin2-name'] | ||
fastify.decorate('plugin1', fp((fastify, opts, next) => next(), { | ||
fastify: '3.x', | ||
fastify: '4.x', | ||
name: 'plugin1-name' | ||
@@ -214,3 +214,3 @@ })) | ||
fastify.register(fp((fastify, opts, next) => next(), { | ||
fastify: '3.x', | ||
fastify: '4.x', | ||
name: 'test', | ||
@@ -230,3 +230,3 @@ decorators: { fastify: ['plugin1', 'plugin2'] } | ||
fastify.decorateReply('plugin1', fp((fastify, opts, next) => next(), { | ||
fastify: '3.x', | ||
fastify: '4.x', | ||
name: 'plugin1-name' | ||
@@ -236,3 +236,3 @@ })) | ||
fastify.register(fp((fastify, opts, next) => next(), { | ||
fastify: '3.x', | ||
fastify: '4.x', | ||
name: 'test', | ||
@@ -239,0 +239,0 @@ decorators: { reply: ['plugin1', 'plugin2'] } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
28423
158