Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
test(e2e): fix failures due to latest and canary releases #2587
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(e2e): fix failures due to latest and canary releases #2587
Changes from 1 commit
5a318ab
d8f0bba
b8110b1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This condition is different than one used in other places - because this one has
<15.0.0-canary.24
without lower limit, it will actually match14.2.5
for example (tho we won't be really hitting those edge cases with the version we test setup as all currently tested version would haveprivate
directive (13.5.1
, latest which is now14.2.11
and canary which is now15.0.0-canary.157
)This would work (and then probably same condition should be used across the board? maybe we centralize it and add
shouldHavePrivateDirective
to same helper module that already hasnextVersionSatisfies
helper?)Or we use the condition used elsewhere with understanding that those earlier canary versions (
>=15.0.0-canary.0 <15.0.0-canary.24
) generally should haveprivate
directive but we skip those because we don't really test those anymore and keeping condition cleaner and easier to reason withThere 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.
Interesting. I've read those semver docs a hundred times and I still keep finding things I've misinterpreted. I thought prerelease range specifiers could never match stable releases (and prereleases with a different prefix).
That clearly wasn't right:
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.
Fascinating:
Maybe this was obvious to you, but I thought this behaved kind of like JS's comparison operators with values like
NaN
: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.
It's a bit more nuanced (or maybe some other word that could fit here better 🙃 ):
The
14.2.5-canary.5
wouldn't match but14.2.5
would ... unless you would useincludePrerelease
: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 had thought about that, but strangely we'd need two different versions of it (some assertions are affected by the change a few months ago, some are affected by both changes) and I couldn't come up with a reasonable name for these functions I decided this was a case of "a poor abstraction is worse than no abstraction".
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.
Somehow I knew about that nuance but not the more fundamental one above!