Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update min fastify version #245

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const fp = require('fastify-plugin')
module.exports = fp(function (fastify, opts, done) {
// your plugin code
done()
}, { fastify: '4.x' })
}, { fastify: '5.x' })
```

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

module.exports = fp(plugin, {
fastify: '4.x',
fastify: '5.x',
name: 'your-plugin-name'
})
```
Expand All @@ -93,7 +93,7 @@ function plugin (fastify, opts, done) {
}

module.exports = fp(plugin, {
fastify: '4.x',
fastify: '5.x',
decorators: {
fastify: ['plugin1', 'plugin2'],
reply: ['compress']
Expand All @@ -117,7 +117,7 @@ function plugin (fastify, opts, done) {

module.exports = fp(plugin, {
name: 'my-encapsulated-plugin',
fastify: '4.x',
fastify: '5.x',
decorators: {
fastify: ['plugin1', 'plugin2'],
reply: ['compress']
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: '^4.0.0'
fastify: '^5.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: '^4.0.0'
fastify: '^5.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: '^4.0.0'
fastify: '^5.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: '^4.0.0'
fastify: '^5.0.0'
})

t.end()
Expand Down
2 changes: 1 addition & 1 deletion test/esm/esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ t.test('esm base support', async t => {
fp((fastify, opts, next) => {
next()
}, {
fastify: '^3.0.0'
fastify: '^5.0.0'
})

t.end()
Expand Down