| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
perms v3 changed `check()`/`request()` to resolve to a `Status` string instead of the v2 `[Status, boolean]` tuple, and renamed the location `type: 'always'` option to `background: true`. Under v3 the old tuple reads silently degraded rather than failing: `authorizedStatus.includes(accessFine[0])` tested the first *character* of the status string, so `isEnabled()` always resolved false. 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 .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 454b9d00-10cf-4437-9d9a-bb20d9456631 You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file. 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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Part of the perms v2 → v3 migration. @nativescript/local-notifications@7.0.0 already requires perms v3; the remaining perms consumers in this repo still read the v2 shapes, so an app combining them gets whichever major npm hoists and the other side breaks.
The bug
perms v3 resolves check() to a Status string, not the v2 [Status, boolean] tuple. The old code indexed into it:
Against v3 that tests 'a' — the first character of 'authorized' — which is not in ['authorized', 'limited']. isEnabled() and _permissionIsGiven() therefore always resolved false, with no error thrown.
Second v3 change
LocationOptions.type was replaced by background:
v3's getPermissionsList gates ACCESS_BACKGROUND_LOCATION on options.background === true, so the old type: 'always' silently stopped requesting background location. The type: '' on the foreground request was inert in both majors and is dropped.
Behavior parity
Dropping the tuple's second element is safe at these call sites: v2 only returned a meaningful boolean there for check('location', { type: 'always' }). These calls pass raw android permission strings, where v2 always returned true.
Verification
nx build geolocation clean against perms 3.0.11 (with #679 and #674 applied).
Merge order
Needs #679 — the workspace cannot type-check against the wrong perms major. Merge that alongside the other three migrations.
🤖 Generated with Claude Code