Skip to content

Commit 711d006

Browse files
build(deps-dev): bump fastify from 3.29.0 to 4.0.1 (#182)
1 parent 05bf6e1 commit 711d006

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ When you build plugins for Fastify and you want that them to be accessible in th
1010
1. Use the `skip-override` hidden property
1111
2. Use this module
1212

13+
__Note: the v4.x series of this module covers Fastify v4__
1314
__Note: the v2.x & v3.x series of this module covers Fastify v3. For Fastify v2 support, refer to the v1.x series.__
1415

1516
## Usage
@@ -50,7 +51,7 @@ const fp = require('fastify-plugin')
5051
module.exports = fp(function (fastify, opts, next) {
5152
// your plugin code
5253
next()
53-
}, { fastify: '3.x' })
54+
}, { fastify: '4.x' })
5455
```
5556

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

7172
module.exports = fp(plugin, {
72-
fastify: '3.x',
73+
fastify: '4.x',
7374
name: 'your-plugin-name'
7475
})
7576
```
@@ -86,7 +87,7 @@ function plugin (fastify, opts, next) {
8687
}
8788

8889
module.exports = fp(plugin, {
89-
fastify: '3.x',
90+
fastify: '4.x',
9091
decorators: {
9192
fastify: ['plugin1', 'plugin2'],
9293
reply: ['compress']

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"homepage": "https://github.com/fastify/fastify-plugin#readme",
2727
"devDependencies": {
2828
"@types/node": "^17.0.0",
29-
"fastify": "^3.3.0",
29+
"fastify": "^4.0.1",
3030
"proxyquire": "^2.1.3",
3131
"standard": "^17.0.0",
3232
"tap": "^16.0.1",

test/bundlers.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('webpack removes require.main.filename', (t) => {
2020
fp((fastify, opts, next) => {
2121
next()
2222
}, {
23-
fastify: '^3.0.0'
23+
fastify: '^4.0.0'
2424
})
2525

2626
t.end()

test/checkVersion.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test('checkVersion having require.main.filename', (t) => {
1717
fp((fastify, opts, next) => {
1818
next()
1919
}, {
20-
fastify: '^3.0.0'
20+
fastify: '^4.0.0'
2121
})
2222

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

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

7272
t.end()

test/test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ test('should check fastify dependency graph - plugin', t => {
183183
const fastify = Fastify()
184184

185185
fastify.register(fp((fastify, opts, next) => next(), {
186-
fastify: '3.x',
186+
fastify: '4.x',
187187
name: 'plugin1-name'
188188
}))
189189

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

205205
fastify.decorate('plugin1', fp((fastify, opts, next) => next(), {
206-
fastify: '3.x',
206+
fastify: '4.x',
207207
name: 'plugin1-name'
208208
}))
209209

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

225225
fastify.decorateReply('plugin1', fp((fastify, opts, next) => next(), {
226-
fastify: '3.x',
226+
fastify: '4.x',
227227
name: 'plugin1-name'
228228
}))
229229

230230
fastify.register(fp((fastify, opts, next) => next(), {
231-
fastify: '3.x',
231+
fastify: '4.x',
232232
name: 'test',
233233
decorators: { reply: ['plugin1', 'plugin2'] }
234234
}))

0 commit comments

Comments
 (0)