`.bin` is not registered when using yarn
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the regression has not already been reported
Last working version
4.1.0
Stopped working in version
4.1.1
Node.js version
18.x
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
20.04
💥 Regression Report
yarn do not put the bin file inside .bin folder.
So, it is unavailable to use either yarn or npx to execute genkey.js when you use yarn as package manager.
I don't know if it is expected behavior for yarn.
Some related information is that yarn only consider /^(?!\.{0,2}$)[a-z0-9._-]+$/i as valid bin.
Steps to Reproduce
npm init
yarn add @fastify/secure-session
yarn @fastify/secure-session // fail
npx @fastify/secure-session // fail
Expected Behavior
No response
It seems an old yarn known issue: https://github.com/yarnpkg/yarn/issues/5353#issuecomment-399381322
Created a PR. We could fix this with npx if we create a package, e.g. called fastify-secure-sesion-generate-key
Just as a remark: In the issue is written that npx @fastify/secure-session fails, but it is actually working with npx
I updated the description a bit.
The prerequisite is using yarn as package manager.
Once you use it, it will also fail the npx command.
Thanks for the clarification