Refactor Logger to Export SENSITIVE_KEYS for Enhanced Type Safety - #8342
Refactor Logger to Export SENSITIVE_KEYS for Enhanced Type Safety#8342tmdeveloper007 wants to merge 1 commit into
Conversation
|
@tmdeveloper007 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
This pull request enhances the maintainability and type safety of our codebase by exporting the SENSITIVE_KEYS constant for reuse. This aligns with our previous decisions to improve type safety, such as adding TypeScript compiler verification for components and introducing type guard functions. Thank you for your contribution, and feel free to reach out if you have any questions! |
|
👋 Hey @tmdeveloper007! Thanks for your interest in contributing to CommitPulse! 🙏 Unfortunately, this PR has been automatically closed because you are not assigned to the linked issue #8332 — refactor(logger): export SENSITIVE_KEYS for reuse. To avoid this in the future, please follow these steps:
We look forward to your contribution once you're assigned! 🚀 |
Summary of What Has Been Done
Exported the
SENSITIVE_KEYSconstant array fromlib/logger.tsas a namedexport constwithas constassertion for improved type safety. Added comprehensive JSDoc documentation including usage examples.Changes Made
const SENSITIVE_KEYStoexport const SENSITIVE_KEYS as constwith JSDoc including@exampleshowing how to use it for sensitive field detection.Impact it Made
Allows other modules to reuse the same sensitive key detection logic without duplicating the array, improving maintainability and consistency. The
as constassertion makes the array readonly and literal, which TypeScript can use for more precise type checking.Closes #8332
Note: Please assign this PR to the
tmdeveloper007account.