1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 16:49:18 -05:00

feat: Stabilize Deno.osRelease() API (#15973)

Closes https://github.com/denoland/deno/issues/15928
This commit is contained in:
Bartek Iwańczuk 2022-10-26 14:18:58 +02:00 committed by GitHub
parent 851db03a6e
commit 046ab7dc8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 18 deletions

View file

@ -344,6 +344,22 @@ declare namespace Deno {
*/
export const noColor: boolean;
/**
* Returns the release version of the Operating System.
*
* ```ts
* console.log(Deno.osRelease());
* ```
*
* Requires `allow-env` permission.
* Under consideration to possibly move to Deno.build or Deno.versions and if
* it should depend sys-info, which may not be desirable.
*
* @tags allow-env
* @category Runtime Environment
*/
export function osRelease(): string;
/**
* Options which define the permissions within a test or worker context.
*

View file

@ -226,23 +226,6 @@ declare namespace Deno {
*/
export function umask(mask?: number): number;
/** **UNSTABLE**: New API, yet to be vetted.
*
* Returns the release version of the Operating System.
*
* ```ts
* console.log(Deno.osRelease());
* ```
*
* Requires `allow-sys` permission.
* Under consideration to possibly move to Deno.build or Deno.versions and if
* it should depend sys-info, which may not be desirable.
*
* @tags allow-sys
* @category Runtime Environment
*/
export function osRelease(): string;
/** **UNSTABLE**: New API, yet to be vetted.
*
* Displays the total amount of free and used physical and swap memory in the

View file

@ -182,7 +182,6 @@ fn op_hostname(state: &mut OpState) -> Result<String, AnyError> {
#[op]
fn op_os_release(state: &mut OpState) -> Result<String, AnyError> {
super::check_unstable(state, "Deno.osRelease");
state
.borrow_mut::<Permissions>()
.sys