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

Update dependency com.lemonappdev:konsist to v0.16.1 #3371

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 30, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.lemonappdev:konsist (source) 0.15.1 -> 0.16.1 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

LemonAppDev/konsist (com.lemonappdev:konsist)

v0.16.1

What's Changed

Hot fix release.

Complete list of changes

⚠️ Breaking API Changes
🐛 API Bug Fixes

Full Changelog: LemonAppDev/konsist@v0.16.0...v0.16.1

v0.16.0

What's Changed

This release contains new improvement and API updates. Two new features are providers for all common combinations of interface, object and class and doesNotDependOn method for architecture checks.

Thanks you for your feedback 🙏

1. Add providers for all common combinations of interface, object and class

Adding suport for writing tests for classes, interfaces and objects in one test.

Konsist now provides a set of methods such as:

  • classesAndInterfacesAndObjects()
  • classesAndInterfaces()
  • classesAndObjects()
  • interfacesAndObjects()

These methods can be used in two ways:

  • Case 1: After creating the initial scope.
  • Case 2: When filtering chosen declarations from other declarations.

For example:

// Case 1
scope
	.classesAndInterfacesAndObjects(includeNested = true, includeLocal = false)
	.assertTrue { it.hasNameEndingWith("Suffix") }
	
scope
	.classesAndObjects()
	.assertTrue { it.hasDataModifier }

// Case 2
scope
	.classes()
	.classesAndInterfaces(includeNested = true, includeLocal = false)
	.assertTrue { it.hasNameEndingWith("Suffix") }
	
scope
	.classes()
	.classesAndObjects()
	.assertTrue { it.hasDataModifier }

In addition to these methods, Konsist offers various other functions that allow you to count all selected declarations, check whether they meet a specific predicate, or determine if any declarations match the selected criteria. Examples include:

  • numClassesAndInterfacesAndObjects()
  • countClassesAndInterfacesAndObjects { it.hasNameEndingWith("Suffix") }
  • hasClassesOrInterfacesOrObjects()
  • hasClassOrInterfaceOrObject { it.hasNameEndingWith("Suffix") }

The examples above demonstrate methods for classes, interfaces, and objects, but Konsist provides similar methods for all combinations of classes, interfaces, and objects (either individually, in pairs, or all together).

Additionally, Konsist includes a set of withX/withoutX extension functions, enabling you to write tests like:

scope
	.classes()
	.withClassOrInterfaceOrObjectNamed("SampleName")
	.assertTrue { ... }
2. doesNotDependOn method

Added doesNotDependOn method to architectural checks.

Eg. It is possible to write such tests for this architecture

image

    private val scope = Konsist.scopeFromProject()

    private val adapter = Layer("Adapter", "com.samplepackage.adapter..")
    private val common = Layer("Common", "com.samplepackage.common..")
    private val domain = Layer("Domain", "com.samplepackage.domain..")
    private val port = Layer("Port", "com.samplepackage.port..")
    
    @​Test
    fun `Domain layer not depend on Adapter and Port layers and Adapter layer not depend on Domain layer`() {
       	 scope.assertArchitecture { 
       	 	domain.doesNotDependOn(adapter, port)
            adapter.doesNotDependOn(domain)
       	 }
    }

Complete list of changes

⚠️ Breaking API Changes
🐛 API Bug Fixes
💡 API Improvements
📕 Documentation
🏗️ Maintanance

Full Changelog: LemonAppDev/konsist@v0.15.1...v0.16.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner August 30, 2024 16:47
@renovate renovate bot added the PR-Dependencies Pull requests that update a dependency file label Aug 30, 2024
@renovate renovate bot requested review from bmarty and removed request for a team August 30, 2024 16:47
Copy link
Contributor

github-actions bot commented Aug 30, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/QV6W2i

@CLAassistant
Copy link

CLAassistant commented Sep 9, 2024

CLA assistant check
All committers have signed the CLA.

@renovate renovate bot force-pushed the renovate/com.lemonappdev-konsist-0.x branch from 9fe17c0 to 76cb788 Compare September 10, 2024 10:43
@renovate renovate bot changed the title Update dependency com.lemonappdev:konsist to v0.16.0 Update dependency com.lemonappdev:konsist to v0.16.1 Sep 10, 2024
@renovate renovate bot changed the title Update dependency com.lemonappdev:konsist to v0.16.1 fix(deps): update dependency com.lemonappdev:konsist to v0.16.1 Sep 12, 2024
@renovate renovate bot changed the title fix(deps): update dependency com.lemonappdev:konsist to v0.16.1 Update dependency com.lemonappdev:konsist to v0.16.1 Sep 16, 2024
@renovate renovate bot force-pushed the renovate/com.lemonappdev-konsist-0.x branch from 76cb788 to 4bce7af Compare September 27, 2024 08:19
Copy link

sonarcloud bot commented Sep 27, 2024

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.67%. Comparing base (24c7be6) to head (154114b).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3371   +/-   ##
========================================
  Coverage    82.67%   82.67%           
========================================
  Files         1732     1732           
  Lines        40970    40970           
  Branches      4962     4962           
========================================
  Hits         33873    33873           
  Misses        5341     5341           
  Partials      1756     1756           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor Author

renovate bot commented Sep 27, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@bmarty bmarty merged commit e52c7ee into develop Sep 27, 2024
26 checks passed
@bmarty bmarty deleted the renovate/com.lemonappdev-konsist-0.x branch September 27, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants