Skip to content

Commit

Permalink
docs: add Deno.ListenTlsOptions.certChain and Deno.Seeker[Sync] t…
Browse files Browse the repository at this point in the history
…o "Deno 1.x to 2.x Migration Guide" (denoland#819)
  • Loading branch information
iuioiua authored Sep 10, 2024
1 parent 5096423 commit 321681d
Showing 1 changed file with 59 additions and 16 deletions.
75 changes: 59 additions & 16 deletions runtime/manual/advanced/migrate_deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ See [deno#9795][deno#9795] for details.

### Deno.Closer

Use [Closer](https://jsr.io/@std/io/doc/types/~/Closer) from the Standard
Use [`Closer`](https://jsr.io/@std/io/doc/types/~/Closer) from the Standard
Library instead.

```diff
Expand Down Expand Up @@ -217,9 +217,9 @@ See the [Deno 1.40 blog post][Deno 1.40 blog post] for details.

### Deno.ConnectTlsOptions.certChain

Use
[`Deno.TlsCertifiedKeyPem.cert`](https://docs.deno.com/api/deno/~/Deno.TlsCertifiedKeyPem#property_cert)
instead.
Use the
[`cert`](https://docs.deno.com/api/deno/~/Deno.TlsCertifiedKeyPem#property_cert)
option instead.

```diff
const caCert = await Deno.readTextFile("./certs/my_custom_root_CA.pem");
Expand All @@ -237,9 +237,9 @@ See [deno#22274](https://github.com/denoland/deno/pull/22274) for details.

### Deno.ConnectTlsOptions.certFile

Use
[`Deno.TlsCertifiedKeyPem.cert`](https://docs.deno.com/api/deno/~/Deno.TlsCertifiedKeyPem#property_cert)
instead.
Use the
[`cert`](https://docs.deno.com/api/deno/~/Deno.TlsCertifiedKeyPem#property_cert)
option instead.

```diff
const caCert = await Deno.readTextFile("./certs/my_custom_root_CA.pem");
Expand All @@ -257,9 +257,9 @@ See [deno#22274](https://github.com/denoland/deno/pull/22274) for details.

### Deno.ConnectTlsOptions.privateKey

Use
[`Deno.TlsCertifiedKeyPem.cert`](https://docs.deno.com/api/deno/~/Deno.TlsCertifiedKeyPem#property_key)
instead.
Use the
[`key`](https://docs.deno.com/api/deno/~/Deno.TlsCertifiedKeyPem#property_key)
option instead.

```diff
const caCert = await Deno.readTextFile("./certs/my_custom_root_CA.pem");
Expand Down Expand Up @@ -666,11 +666,26 @@ methods instead.

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

### Deno.ListenTlsOptions.certChain

Use the
[`cert`](https://docs.deno.com/api/deno/~/Deno.ListenTlsOptions#property_cert)
option instead.

```diff
using listener = Deno.listenTls({
port: 443,
- certChain: Deno.readTextFile("./server.crt"),
+ cert: Deno.readTextFile("./server.crt"),
key: Deno.readTextFileSync("./server.key"),
});
```

### Deno.ListenTlsOptions.certFile

Pass the certificate file contents to
[`Deno.ListenTlsOptions.cert`](https://docs.deno.com/api/deno/~/Deno.ListenTlsOptions#property_cert)
instead.
Pass the certificate file contents to the
[`cert`](https://docs.deno.com/api/deno/~/Deno.ListenTlsOptions#property_cert)
option instead.

```diff
using listener = Deno.listenTls({
Expand All @@ -685,9 +700,9 @@ See [deno#12639](https://github.com/denoland/deno/issues/12639) for details.

### Deno.ListenTlsOptions.keyFile

Pass the key file contents to
[`Deno.ListenTlsOptions.key`](https://docs.deno.com/api/deno/~/Deno.ListenTlsOptions#property_key)
instead.
Pass the key file contents to the
[`key`](https://docs.deno.com/api/deno/~/Deno.ListenTlsOptions#property_key)
option instead.

```diff
using listener = Deno.listenTls({
Expand Down Expand Up @@ -871,6 +886,34 @@ directive.

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

### Deno.Seeker

Use [`Seeker`](https://jsr.io/@std/io/doc/types/~/Seeker) from the Standard
Library instead.

```diff
+ import type { Seeker } from "jsr:@std/io/types";

- function foo(seeker: Deno.Seeker) {
+ function foo(seeker: Seeker) {
// ...
}
```

### Deno.SeekerSync

Use [`SeekerSync`](https://jsr.io/@std/io/doc/types/~/SeekerSync) from the
Standard Library instead.

```diff
+ import type { SeekerSync } from "jsr:@std/io/types";

- function foo(seeker: Deno.SeekerSync) {
+ function foo(seeker: SeekerSync) {
// ...
}
```

### Deno.seekSync()

Use
Expand Down

0 comments on commit 321681d

Please sign in to comment.