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(mixin): add conditional audit repository mixin #58

Merged
merged 1 commit into from
Apr 25, 2023
Merged

Conversation

Tyagi-Sunny
Copy link
Contributor

@Tyagi-Sunny Tyagi-Sunny commented Apr 21, 2023

Description

  • Added ConditionalAuditRepositoryMixin. To be used when the actual audit mixin is to be configured from the flag in the environment variable rather than the code. So any repository passed into this conditional mixin will only have the Audit Mixin applied if that env flag is set to true.

BREAKING CHANGE:
Audit Repository Mixin return type changed and now is being returned as an abstract class. This doesn't affect 99% of the users because this mixin is already applied on the base class. Only those who are directly assigned the mixin-ed class to some variable will have the type error showing them.

GH-57

Fixes #57

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Intermediate change (work in progress)

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

  • Test A
  • Test B

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
  • Any dependent changes have been merged and published in downstream modules

src/mixins/audit-wrapper.mixin.ts Outdated Show resolved Hide resolved
src/mixins/audit-wrapper.mixin.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/__tests__/unit/conditional-audit.mixin.unit.ts Outdated Show resolved Hide resolved
…it Mixin

To be used when the actual audit mixin is to be configured from the flag in the environment variable
rather than the code

BREAKING CHANGE:
Audit Repository Mixin return type changed and now is being returned as an abstract class. This
doesn't affect 99% of the users because this mixin is already applied on the base class. Only those
who are directly assigned the mixin-ed class to some variable will have the type error showing them.

GH-57
@shubhamp-sf shubhamp-sf changed the title feat(provider): add audit repos mixin wrapper feat(mixin): add conditional audit repository mixin Apr 25, 2023
@shubhamp-sf shubhamp-sf merged commit 10257b6 into master Apr 25, 2023
@shubhamp-sf shubhamp-sf deleted the GH-57 branch April 25, 2023 13:16
@sfdevops
Copy link
Contributor

🎉 This PR is included in version 4.0.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Audit Log Mixin Wrapper Around Audit Log Mixin
3 participants