Skip to content

Conversation

@inyourtime
Copy link
Contributor

@inyourtime inyourtime commented Aug 21, 2025

Checklist

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a major release planned?

@inyourtime
Copy link
Contributor Author

This plugin is now compatible with Fastify 5, where request.routeConfig has been removed.
ref: https://fastify.dev/docs/latest/Guides/Migration-Guide-V5/#streamlined-access-to-route-definition

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 21, 2025

And does it throw an error if it does an access on that attribute? Or why do you state that this PR ensures compatility with fastify v5?

@inyourtime
Copy link
Contributor Author

inyourtime commented Aug 21, 2025

That fallback is no longer reached. If remove /* c8 ignore next */, test coverage will not be 100%. because that property has been removed and use request.routeOptions.config instead

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 21, 2025

So the answer to my question regarding "compatibiity" to fastify v5 is no and currently the plugins works without issues in v5.

@fastify/plugins
I think we can accept this PR. Currently the plugin is maybe working with fastify v4. We documented already, that v8 is only supporting fastify v5. So even if it breaks in userland, we can refer to the fact, that we already documented that we drop the support of fasstify v4.

@Uzlopak Uzlopak dismissed their stale review August 21, 2025 12:17

I made the assessment but I am not really convinced. Its up to you

@Fdawgs
Copy link
Member

Fdawgs commented Aug 21, 2025

I think we'd just need to do a major if dropping support for Fastify v4, and then updating the compatibility table accordingly.

@inyourtime
Copy link
Contributor Author

It looks like this plugin now requires Fastify v5

fastify-static/index.js

Lines 542 to 545 in c4185a5

module.exports = fp(fastifyStatic, {
fastify: '5.x',
name: '@fastify/static'
})

@Fdawgs
Copy link
Member

Fdawgs commented Aug 21, 2025

It looks like this plugin now requires Fastify v5

fastify-static/index.js

Lines 542 to 545 in c4185a5

module.exports = fp(fastifyStatic, {
fastify: '5.x',
name: '@fastify/static'
})

Ah, good spot, thanks @inyourtime! Was looking at the compatibility table which was wrong. In that case, happy with this PR!

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Uzlopak Uzlopak merged commit af1687d into fastify:main Aug 22, 2025
40 of 42 checks passed
@inyourtime inyourtime deleted the remove-deprecated branch August 22, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants