diff options
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r-- | ext/node/polyfills/01_require.js | 2 | ||||
-rw-r--r-- | ext/node/polyfills/trace_events.ts | 27 |
2 files changed, 29 insertions, 0 deletions
diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index 156fa1bd0..ebbf92ba6 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -151,6 +151,7 @@ import test from "node:test"; import timers from "node:timers"; import timersPromises from "node:timers/promises"; import tls from "node:tls"; +import traceEvents from "node:trace_events"; import tty from "node:tty"; import url from "node:url"; import utilTypes from "node:util/types"; @@ -260,6 +261,7 @@ function setupBuiltinModules() { timers, "timers/promises": timersPromises, tls, + traceEvents, tty, url, util, diff --git a/ext/node/polyfills/trace_events.ts b/ext/node/polyfills/trace_events.ts new file mode 100644 index 000000000..bb3ea9745 --- /dev/null +++ b/ext/node/polyfills/trace_events.ts @@ -0,0 +1,27 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; + +class Tracing { + enabled = false; + categories = ""; +} + +function createTracing(opts) { + if (typeof opts !== "object" || opts == null) { + throw new ERR_INVALID_ARG_TYPE("options", "Object", opts); + } + + return new Tracing(opts); +} + +function getEnabledCategories() { + return ""; +} + +export { createTracing, getEnabledCategories }; + +export default { + createTracing, + getEnabledCategories, +}; |