fastify / fastify-plugin

Plugin helper for Fastify
MIT License
198 stars 43 forks source link

handle @fastify/x names to export #190

Closed Uzlopak closed 2 years ago

Uzlopak commented 2 years ago

Checklist

Uzlopak commented 2 years ago

Before we had e.g. fastify-kafka as module name which was automatically changed to the named export fastifyKafka So it was basically generating module.exports.fastifyKafka = plugin

We renamed all fastify own modules to the form @fastify/x-y-z. So now the named exports are '@fastify/xYZ' which is equivalent to module.exports['@fastify/xYZ'] = plugin.

If the current behaviour is correct, than we have to rewrite the failing test in https://github.com/fastify/fastify-kafka/pull/69 accordingly. If not, we have to merge this, and then the test in that PR will pass.

Uzlopak commented 2 years ago

@zekth you want to review again? @jsumners do you have further questions?