feat(camera)!: migrate to @nativescript-community/perms v3 - #676
Open
NathanWalker wants to merge 1 commit into
Open
feat(camera)!: migrate to @nativescript-community/perms v3#676NathanWalker wants to merge 1 commit into
NathanWalker wants to merge 1 commit into
Conversation
perms v3 changed `check()`/`request()` to resolve to a `Status` string instead of the v2 `[Status, boolean]` tuple. Under v3 `mapStatus` matched the first *character* of the status string against the Status keys, so every permission result mapped to `Status.unknown` and `requestPermissions()` always reported failure. BREAKING CHANGE: requires @nativescript-community/perms v3. Apps pinning perms v2 must upgrade alongside this release. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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.
Part of the perms v2 → v3 migration.
The bug
perms v3 resolves
request()to aStatusstring, not the v2[Status, boolean]tuple.mapStatusread it as a tuple:Against v3,
'authorized'.length > 1passes andresult[0]is'a', which matches noStatuskey. Every result mapped toStatus.unknown, sorequestPermissions(),requestCameraPermissions()andrequestPhotosPermissions()all reportedSuccess: falseeven when the user granted access.The unknown-status fallback is preserved; the exported
PermissionResult/PermissionsResultshapes are unchanged, soindex.d.tsneeds no edit.Verification
nx build cameraclean against perms 3.0.11 (with #679 applied).Merge order
Needs #679. Merge alongside the other three migrations.
🤖 Generated with Claude Code