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

docs: add missing symbols to "Deno 1.x to 2.x Migration Guide" #828

Merged
merged 4 commits into from
Sep 11, 2024
Merged
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
40 changes: 40 additions & 0 deletions runtime/reference/migrate_deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,26 @@ instead.

See [deno#22178](https://github.com/denoland/deno/issues/22178) for details.

### Deno.FsFile.prototype.rid

Use [`Deno.FsFile`](https://docs.deno.com/api/deno/~/Deno.FsFile) instance
methods instead.

```diff
const file = await Deno.open("/foo/bar.txt");

const buffer = new Uint8Array(1_024);
- await Deno.read(file.rid, buffer);
+ await file.read(buffer);

const data = new TextEncoder().encode("Hello, world!");
- await Deno.write(file.rid, data);
+ await file.write(data);

- Deno.close(file.rid);
+ file.close();
```

### Deno.fstatSync()

Use
Expand Down Expand Up @@ -1155,6 +1175,26 @@ methods instead.

See the [Deno 1.40 blog post][Deno 1.40 blog post] for details.

### Deno.TlsListener.prototype.rid

Use [`Deno.TlsListener`](https://docs.deno.com/api/deno/~/Deno.TlsListener)
instance methods instead.

```diff
const listener = Deno.listenTls({
port: 443,
cert: Deno.readTextFileSync("./server.crt"),
key: Deno.readTextFileSync("./server.key"),
});

// ...

- Deno.close(listener.rid);
+ listener.close();
```

See the [Deno 1.40 blog post][Deno 1.40 blog post] for details.

### Deno.UnixConn.prototype.rid

Use [`Deno.UnixConn`](https://docs.deno.com/api/deno/~/Deno.UnixConn) instance
Expand Down