summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-09-05 16:23:28 +1000
committerGitHub <noreply@github.com>2024-09-05 16:23:28 +1000
commit105c2e336a4312ed1714ab893c57eae2a19068c7 (patch)
treee472cdf21fe7cc7ee4f9a0b02503ac1228af3bef
parent713ed065e7cd1013e525a8e571cef08a30de87be (diff)
BREAKING(fs): remove `Deno.FsWatcher.prototype.rid` (#25444)
Towards #22079
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts8
-rw-r--r--runtime/js/40_fs_events.js9
-rw-r--r--tests/specs/future/runtime_api/main.js4
-rw-r--r--tests/specs/future/runtime_api/main.out1
4 files changed, 0 insertions, 22 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
index 319b1da45..cc6a1d4a8 100644
--- a/cli/tsc/dts/lib.deno.ns.d.ts
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -3849,14 +3849,6 @@ declare namespace Deno {
* @category File System
*/
export interface FsWatcher extends AsyncIterable<FsEvent>, Disposable {
- /**
- * The resource id.
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- */
- readonly rid: number;
/** Stops watching the file system and closes the watcher resource. */
close(): void;
/**
diff --git a/runtime/js/40_fs_events.js b/runtime/js/40_fs_events.js
index d7aa5de05..a0495540c 100644
--- a/runtime/js/40_fs_events.js
+++ b/runtime/js/40_fs_events.js
@@ -31,15 +31,6 @@ class FsWatcher {
this.#rid = op_fs_events_open({ recursive, paths });
}
- get rid() {
- internals.warnOnDeprecatedApi(
- "Deno.FsWatcher.rid",
- new Error().stack,
- "Use `Deno.FsWatcher` instance methods instead.",
- );
- return this.#rid;
- }
-
unref() {
core.unrefOpPromise(this.#promise);
}
diff --git a/tests/specs/future/runtime_api/main.js b/tests/specs/future/runtime_api/main.js
index afaa4e57b..95b10eecd 100644
--- a/tests/specs/future/runtime_api/main.js
+++ b/tests/specs/future/runtime_api/main.js
@@ -53,10 +53,6 @@ console.log("Deno.TlsConn.prototype.rid is", tlsConn.rid);
tlsConn.close();
-const watcher = Deno.watchFs(".");
-console.log("Deno.FsWatcher.prototype.rid is", watcher.rid);
-watcher.close();
-
try {
new Deno.FsFile(0);
} catch (error) {
diff --git a/tests/specs/future/runtime_api/main.out b/tests/specs/future/runtime_api/main.out
index d629b13b4..489dd4636 100644
--- a/tests/specs/future/runtime_api/main.out
+++ b/tests/specs/future/runtime_api/main.out
@@ -10,7 +10,6 @@ Deno.Conn.prototype.rid is undefined
Deno.UnixConn.prototype.rid is undefined
Deno.TlsListener.prototype.rid is undefined
Deno.TlsConn.prototype.rid is undefined
-Deno.FsWatcher.prototype.rid is undefined
Deno.FsFile constructor is illegal
Deno.ConnectTlsOptions.(certFile|keyFile) do nothing
Deno.ConnectTlsOptions.(certChain|privateKey) do nothing