refactor(secureStorage): replace isSensitive param with options - #1067
Merged
RUKAYAT-CODER merged 1 commit intoAug 27, 2026
Merged
Conversation
Remove the dead isSensitive parameter from setItem, replace the positional
boolean in getItem with an explicit { tag, throwOnMissing } options object,
and delete the unused SENSITIVE_KEYS set and its STORAGE_SENSITIVE_KEYS
export. Reads that expect a missing value now opt in via throwOnMissing:
false instead of a misleading per-value boolean.
Fixes rinafcode#964
|
@shogun444 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Thank you for contributing to the project. |
This file contains hidden or 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
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.
Linked Issue
Closes #964
Description
What changed?
isSensitiveparameter fromsetItem.getItemwith a typed options object:GetItemOptions { tag?: string; throwOnMissing?: boolean }(throwOnMissing: trueby default).SENSITIVE_KEYSset andSTORAGE_SENSITIVE_KEYSexport.src/services/secureStorage.tsto use explicit named options.src/__tests__/services/secureStorage.test.tsto reflect the removed export.Why was it changed?
The
isSensitiveparameter was misleading: it was completely ignored insetItem, only toggled swallow vs. rethrow behavior ingetItem, andSENSITIVE_KEYSwas never consulted. Replacing it with explicit named options makes error-handling behavior clear and intentional at the call site.Type of Change
Test Evidence
Local Verification
npx prettier --checkon modified files)Additional Notes for Reviewer
SENSITIVE_KEYS: Per the issue specification,SENSITIVE_KEYSwas deleted rather than wired in, as the explicitthrowOnMissingoption provides clearer call-site control without implicit key lookup magic.tests/secureStorage.isolation.test.tsdid not require changes as it does not reference the modified private helpers or deleted exports.