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

Support rc in version checks #3879

Merged
merged 1 commit into from May 4, 2022
Merged

Conversation

mcollina
Copy link
Member

@mcollina mcollina commented May 4, 2022

Checklist

@mcollina mcollina requested review from zekth and Eomm May 4, 2022 12:49
Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

LGTM.

@mcollina mcollina merged commit 2c3aa4f into main May 4, 2022
@mcollina mcollina deleted the skip-rc-candidates-in-version-checks branch May 4, 2022 13:42
Comment on lines +1039 to +1042
plugin[Symbol.for('plugin-meta')] = {
name: 'plugin',
fastify: '99.x'
}
Copy link
Member

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'.

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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?

Comment on lines +106 to +107
const sanitizedVersion = this.version.replace(/-rc.\d+$/, '')
if (requiredVersion && !semver.satisfies(sanitizedVersion, requiredVersion)) {
Copy link
Member

@jsumners jsumners May 5, 2022

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

@github-actions
Copy link

github-actions bot commented May 7, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants