-
Notifications
You must be signed in to change notification settings - Fork 85
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
[AC-3020] Remove unused jslib code - services #575
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eliykat
requested review from
r-tome and
addisonbeck
and removed request for
r-tome
September 2, 2024 03:44
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #575 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 56 56
Lines 2552 2534 -18
Branches 462 462
=====================================
+ Misses 2552 2534 -18 ☔ View full report in Codecov by Sentry. |
Fixed Issues
|
eliykat
changed the title
[AC-1995] Remove unused jslib code - services
[AC-3020] Remove unused jslib code - services
Sep 2, 2024
addisonbeck
approved these changes
Sep 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Objective
Jira ticket: https://bitwarden.atlassian.net/browse/AC-3020
This is a first pass at removing unused jslib code from directory-connector - specifically, unused services.
My strategy here was to iteratively delete services (both the abstractions and implementations) which were unused by any other class. Carving up partially used services was out of scope - I was only removing services that were wholly unused. After doing this, I used
depcheck
to identify unused dependencies and removed the couple that I could.This is a huge diff but most of it is just file deletion. There is no refactoring other than to update dependency injection to no longer instantiate these deleted classes. The proof is largely that the build still passes and the app bootstraps OK.
I have not removed non-service code. Most models are imported by
ApiService
andStateService
- that is probably a separate effort to extract what's actually used from those classes.Code changes
Screenshots
Testing requirements
Before you submit
npm run lint
) (required)