Skip to content

Commit

Permalink
build(deps-dev): bump fastify from 3.29.0 to 4.0.1 (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Jun 18, 2022
1 parent 05bf6e1 commit 711d006
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ When you build plugins for Fastify and you want that them to be accessible in th
1. Use the `skip-override` hidden property
2. Use this module

__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.__

## Usage
Expand Down Expand Up @@ -50,7 +51,7 @@ const fp = require('fastify-plugin')
module.exports = fp(function (fastify, opts, next) {
// your plugin code
next()
}, { fastify: '3.x' })
}, { fastify: '4.x' })
```

If you need to check the Fastify version only, you can pass just the version string.
Expand All @@ -69,7 +70,7 @@ function plugin (fastify, opts, next) {
}

module.exports = fp(plugin, {
fastify: '3.x',
fastify: '4.x',
name: 'your-plugin-name'
})
```
Expand All @@ -86,7 +87,7 @@ function plugin (fastify, opts, next) {
}

module.exports = fp(plugin, {
fastify: '3.x',
fastify: '4.x',
decorators: {
fastify: ['plugin1', 'plugin2'],
reply: ['compress']
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"homepage": "https://github.com/fastify/fastify-plugin#readme",
"devDependencies": {
"@types/node": "^17.0.0",
"fastify": "^3.3.0",
"fastify": "^4.0.1",
"proxyquire": "^2.1.3",
"standard": "^17.0.0",
"tap": "^16.0.1",
Expand Down
2 changes: 1 addition & 1 deletion test/bundlers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('webpack removes require.main.filename', (t) => {
fp((fastify, opts, next) => {
next()
}, {
fastify: '^3.0.0'
fastify: '^4.0.0'
})

t.end()
Expand Down
6 changes: 3 additions & 3 deletions test/checkVersion.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('checkVersion having require.main.filename', (t) => {
fp((fastify, opts, next) => {
next()
}, {
fastify: '^3.0.0'
fastify: '^4.0.0'
})

t.end()
Expand All @@ -40,7 +40,7 @@ test('checkVersion having no require.main.filename but process.argv[1]', (t) =>
fp((fastify, opts, next) => {
next()
}, {
fastify: '^3.0.0'
fastify: '^4.0.0'
})

t.end()
Expand All @@ -66,7 +66,7 @@ test('checkVersion having no require.main.filename and no process.argv[1]', (t)
fp((fastify, opts, next) => {
next()
}, {
fastify: '^3.0.0'
fastify: '^4.0.0'
})

t.end()
Expand Down
12 changes: 6 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ test('should check fastify dependency graph - plugin', t => {
const fastify = Fastify()

fastify.register(fp((fastify, opts, next) => next(), {
fastify: '3.x',
fastify: '4.x',
name: 'plugin1-name'
}))

fastify.register(fp((fastify, opts, next) => next(), {
fastify: '3.x',
fastify: '4.x',
name: 'test',
dependencies: ['plugin1-name', 'plugin2-name']
}))
Expand All @@ -203,12 +203,12 @@ test('should check fastify dependency graph - decorate', t => {
const fastify = Fastify()

fastify.decorate('plugin1', fp((fastify, opts, next) => next(), {
fastify: '3.x',
fastify: '4.x',
name: 'plugin1-name'
}))

fastify.register(fp((fastify, opts, next) => next(), {
fastify: '3.x',
fastify: '4.x',
name: 'test',
decorators: { fastify: ['plugin1', 'plugin2'] }
}))
Expand All @@ -223,12 +223,12 @@ test('should check fastify dependency graph - decorateReply', t => {
const fastify = Fastify()

fastify.decorateReply('plugin1', fp((fastify, opts, next) => next(), {
fastify: '3.x',
fastify: '4.x',
name: 'plugin1-name'
}))

fastify.register(fp((fastify, opts, next) => next(), {
fastify: '3.x',
fastify: '4.x',
name: 'test',
decorators: { reply: ['plugin1', 'plugin2'] }
}))
Expand Down

0 comments on commit 711d006

Please sign in to comment.