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(leiningen): support lein-parent #29552

Merged
merged 9 commits into from
Jun 16, 2024
Merged

Conversation

MIJOTHY
Copy link
Contributor

@MIJOTHY MIJOTHY commented Jun 9, 2024

Changes

This commit adds support for 'parent-project' functionality, which is used by the lein-parent project. :parent-project is expected to specify a single dependency, under the :coords key. Two notable changes have been made to facilitate this:

  1. extractFromVectors allows the vector dimension to be specified. This was previously assumed to be 2, but 1 has now been added to support single "bare" dependencies. I'm not aware of anything in the Lein ecosystem that would mandate values other than 1 or 2.
  2. collectDeps accepts an options object for specifying whether the deps are nested (dimensions = 2) or not (dimensions = 1). It also allows specifying the depType explicitly, so we can have the relevant dependency at the path [:parent-project :coords] be labelled parent-project, rather than the less descriptive coords

Context

I have the same use-case as #7815

Documentation (please check one with an [x])

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

I can explicitly call out lein-parent support in the docs if desired.

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

This commit adds support for 'parent-project' functionality, which is
used by the [lein-parent][1] project. `:parent-project` is expected to
specify a single dependency, under the `:coords` key. Two notable
changes have been made to facilitate this:
1. `extractFromVectors` allows the vector dimension to be specified.
   This was previously assumed to be 2, but 1 has now been added to
   support single "bare" dependencies. I'm not aware of anything in
   the Lein ecosystem that would mandate values other than 1 or 2.
2. `collectDeps` accepts an options object for specifying whether the
   deps are nested (dimensions = 2) or not (dimensions = 1). It also
   allows specifying the `depType` explicitly, so we can have the
   relevant dependency at the path `[:parent-project :coords]` be
   labelled `parent-project`, rather than the less descriptive
   `coords`

[1]: https://github.com/achin/lein-parent

Relates to
renovatebot#7815
@CLAassistant
Copy link

CLAassistant commented Jun 9, 2024

CLA assistant check
All committers have signed the CLA.

@MIJOTHY MIJOTHY marked this pull request as ready for review June 9, 2024 12:13
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.

otherwise LGTM

lib/modules/manager/leiningen/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/leiningen/extract.spec.ts Outdated Show resolved Hide resolved
@MIJOTHY MIJOTHY requested a review from viceice June 14, 2024 06:05
@MIJOTHY MIJOTHY requested a review from viceice June 15, 2024 16:58
@viceice viceice added the auto:no-done-comments Don't say "Done" or "Please review" - request a review instead label Jun 15, 2024
Copy link
Contributor

Hi there,

You are using done comments which cause a lot of noise/notifications. Instead, please use GitHub's web interface to request another review. Please read our contributing guidelines to reduce noise.

Good luck,

The Renovate team

@viceice viceice requested review from viceice and secustor June 15, 2024 21:49
@rarkins rarkins enabled auto-merge June 16, 2024 05:20
@rarkins rarkins added this pull request to the merge queue Jun 16, 2024
Merged via the queue into renovatebot:main with commit c3bd354 Jun 16, 2024
36 checks passed
@MIJOTHY MIJOTHY deleted the feat_lein-parent branch June 16, 2024 07:46
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.409.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:no-done-comments Don't say "Done" or "Please review" - request a review instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants