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(repository): make mixin more adaptable and remove soft crud classes #141

Closed
wants to merge 1 commit into from

Conversation

shubhamp-sf
Copy link
Contributor

Description

  1. Changes the type of base class being accepted by mixin to a more explicit interface including only those methods/props that are of use in the logic of the soft delete code.
  2. Removes all soft crud classes being exported that can be replaced with the use of mixin.

BREAKING CHANGE:
Removes SoftCrudRepository, SequelizeSoftCrudRepository and DefaultTransactionSoftCrudRepository in favour of the provided mixin.

Fixes #140

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested ?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • The updated mixin is tested with DefaultCrudRepository its transactional equivalent and sequelize crud repository.
  • All the existing test cases for all of the classes work as expected when used with mixin.
  • Tested in a lb4 app, by creating a pack.

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated

Todo:

  • Remove duplicate test cases.
  • Update readme with details of utilising mixin for all of the possible use cases.
  • Discuss release management to support the current version.

…classes

changes the type of base class being accepted by mixin to a more explicit interface
removes all soft crud classes being exported that can be replaced with mixin

BREAKING CHANGE:
Removes SoftCrudRepository, SequelizeSoftCrudRepository and DefaultTransactionSoftCrudRepository in
favour of the provided mixin.

GH-140
@sonarcloud
Copy link

sonarcloud bot commented May 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sourcefuse sourcefuse deleted a comment from stale bot May 20, 2023
@sourcefuse sourcefuse deleted a comment from sonarcloud bot May 20, 2023
@stale stale bot added the stale label Jul 19, 2023
@shubhamp-sf shubhamp-sf removed the stale label Jul 19, 2023
@sourcefuse sourcefuse deleted a comment from stale bot Jul 19, 2023
@stale
Copy link

stale bot commented Sep 17, 2023

This pull request has been marked stale because it has not seen any activity within two months. It will be closed within 15 days of being stale unless there is new activity.

@stale stale bot added the stale label Sep 17, 2023
@stale
Copy link

stale bot commented Oct 2, 2023

This pull request has been closed due to continued inactivity. If you are interested in finishing the proposed changes, then feel free to re-open this pull request or open a new one.

@stale stale bot closed this Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Codebase to Improve Flexibility and Maintainability
1 participant