summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/diagnostics.rs2
-rw-r--r--cli/dts/lib.deno.ns.d.ts38
-rw-r--r--cli/dts/lib.deno.unstable.d.ts40
-rw-r--r--runtime/js/90_deno_ns.js4
-rw-r--r--runtime/ops/fs.rs3
5 files changed, 40 insertions, 47 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs
index 5b2ce3641..0ba1a23ae 100644
--- a/cli/diagnostics.rs
+++ b/cli/diagnostics.rs
@@ -56,8 +56,6 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[
"signal",
"signals",
"startTls",
- "symlink",
- "symlinkSync",
"systemMemoryInfo",
"systemCpuInfo",
"umask",
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index aa10ce3af..cbbf44c84 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -2273,4 +2273,42 @@ declare namespace Deno {
/** The URL of the entrypoint module entered from the command-line. */
export const mainModule: string;
+
+ export type SymlinkOptions = {
+ type: "file" | "dir";
+ };
+
+ /**
+ * Creates `newpath` as a symbolic link to `oldpath`.
+ *
+ * The options.type parameter can be set to `file` or `dir`. This argument is only
+ * available on Windows and ignored on other platforms.
+ *
+ * ```ts
+ * Deno.symlinkSync("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function symlinkSync(
+ oldpath: string,
+ newpath: string,
+ options?: SymlinkOptions,
+ ): void;
+
+ /**
+ * Creates `newpath` as a symbolic link to `oldpath`.
+ *
+ * The options.type parameter can be set to `file` or `dir`. This argument is only
+ * available on Windows and ignored on other platforms.
+ *
+ * ```ts
+ * await Deno.symlink("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function symlink(
+ oldpath: string,
+ newpath: string,
+ options?: SymlinkOptions,
+ ): Promise<void>;
}
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 5007d657d..a71e5036d 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -36,46 +36,6 @@ declare namespace Deno {
rows: number;
};
- export type SymlinkOptions = {
- type: "file" | "dir";
- };
-
- /** **UNSTABLE**: This API needs a security review.
- *
- * Creates `newpath` as a symbolic link to `oldpath`.
- *
- * The options.type parameter can be set to `file` or `dir`. This argument is only
- * available on Windows and ignored on other platforms.
- *
- * ```ts
- * Deno.symlinkSync("old/name", "new/name");
- * ```
- *
- * Requires `allow-write` permission. */
- export function symlinkSync(
- oldpath: string,
- newpath: string,
- options?: SymlinkOptions,
- ): void;
-
- /** **UNSTABLE**: This API needs a security review.
- *
- * Creates `newpath` as a symbolic link to `oldpath`.
- *
- * The options.type parameter can be set to `file` or `dir`. This argument is only
- * available on Windows and ignored on other platforms.
- *
- * ```ts
- * await Deno.symlink("old/name", "new/name");
- * ```
- *
- * Requires `allow-write` permission. */
- export function symlink(
- oldpath: string,
- newpath: string,
- options?: SymlinkOptions,
- ): Promise<void>;
-
/** **Unstable** There are questions around which permission this needs. And
* maybe should be renamed (loadAverage?)
*
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index bd56538d1..d820d0896 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -88,6 +88,8 @@
fsync: __bootstrap.fs.fsync,
fdatasyncSync: __bootstrap.fs.fdatasyncSync,
fdatasync: __bootstrap.fs.fdatasync,
+ symlink: __bootstrap.fs.symlink,
+ symlinkSync: __bootstrap.fs.symlinkSync,
link: __bootstrap.fs.link,
linkSync: __bootstrap.fs.linkSync,
permissions: __bootstrap.permissions.permissions,
@@ -128,8 +130,6 @@
futimeSync: __bootstrap.fs.futimeSync,
utime: __bootstrap.fs.utime,
utimeSync: __bootstrap.fs.utimeSync,
- symlink: __bootstrap.fs.symlink,
- symlinkSync: __bootstrap.fs.symlinkSync,
HttpClient: __bootstrap.fetch.HttpClient,
createHttpClient: __bootstrap.fetch.createHttpClient,
};
diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs
index 5f5425dfa..8560d9f3e 100644
--- a/runtime/ops/fs.rs
+++ b/runtime/ops/fs.rs
@@ -1203,7 +1203,6 @@ fn op_symlink_sync(
args: Value,
_zero_copy: &mut [ZeroCopyBuf],
) -> Result<Value, AnyError> {
- super::check_unstable(state, "Deno.symlink");
let args: SymlinkArgs = serde_json::from_value(args)?;
let oldpath = PathBuf::from(&args.oldpath);
let newpath = PathBuf::from(&args.newpath);
@@ -1254,8 +1253,6 @@ async fn op_symlink_async(
args: Value,
_zero_copy: BufVec,
) -> Result<Value, AnyError> {
- super::check_unstable2(&state, "Deno.symlink");
-
let args: SymlinkArgs = serde_json::from_value(args)?;
let oldpath = PathBuf::from(&args.oldpath);
let newpath = PathBuf::from(&args.newpath);