-
Notifications
You must be signed in to change notification settings - Fork 61
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
chore(application-systems): Switching shared user profile service to use v2 users api #15300
Conversation
WalkthroughThe recent changes primarily involve updating the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (1)
libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.module.ts (1)
Line range hint
7-34
: Consider refactoring the static-only class.The static analysis tool has flagged the use of a class (
UserProfileModule
) that contains only static members. This could be simplified into a function or a set of functions if the class structure is not necessary for maintaining state or leveraging class-based features.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.module.ts (2 hunks)
- libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.service.ts (4 hunks)
Additional context used
Path-based instructions (2)
libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.module.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.service.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Biome
libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.module.ts
[error] 7-34: Avoid classes that contain only static members. (lint/complexity/noStaticOnlyClass)
Prefer using simple functions instead of classes with only static members.
libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.service.ts
[error] 32-32: Decorators are not valid here. (parse)
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.
[error] 34-34: Decorators are not valid here. (parse)
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.
Additional comments not posted (3)
libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.module.ts (1)
5-5
: Replace old API with new V2UsersApi.The changes correctly replace the old
UserProfileApi
with the newV2UsersApi
. This aligns with the PR's objective to switch to the v2 users API. The use of a factory for creatingV2UsersApi
instances is appropriate, ensuring that the API configuration is encapsulated and can be easily managed.Also applies to: 21-23
libs/application/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.service.ts (2)
2-2
: Update imports and dependencies.The updated imports and dependencies to include
V2UsersApi
and various utilities from@island.is/auth-nest-tools
are in line with the PR's objectives. Ensure that these new dependencies are properly managed and do not introduce unnecessary coupling between components.Also applies to: 4-7, 19-19
32-32
: Duplicate: Fix decorator usage.This comment is a duplicate of the previous one addressing the same issue with decorators.
Also applies to: 34-34
Tools
Biome
[error] 32-32: Decorators are not valid here. (parse)
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.
...ication/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.service.ts
Show resolved
Hide resolved
...ication/template-api-modules/src/lib/modules/shared/api/user-profile/user-profile.service.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Datadog ReportAll test runs ✅ 3 Total Test Services: 0 Failed, 3 Passed Test Services
🔻 Code Coverage Decreases vs Default Branch (1)
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15300 +/- ##
==========================================
- Coverage 37.13% 37.12% -0.01%
==========================================
Files 6504 6504
Lines 132239 132239
Branches 37810 37808 -2
==========================================
- Hits 49101 49100 -1
- Misses 83138 83139 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
...
Attach a link to issue if relevant
What
Specify what you're trying to achieve
Why
Specify why you need to achieve this
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes