Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING(fs): remove Deno.FsWatcher.prototype.rid #25444

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions cli/tsc/dts/lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3860,14 +3860,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;
/**
Expand Down
9 changes: 0 additions & 9 deletions runtime/js/40_fs_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 0 additions & 4 deletions tests/specs/future/runtime_api/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,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) {
Expand Down
1 change: 0 additions & 1 deletion tests/specs/future/runtime_api/main.out
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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
Expand Down