denoland / denoland/deploy_feedback
[Bug]: `Deno.permissions` throws TypeError for `sys` permission
- Dominant language
- No language data
- Stars
- 79
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
A call to `await Deno.permissions.query({ name: "sys" })` currently throws a `TypeError` on Deno Deploy:
```ts
TypeError: The provided value "sys" is not a valid permission name.
```
(see also [this playground](https://dash.deno.com/playground/early-cat-17))
This doesn't happen with any of the other permissions, and the non-availability of this one in particular unfortunately isn't documented anywhere, as far as I could tell. I'm aware most of the sys-related fields are placeholders on Deno Deploy anyway and permissions are sort of irrelevant, however it would be great to get a `PermissionStatus` here nonetheless, even if it's just for compatibility.
### Steps to reproduce
1. call `await Deno.permissions.query({ name: "sys" })`
2. receive a `TypeError`
### Expected behavior
The `.query()` call returns either `{ state: "granted" }` or `{ state: "denied" }`.
### Additional context
This seems fairly similar to #527 - again with the `sentry` package (which has since moved from `querySync` to `query`), relying on this permission check before calling `Deno.osRelease()`:
https://github.com/getsentry/sentry-javascript/blob/fe1fb8c6849bf2e22191e956a538e9e00f836421/packages/deno/src/integrations/context.ts#L20
The only ways I've found to avoid this is to either disable the linked `DenoContext` integration, or monkey-patch `Deno.permissions.query` and hope nothing breaks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.