-
Notifications
You must be signed in to change notification settings - Fork 27
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
yarn: Universal utility for Yarn version detection #701
yarn: Universal utility for Yarn version detection #701
Conversation
6101de6
to
00c6637
Compare
00c6637
to
d016fc3
Compare
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.
Nitpicks only, quick respin will do!
d016fc3
to
10885e1
Compare
10885e1
to
30f3758
Compare
30f3758
to
2e238ed
Compare
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.
ACK with the tiny adjustments.
@@ -118,7 +118,7 @@ def _configure_yarn_version(project: Project) -> None: | |||
yarn_path_version = get_semver_from_yarn_path(project.yarn_rc.yarn_path) | |||
package_manager_version = get_semver_from_package_manager(project.package_json.package_manager) | |||
|
|||
if not yarn_path_version and not package_manager_version: | |||
if yarn_path_version is None and package_manager_version is None: |
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.
Unrelated PEP correctness check update --> separate commit.
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.
Ok. Done.
The function will be made into a shared utility and used to refactor yarn_classic in future commits. Signed-off-by: Alexey Ovchinnikov <[email protected]>
And making Yarn PM use it. Signed-off-by: Alexey Ovchinnikov <[email protected]>
This change makes yarn-classic reuse version extraction code from yarn. Signed-off-by: Alexey Ovchinnikov <[email protected]>
This change introduces VersionRange class to simplify checks for version belonging to a range of versions. Signed-off-by: Alexey Ovchinnikov <[email protected]>
Now Version is checked against VersionsRange object. Signed-off-by: Alexey Ovchinnikov <[email protected]>
This commit makes Yarn PM a bit more PEP8 compliant by replacing two implied None checks with explicit ones. Signed-off-by: Alexey Ovchinnikov <[email protected]>
2e238ed
to
509eedf
Compare
5ad6baf
This commit unifies handling of version info for Yarn and Yarn Classic package managers.
Resolves: #660
Maintainers will complete the following section
Note: if the contribution is external (not from an organization member), the CI
pipeline will not run automatically. After verifying that the CI is safe to run:
/ok-to-test
(as is the standard for Pipelines as Code)