mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
chore: update Deno.{fsync,fsyncSync}()
deprecation notices (#22071)
To align with other deprecations.
This commit is contained in:
parent
5a4d69354c
commit
4c5ce90883
3 changed files with 20 additions and 16 deletions
8
cli/tsc/dts/lib.deno.ns.d.ts
vendored
8
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -2168,8 +2168,8 @@ declare namespace Deno {
|
||||||
* console.log(await Deno.readTextFile("my_file.txt")); // H
|
* console.log(await Deno.readTextFile("my_file.txt")); // H
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated Use `file.sync()` instead. {@linkcode Deno.fsync} will be
|
* @deprecated Use {@linkcode Deno.FsFile.sync} instead.
|
||||||
* removed in v2.0.0.
|
* {@linkcode Deno.fsync} will be removed in Deno 2.0.
|
||||||
*
|
*
|
||||||
* @category I/O
|
* @category I/O
|
||||||
*/
|
*/
|
||||||
|
@ -2190,8 +2190,8 @@ declare namespace Deno {
|
||||||
* console.log(Deno.readTextFileSync("my_file.txt")); // H
|
* console.log(Deno.readTextFileSync("my_file.txt")); // H
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated Use `file.syncSync()` instead. {@linkcode Deno.fsyncSync} will
|
* @deprecated Use {@linkcode Deno.FsFile.syncSync} instead.
|
||||||
* be removed in v2.0.0.
|
* {@linkcode Deno.fsyncSync} will be removed in Deno 2.0.
|
||||||
*
|
*
|
||||||
* @category I/O
|
* @category I/O
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -576,20 +576,10 @@ async function fdatasync(rid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fsyncSync(rid) {
|
function fsyncSync(rid) {
|
||||||
internals.warnOnDeprecatedApi(
|
|
||||||
"Deno.fsyncSync()",
|
|
||||||
new Error().stack,
|
|
||||||
"Use `file.syncSync()` instead.",
|
|
||||||
);
|
|
||||||
op_fs_fsync_sync(rid);
|
op_fs_fsync_sync(rid);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fsync(rid) {
|
async function fsync(rid) {
|
||||||
internals.warnOnDeprecatedApi(
|
|
||||||
"Deno.fsync()",
|
|
||||||
new Error().stack,
|
|
||||||
"Use `file.sync()` instead.",
|
|
||||||
);
|
|
||||||
await op_fs_fsync_async(rid);
|
await op_fs_fsync_async(rid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,8 +127,22 @@ const denoNs = {
|
||||||
},
|
},
|
||||||
fstatSync: fs.fstatSync,
|
fstatSync: fs.fstatSync,
|
||||||
fstat: fs.fstat,
|
fstat: fs.fstat,
|
||||||
fsyncSync: fs.fsyncSync,
|
fsyncSync(rid) {
|
||||||
fsync: fs.fsync,
|
internals.warnOnDeprecatedApi(
|
||||||
|
"Deno.fsyncSync()",
|
||||||
|
new Error().stack,
|
||||||
|
"Use `Deno.FsFile.syncSync()` instead.",
|
||||||
|
);
|
||||||
|
fs.fsyncSync(rid);
|
||||||
|
},
|
||||||
|
async fsync(rid) {
|
||||||
|
internals.warnOnDeprecatedApi(
|
||||||
|
"Deno.fsync()",
|
||||||
|
new Error().stack,
|
||||||
|
"Use `Deno.FsFile.sync()` instead.",
|
||||||
|
);
|
||||||
|
await fs.fsync(rid);
|
||||||
|
},
|
||||||
fdatasyncSync: fs.fdatasyncSync,
|
fdatasyncSync: fs.fdatasyncSync,
|
||||||
fdatasync: fs.fdatasync,
|
fdatasync: fs.fdatasync,
|
||||||
symlink: fs.symlink,
|
symlink: fs.symlink,
|
||||||
|
|
Loading…
Add table
Reference in a new issue