diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-01-24 15:08:59 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 09:38:59 +0530 |
commit | 4c5ce9088328b620847f22b1161a41261675f8c9 (patch) | |
tree | 46c3a29b6cb3c0d6a5d5dd74d7da5163789d3258 /runtime/js | |
parent | 5a4d69354c3c240a0ea42804b712942f1c30e744 (diff) |
chore: update `Deno.{fsync,fsyncSync}()` deprecation notices (#22071)
To align with other deprecations.
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/90_deno_ns.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index 7ef807140..452c62725 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -127,8 +127,22 @@ const denoNs = { }, fstatSync: fs.fstatSync, fstat: fs.fstat, - fsyncSync: fs.fsyncSync, - fsync: fs.fsync, + fsyncSync(rid) { + 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, fdatasync: fs.fdatasync, symlink: fs.symlink, |