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

refactor: clean up code #39

Merged
merged 18 commits into from
Sep 30, 2023
Merged

refactor: clean up code #39

merged 18 commits into from
Sep 30, 2023

Conversation

kekavc24
Copy link
Owner

@kekavc24 kekavc24 commented Sep 24, 2023

Description

This PR improves code readability, maintainability and testability. Still steadily on course to #27.

Key target for this PR was to try decouple code as much as possible and prevent any overlapping functionality.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

> add dedicated class for version modifiers
> remove normalize & validate mixins
> move mixin code to respective `ArgChecker` classes
> remove hard coded values. Add extension on `ArgResults` for ease.
> add `PresetType` enum
> add `PathInfo` typedef
> move mixin tests to respective tests for each `ArgChecker` class
@kekavc24 kekavc24 added documentation Improvements or additions to documentation patch release Pull request is part of a patch release tests adds/modifies/removes tests labels Sep 24, 2023
kekavc24 and others added 16 commits September 27, 2023 16:09
> fix changelog headings style
> add class for runnable commands/subcommands
> code cleanup
Bumps [cli_completion](https://github.com/VeryGoodOpenSource/cli_completion) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/VeryGoodOpenSource/cli_completion/releases)
- [Changelog](https://github.com/VeryGoodOpenSource/cli_completion/blob/main/CHANGELOG.md)
- [Commits](VeryGoodOpenSource/cli_completion@v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: cli_completion
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit acd344f)
Bumps [pub_updater](https://github.com/VeryGoodOpenSource/pub_updater) from 0.3.1 to 0.4.0.
- [Release notes](https://github.com/VeryGoodOpenSource/pub_updater/releases)
- [Changelog](https://github.com/VeryGoodOpenSource/pub_updater/blob/main/CHANGELOG.md)
- [Commits](VeryGoodOpenSource/pub_updater@v0.3.1...v0.4.0)

---
updated-dependencies:
- dependency-name: pub_updater
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit cb03082)
> reduce core logic present in handler
> add class for exclusively modifying/bumping `SEMVER` version
> consolidate code to said class which was a bit scattered
> improve general testability & maintainability to core code
> remove `keep-pre` & `keep-build` from extension method
> add `presetType` to `VersionModifiers` super class
> remove core logic
> remove version validation.
> reuse version code added in ab77a2b
> change name to one which makes sense!
> add tests for new functionality
> consolidate tests present in `version-extension` tests
> remove dead code in tests
> return only `Preset.version` when `keep-build` & `keep-pre` are false
> fix issue where empty build & prerelease are added
> prevent overwriting of old info from version
> ignore flag absent in `Set` subcommand
@kekavc24 kekavc24 marked this pull request as ready for review September 30, 2023 00:57
@kekavc24 kekavc24 changed the title refactor: code-improvements refactor: clean up code Sep 30, 2023
@kekavc24 kekavc24 merged commit b396d4a into master Sep 30, 2023
3 checks passed
@kekavc24 kekavc24 deleted the refactor/code-improvements branch September 30, 2023 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation patch release Pull request is part of a patch release tests adds/modifies/removes tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant