Skip to content

Commit 270160d

Browse files
authored
chore: update min fastify version (#245)
1 parent e8c5a07 commit 270160d

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const fp = require('fastify-plugin')
5757
module.exports = fp(function (fastify, opts, done) {
5858
// your plugin code
5959
done()
60-
}, { fastify: '4.x' })
60+
}, { fastify: '5.x' })
6161
```
6262

6363
If you need to check the Fastify version only, you can pass just the version string.
@@ -76,7 +76,7 @@ function plugin (fastify, opts, done) {
7676
}
7777

7878
module.exports = fp(plugin, {
79-
fastify: '4.x',
79+
fastify: '5.x',
8080
name: 'your-plugin-name'
8181
})
8282
```
@@ -93,7 +93,7 @@ function plugin (fastify, opts, done) {
9393
}
9494

9595
module.exports = fp(plugin, {
96-
fastify: '4.x',
96+
fastify: '5.x',
9797
decorators: {
9898
fastify: ['plugin1', 'plugin2'],
9999
reply: ['compress']
@@ -117,7 +117,7 @@ function plugin (fastify, opts, done) {
117117

118118
module.exports = fp(plugin, {
119119
name: 'my-encapsulated-plugin',
120-
fastify: '4.x',
120+
fastify: '5.x',
121121
decorators: {
122122
fastify: ['plugin1', 'plugin2'],
123123
reply: ['compress']

test/bundlers.test.js

+1-1
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: '^4.0.0'
23+
fastify: '^5.0.0'
2424
})
2525

2626
t.end()

test/checkVersion.test.js

+3-3
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: '^4.0.0'
20+
fastify: '^5.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: '^4.0.0'
43+
fastify: '^5.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: '^4.0.0'
69+
fastify: '^5.0.0'
7070
})
7171

7272
t.end()

test/esm/esm.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ t.test('esm base support', async t => {
66
fp((fastify, opts, next) => {
77
next()
88
}, {
9-
fastify: '^3.0.0'
9+
fastify: '^5.0.0'
1010
})
1111

1212
t.end()

0 commit comments

Comments
 (0)