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

[PM-5692] Extract generators to separate crate #511

Merged
merged 6 commits into from
Jan 19, 2024
Merged

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented Jan 16, 2024

Type of change

- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Continuation on #402. This PR extracts the generators to their own crate to establish clear boundaries between the code. There is still some logic in the client to expose generators that we may want to revisit.

Also extracts explicit errors for the different generators for better error handling downstream when/if desired.

Before you submit

  • Please add unit tests where it makes sense to do so

@Hinton Hinton requested a review from dani-garcia January 16, 2024 10:52
@Hinton Hinton requested a review from MGibson1 January 16, 2024 10:55
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 96 lines in your changes are missing coverage. Please review.

Comparison is base (d2cb4f9) 50.19% compared to head (f1d2157) 50.51%.
Report is 4 commits behind head on main.

Files Patch % Lines
...generators/src/username_forwarders/forwardemail.rs 84.97% 26 Missing ⚠️
...den-generators/src/username_forwarders/fastmail.rs 70.21% 14 Missing ⚠️
crates/bitwarden-uniffi/src/crypto.rs 0.00% 10 Missing ⚠️
...-generators/src/username_forwarders/simplelogin.rs 90.32% 9 Missing ⚠️
crates/bitwarden-generators/src/username.rs 11.11% 8 Missing ⚠️
crates/bitwarden-generators/src/passphrase.rs 12.50% 7 Missing ⚠️
crates/bitwarden-generators/src/password.rs 16.66% 5 Missing ⚠️
...arden-generators/src/username_forwarders/addyio.rs 97.50% 3 Missing ⚠️
...n-generators/src/username_forwarders/duckduckgo.rs 90.00% 3 Missing ⚠️
crates/bitwarden/src/mobile/client_crypto.rs 0.00% 3 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #511      +/-   ##
==========================================
+ Coverage   50.19%   50.51%   +0.32%     
==========================================
  Files         157      159       +2     
  Lines        7493     7625     +132     
==========================================
+ Hits         3761     3852      +91     
- Misses       3732     3773      +41     

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

@Hinton Hinton requested a review from a team as a code owner January 16, 2024 16:56
vgrassia
vgrassia previously approved these changes Jan 17, 2024
@Hinton Hinton merged commit b174e49 into main Jan 19, 2024
48 checks passed
@Hinton Hinton deleted the ps/generator-crate branch January 19, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants