summaryrefslogtreecommitdiff
path: root/runtime/js/90_deno_ns.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-01-24 14:57:54 +0100
committerGitHub <noreply@github.com>2024-01-24 14:57:54 +0100
commit064a6c048ab420302cbb822bedd3fc365b4259a7 (patch)
tree1aa6ee2716f2cc30e74dd97818330a5e2d154a07 /runtime/js/90_deno_ns.js
parent745333f073aba4c97e7d06c731063105493cde5a (diff)
feat: Add warnings for more deprecated APIs (#21992)
Follow up to https://github.com/denoland/deno/pull/21939 that adds deprecation warnings to more `Deno` APIs: - `Deno.copy()` - `Deno.iter()` - `Deno.iterSync()` - `new Deno.Buffer()` - `Deno.readAll()` - `Deno.readAllSync()` - `Deno.writeAll()` - `Deno.writeAllSync()` - `Deno.FsWatcher.return` - `Deno.serveHttp()` - `Deno.metrics()` --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'runtime/js/90_deno_ns.js')
-rw-r--r--runtime/js/90_deno_ns.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index 5bcc68a57..bba1f30d7 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -43,7 +43,10 @@ class FsFile extends fs.FsFile {
}
const denoNs = {
- metrics: core.metrics,
+ metrics: () => {
+ internals.warnOnDeprecatedApi("Deno.metrics()", new Error().stack);
+ return core.metrics();
+ },
Process: process.Process,
run: process.run,
isatty: tty.isatty,