Skip to content

Commit

Permalink
docs: add Deno.funlock[Sync]() and Deno.flock[Sync]() migration g…
Browse files Browse the repository at this point in the history
…uides (denoland#311)
  • Loading branch information
iuioiua authored Feb 4, 2024
1 parent 2696469 commit 243008a
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions runtime/manual/advanced/migrate_deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,31 @@ Use [`Deno.FsFile`](https://deno.land/api?s=Deno.FsFile) instead.

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

### `Deno.flock()`

Use [`Deno.FsFile.lock()`](https://deno.land/api?s=Deno.FsFile&p=prototype.lock)
instead.

```diff
- await Deno.flock(file.rid);
+ await file.lock();
```

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

### `Deno.flockSync()`

Use
[`Deno.FsFile.lockSync()`](https://deno.land/api?s=Deno.FsFile&p=prototype.lockSync)
instead.

```diff
- Deno.flockSync(file.rid);
+ file.lockSync();
```

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

### `Deno.fstatSync()`

Use
Expand Down Expand Up @@ -194,6 +219,32 @@ instead.

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

### `Deno.funlock()`

Use
[`Deno.FsFile.unlock()`](https://deno.land/api?s=Deno.FsFile&p=prototype.unlock)
instead.

```diff
- await Deno.funlock(file.rid);
+ await file.unlock();
```

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

### `Deno.funlockSync()`

Use
[`Deno.FsFile.unlockSync()`](https://deno.land/api?s=Deno.FsFile&p=prototype.unlockSync)
instead.

```diff
- Deno.funlockSync(file.rid);
+ file.unlockSync();
```

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

### `Deno.futimeSync()`

Use
Expand Down

0 comments on commit 243008a

Please sign in to comment.