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

feat(versioning): same major #28418

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

RahulGautamSingh
Copy link
Collaborator

@RahulGautamSingh RahulGautamSingh commented Apr 15, 2024

Changes

  • Add a helper function massageVersion which massages single versions to constrains. eg. X.Y.Z as >=X.Y.Z <X+1.0.0

  • Modify some methods so that they can handle the version as a constraint and work as expected.
    For eg. matches should return true for matches('1.1.0', '1.0.0');
    For more examples, please see the tests.

Context

Closes: #27312

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository
    https://github.com/Rahul-renovate-testing/same-major
    First I ran with latest version which created 2 PRs: i) for the highest version with same major and ii) with the latest version
    Then I ran with new changes ie. versioning: same-major and PR i) was autoclosed

@RahulGautamSingh RahulGautamSingh marked this pull request as draft April 15, 2024 14:12
@RahulGautamSingh RahulGautamSingh marked this pull request as ready for review April 16, 2024 15:43
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

shouldn't we name it semver-same-major or semver-coerced-same-major?

Or at least the docs need to clarify that semver-coerced versioning is used under the hood

lib/modules/versioning/semver-coerced/index.spec.ts Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/index.ts Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/index.ts Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/index.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@secustor secustor left a comment

Choose a reason for hiding this comment

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

Nitpick, but not blocking

lib/modules/versioning/same-major/readme.md Outdated Show resolved Hide resolved
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
secustor
secustor previously approved these changes Apr 21, 2024
lib/modules/versioning/same-major/index.ts Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/readme.md Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/readme.md Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/readme.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@HonkingGoose HonkingGoose left a comment

Choose a reason for hiding this comment

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

The docs are hard to understand.

Please add some examples that explain how it works. Like maybe a diff of "old dependency" vs "proposed Renovate update".

Also focus on the reader, what problem is this feature fixing, how to use/configure it, and how to know if it's working as intended.

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Copy link
Collaborator

@HonkingGoose HonkingGoose left a comment

Choose a reason for hiding this comment

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

Some style fixes for the current text. I still find this hard to read and understand.

lib/modules/versioning/same-major/readme.md Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/readme.md Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/readme.md Outdated Show resolved Hide resolved
lib/modules/versioning/same-major/readme.md Outdated Show resolved Hide resolved
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
@RahulGautamSingh RahulGautamSingh marked this pull request as draft May 1, 2024 03:23
@RahulGautamSingh RahulGautamSingh marked this pull request as ready for review June 3, 2024 13:28
@RahulGautamSingh RahulGautamSingh marked this pull request as draft June 3, 2024 13:37
@RahulGautamSingh RahulGautamSingh marked this pull request as ready for review June 3, 2024 14:17
@RahulGautamSingh RahulGautamSingh changed the title feat(versioning): same major feat(versioning): same-major Jun 3, 2024
@RahulGautamSingh RahulGautamSingh changed the title feat(versioning): same-major feat(versioning): same major Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New versioning: same-major
4 participants