-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: fix zlib version regex #48227
test: fix zlib version regex #48227
Conversation
Fixes CI for #48218. |
@@ -61,7 +61,7 @@ assert.match(process.versions.brotli, commonTemplate); | |||
assert.match(process.versions.llhttp, commonTemplate); | |||
assert.match(process.versions.node, commonTemplate); | |||
assert.match(process.versions.uv, commonTemplate); | |||
assert.match(process.versions.zlib, commonTemplate); | |||
assert.match(process.versions.zlib, /^\d+\.\d+\.\d+(?:\.\d+)?(?:-.*)?$/); |
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.
assert.match(process.versions.zlib, /^\d+\.\d+\.\d+(?:\.\d+)?(?:-.*)?$/); | |
assert.match(process.versions.zlib, /^\d+(?:\.\d+){2,3}(?:-.*)?$/); |
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.
For consistency I would prefer to keep it as is, see line 72. I'm ok with a a new PR to shorten both regex.
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.
For me, the reason the first regex wasn't shortened that way is that it would complicate it more than anything else. Unlike this one, which is already a little longer, and in my opinion my suggestion is just as consistent as this regex. But I understand and I don't mind a new PR.
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'm talking about this one
/^\d+\.\d+\.\d+(?:\.\d+)?-node\.\d+(?: \(candidate\))?$/ |
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.
Oh, you're completly right, sorry for my misunderstanding.
Add support for subrevision in the regular expression for the zlib version. Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40
Landed in 6a6b3c5 |
Add support for subrevision in the regular expression for the zlib version. Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40 PR-URL: #48227 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Add support for subrevision in the regular expression for the zlib version. Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40 PR-URL: #48227 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Add support for subrevision in the regular expression for the zlib version. Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40 PR-URL: nodejs#48227 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Add support for subrevision in the regular expression for the zlib version. Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40 PR-URL: nodejs#48227 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Add support for subrevision in the regular expression for the zlib version. Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40 PR-URL: nodejs#48227 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Add support for subrevision in the regular expression for the zlib version.
Refs: https://github.com/madler/zlib/blob/48c3741002ac/zlib.h#L40