Repository navigation
chore: cleanup unused types and move anys to src/types - #4258
Conversation
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughThis update centralizes and consolidates the type definitions for Changes
Sequence Diagram(s)Not applicable: The changes are limited to type organization and import path updates, without affecting control flow or feature logic. Suggestions for Improvement
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/types/index.ts (1)
8-10: Type exports are appropriately relocated.The
FixMeandCatchErrtype aliases have been properly moved from the now-deletedsrc/util/types.tsto this centralized location, which aligns with the PR's objective of consolidating types and improving organization.While this change is correct, consider adding JSDoc comments to these type aliases to explain their purpose and encourage eventual replacement with more specific types where possible:
+/** + * Temporary type alias for untyped values. + * TODO: Replace with specific types where possible + */ export type FixMe = any; +/** + * Temporary type alias for untyped error handling. + * TODO: Replace with specific error types where possible + */ export type CatchErr = any;src/services/userTransform.ts (1)
12-15: Import source correctly updated to reflect type centralizationThe import for
FixMeandCatchErrtypes has been appropriately updated to use the new centralized location (../typesinstead of the previous../util/types). This change aligns with the PR objective of consolidating type definitions.However, I notice the ESLint disable comment is preserved for the
CatchErrtype even though it appears to be used in catch blocks at lines 153 and 243. Consider verifying if this ESLint exception is still needed.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (19)
src/cdk/v2/handler.ts(1 hunks)src/cdk/v2/utils.ts(1 hunks)src/controllers/delivery.ts(1 hunks)src/controllers/eventTest.ts(1 hunks)src/controllers/regulation.ts(1 hunks)src/helpers/serviceSelector.ts(1 hunks)src/services/destination/cdkV2Integration.ts(1 hunks)src/services/destination/postTransformation.ts(1 hunks)src/services/eventTest/eventTester.ts(1 hunks)src/services/profile.ts(1 hunks)src/services/source/nativeIntegration.ts(1 hunks)src/services/source/postTransformation.ts(1 hunks)src/services/userTransform.ts(1 hunks)src/types/index.ts(1 hunks)src/types/sourceTransformation.ts(1 hunks)src/types/userRegulation.ts(1 hunks)src/types/userTransformation.ts(1 hunks)src/util/dynamicConfigParser.ts(1 hunks)src/util/types.ts(0 hunks)
💤 Files with no reviewable changes (1)
- src/util/types.ts
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: ingestion-service-test
- GitHub Check: test_and_publish
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
🔇 Additional comments (16)
src/services/profile.ts (1)
11-11: Import path update forCatchErris appropriate.The change to import
CatchErrfrom the centralized../typesmodule is correct and aligns with the project's type organization strategy. This enhances maintainability and clarity in the codebase.src/cdk/v2/handler.ts (1)
8-8: Centralized import forFixMeimproves maintainability.Switching the import path for
FixMeto the unified../../typesmodule is a positive step for type management and code clarity.src/cdk/v2/utils.ts (1)
8-8: Import path forCatchErrupdated for consistency.The update to import
CatchErrfrom the centralized../../typesmodule is consistent with the project's refactoring goals and enhances codebase organization.src/controllers/eventTest.ts (1)
4-4: Type import path update is well executed.Importing
CatchErrandFixMefrom the centralized../typesmodule streamlines type management and supports a cleaner codebase.src/types/userRegulation.ts (1)
1-1: Import path forFixMeis now consistent with type centralization.This update ensures that
FixMeis imported from the correct, centralized location, supporting better type management across the codebase.src/types/userTransformation.ts (1)
1-1: Import path updated correctly.The import path for
CatchErrhas been updated from'../util/types'to'./index'which aligns with the centralization of type definitions in thesrc/typesdirectory.src/types/sourceTransformation.ts (1)
1-1: Import path updated appropriately.The import path for
CatchErrhas been correctly updated from'../util/types'to'./index'as part of centralizing type definitions in the types directory.src/services/eventTest/eventTester.ts (1)
2-2: Import path changed to use centralized types.The import path for
FixMehas been properly updated from'../../util/types'to'../../types'to align with the centralization of type definitions.src/services/destination/cdkV2Integration.ts (1)
19-20: Type import consolidated appropriately.The
CatchErrtype has been added to the existing import statement from'../../types', which improves code organization by consolidating related imports into a single statement.src/services/destination/postTransformation.ts (1)
6-17: Import refactoring looks good.The import changes maintain compatibility while improving organization by sourcing the
FixMetype from the centralized types directory instead of the util directory. This aligns with the PR objective of consolidating type definitions.src/services/source/postTransformation.ts (1)
1-7: Import restructuring looks good.The change correctly updates the import path for
CatchErrfrom the now centralized types location, maintaining consistency with other files in the codebase while preserving functionality.src/util/dynamicConfigParser.ts (1)
2-2: Import consolidation is well implemented.The change improves code organization by consolidating multiple imports into a single statement while correctly updating the import path for
FixMeto point to the centralized types directory.src/controllers/regulation.ts (1)
5-6: Import organization looks good.The consolidation of types into a single import from
../typesand repositioning of thetagsimport creates cleaner, more maintainable code.src/controllers/delivery.ts (1)
9-16: Import consolidation is appropriate.The addition of
FixMeto the existing types import statement from../typesaligns with the PR objective of centralizing type definitions.src/services/source/nativeIntegration.ts (1)
4-12: Type import consolidation looks good.The inclusion of
FixMewith other types imported from../../typesfollows the project's new pattern for type management, making imports more consistent.src/helpers/serviceSelector.ts (1)
9-9: Import statement consolidation is well-structured.The merged import statement brings together all type imports from a single source, which improves code organization and maintainability.
|
Allure Test reports for this run are available at:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4258 +/- ##
===========================================
+ Coverage 91.21% 91.32% +0.10%
===========================================
Files 632 636 +4
Lines 33053 33376 +323
Branches 7827 7892 +65
===========================================
+ Hits 30150 30481 +331
- Misses 2658 2680 +22
+ Partials 245 215 -30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
abhimanyubabbar
left a comment
There was a problem hiding this comment.
except for the point about other unused types in src/util I am good with the changes.
LGTM
|
Allure Test reports for this run are available at:
|
|



What are the changes introduced in this PR?
anybased types intosrc/typesWhat is the related Linear task?
Resolves INT-3539
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.