Skip to content

Commit

Permalink
docs: use JSR in example code snippets (denoland#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Apr 5, 2024
1 parent e90aea3 commit bb9d9b5
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions runtime/manual/advanced/migrate_deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ for each impacted API below.

### `Deno.Buffer`

Use [`Buffer`](https://deno.land/std/io/buffer.ts?s=Buffer) from the Standard
Use [`Buffer`](https://jsr.io/@std/io/doc/buffer/~/Buffer) from the Standard
Library instead.

```diff
+ import { Buffer } from "https://deno.land/std/io/buffer.ts";
+ import { Buffer } from "jsr:@std/io/buffer";

- const buffer = new Deno.Buffer();
+ const buffer = new Buffer();
Expand All @@ -32,11 +32,11 @@ See [deno#9795][deno#9795] for details.

### `Deno.Closer`

Use [Closer](https://deno.land/std/io/types.ts?s=Closer) from the Standard
Use [Closer](https://jsr.io/@std/io/doc/types/~/Closer) from the Standard
Library instead.

```diff
+ import type { Closer } from "https://deno.land/std/io/types.ts";
+ import type { Closer } from "jsr:@std/io/types";

- function foo(closer: Deno.Closer) {
+ function foo(closer: Closer) {
Expand Down Expand Up @@ -150,11 +150,11 @@ See [deno#22274](https://github.com/denoland/deno/pull/22274) for details.

### `Deno.copy()`

Use [`copy()`](https://deno.land/std/io/copy.ts?s=copy) from the Standard
Library instead.
Use [`copy()`](https://jsr.io/@std/io/doc/copy/~/copy) from the Standard Library
instead.

```diff
+ import { copy } from "https://deno.land/std/io/copy.ts";
+ import { copy } from "jsr:@std/io/copy";

...

Expand Down Expand Up @@ -361,11 +361,11 @@ See the [Deno 1.40 blog post][Deno 1.40 blog post] for details.
### `Deno.iter()`

Use
[`iterateReader()`](https://deno.land/std/io/iterate_reader.ts?s=iterateReader)
[`iterateReader()`](https://jsr.io/@std/io/doc/iterate-reader/~/iterateReader)
from the Standard Library instead.

```diff
+ import { iterateReader } from "https://deno.land/std/io/iterate_reader.ts";
+ import { iterateReader } from "jsr:@std/io/iterate-reader";

- for await (const chunk of Deno.iter(reader)) {
+ for await (const chunk of iterateReader(reader)) {
Expand All @@ -378,11 +378,11 @@ See [deno#9795][deno#9795] for details.
### `Deno.iterSync()`

Use
[`iterateReaderSync()`](https://deno.land/std/io/iterate_reader.ts?s=iterateReaderSync)
[`iterateReaderSync()`](https://jsr.io/@std/io/doc/iterate-reader/~/iterateReaderSync)
from the Standard Library instead.

```diff
+ import { iterateReaderSync } from "https://deno.land/std/io/iterate_reader.ts";
+ import { iterateReaderSync } from "jsr:@std/io/iterate-reader";

- for (const chunk of Deno.iterSync(reader)) {
+ for (const chunk of iterateReaderSync(reader)) {
Expand Down Expand Up @@ -440,11 +440,11 @@ See [deno#12639](https://github.com/denoland/deno/issues/12639) for details.

### `Deno.readAllSync()`

Use [`readAllSync()`](https://deno.land/std/io/read_all.ts?s=readAllSync) from
Use [`readAllSync()`](https://jsr.io/@std/io/doc/read-all/~/readAllSync) from
the Standard Library instead.

```diff
+ import { readAllSync } from "https://deno.land/std/io/read_all.ts";
+ import { readAllSync } from "jsr:@std/io/read-all";

...

Expand All @@ -456,11 +456,11 @@ See [deno#9795][deno#9795] for details.

### `Deno.readAll()`

Use [`readAll()`](https://deno.land/std/io/read_all.ts?s=readAll) from the
Use [`readAll()`](https://jsr.io/@std/io/doc/read-all/~/readAll) from the
Standard Library instead.

```diff
+ import { readAll } from "https://deno.land/std/io/read_all.ts";
+ import { readAll } from "jsr:@std/io/read-all";

...

Expand All @@ -472,11 +472,11 @@ See [deno#9795][deno#9795] for details.

### `Deno.Reader`

Use [`Reader`](https://deno.land/std/io/types.ts?s=Reader) from the Standard
Library instead.
Use [`Reader`](https://jsr.io/@std/io/doc/~/Reader) from the Standard Library
instead.

```diff
+ import type { Reader } from "https://deno.land/std/io/types.ts";
+ import type { Reader } from "jsr:@std/io/types";

- function foo(closer: Deno.Reader) {
+ function foo(closer: Reader) {
Expand All @@ -488,11 +488,11 @@ See [deno#9795][deno#9795] for details.

### `Deno.ReaderSync`

Use [`ReaderSync`](https://deno.land/std/io/types.ts?s=ReaderSync) from the
Standard Library instead.
Use [`ReaderSync`](https://jsr.io/@std/io/doc/~/ReaderSync) from the Standard
Library instead.

```diff
+ import type { ReaderSync } from "https://deno.land/std/io/types.ts";
+ import type { ReaderSync } from "jsr:@std/io/types";

- function foo(reader: Deno.ReaderSync) {
+ function foo(reader: ReaderSync) {
Expand Down Expand Up @@ -772,11 +772,11 @@ See the [Deno 1.40 blog post][Deno 1.40 blog post] for details.

### `Deno.writeAllSync()`

Use [`writeAllSync()`](https://deno.land/std/io/write_all.ts?s=writeAllSync)
from the Standard Library instead.
Use [`writeAllSync()`](https://jsr.io/@std/io/doc/~/writeAllSync) from the
Standard Library instead.

```diff
+ import { writeAllSync } from "https://deno.land/std/io/write_all.ts";
+ import { writeAllSync } from "jsr:@std/io/write-all";

...

Expand All @@ -788,11 +788,11 @@ See [deno#9795][deno#9795] for details.

### `Deno.writeAll()`

Use [`writeAll()`](https://deno.land/std/io/write_all.ts?s=writeAll) from the
Standard Library instead.
Use [`writeAll()`](https://jsr.io/@std/io/doc/~/writeAll) from the Standard
Library instead.

```diff
+ import { writeAll } from "https://deno.land/std/io/write_all.ts";
+ import { writeAll } from "jsr:@std/io/write-all";

...

Expand All @@ -804,11 +804,11 @@ See [deno#9795][deno#9795] for details.

### `Deno.Writer`

Use [Writer](https://deno.land/std/io/types.ts?s=Writer) from the Standard
Library instead.
Use [Writer](https://jsr.io/@std/io/doc/~/Writer) from the Standard Library
instead.

```diff
+ import type { Writer } from "https://deno.land/std/io/types.ts";
+ import type { Writer } from "jsr:@std/io/types";

- function foo(writer: Deno.Writer) {
+ function foo(writer: Writer) {
Expand All @@ -820,11 +820,11 @@ See [deno#9795][deno#9795] for details.

### `Deno.WriterSync`

Use [WriterSync](https://deno.land/std/io/types.ts?s=WriterSync) from the
Standard Library instead.
Use [WriterSync](https://jsr.io/@std/io/doc/~/WriterSync) from the Standard
Library instead.

```diff
+ import type { WriterSync } from "https://deno.land/std/io/types.ts";
+ import type { WriterSync } from "jsr:@std/io/types";

- function foo(writer: Deno.WriterSync) {
+ function foo(writer: WriterSync) {
Expand Down

0 comments on commit bb9d9b5

Please sign in to comment.