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
Support rc in version checks #3879
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
plugin[Symbol.for('plugin-meta')] = { | ||
name: 'plugin', | ||
fastify: '99.x' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should specify fastify: '^98.0.0'
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No this is expected and the current case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is that an RC Fastify allows plugins that require earlier versions of Fastify with ^fastify-version
instead of >=fastify-version
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand, can you open a fresh issue if you think it's a bug?
const sanitizedVersion = this.version.replace(/-rc.\d+$/, '') | ||
if (requiredVersion && !semver.satisfies(sanitizedVersion, requiredVersion)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about?:
const fastifyRc = /-rc.+$/.test(this.version)
if (requiredVersion && semver.satisfies(santizedVersion, requiredVersion, { includePrerelease: fastifyRc }) === false) {
https://github.com/npm/node-semver/tree/c56a701f45653940ee8536eafe43b3e46c11d6cc#functions
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Checklist
npm run test
andnpm run benchmark
and the Code of conduct