-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1028,3 +1028,27 @@ test('plugin metadata - version not matching requirement 3', t => { | |
done() | ||
} | ||
}) | ||
|
||
test('plugin metadata - release candidate', t => { | ||
t.plan(2) | ||
const fastify = Fastify() | ||
Object.defineProperty(fastify, 'version', { | ||
value: '99.0.0-rc.1' | ||
}) | ||
|
||
plugin[Symbol.for('plugin-meta')] = { | ||
name: 'plugin', | ||
fastify: '99.x' | ||
} | ||
Comment on lines
+1039
to
+1042
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should specify There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
|
||
fastify.register(plugin) | ||
|
||
fastify.ready((err) => { | ||
t.error(err) | ||
t.pass('everything right') | ||
}) | ||
|
||
function plugin (instance, opts, done) { | ||
done() | ||
} | ||
}) |
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?:
https://github.com/npm/node-semver/tree/c56a701f45653940ee8536eafe43b3e46c11d6cc#functions