summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/01_require.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-05-16 05:16:24 +0200
committerGitHub <noreply@github.com>2023-05-16 05:16:24 +0200
commit78fbc3f3f695610083d07a55ef2a116e0bf04a10 (patch)
tree8c09614e023aa9f46a16b591dced4446f484b9eb /ext/node/polyfills/01_require.js
parentab9a17eeee01a3b04fac2bf583c812179f410c91 (diff)
fix(npm): add performance.markResourceTiming sham (#19123)
This commit shams "performance.markResourceTiming" API by using a noop function. It is done to provide compatibility with "npm:undici" package. We should look into actually implementing this API properly, but I wanted to unblock support for "undici" and "astro" for now. Ref https://github.com/denoland/deno/issues/19065
Diffstat (limited to 'ext/node/polyfills/01_require.js')
-rw-r--r--ext/node/polyfills/01_require.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js
index a8a70c2fc..7b91d12aa 100644
--- a/ext/node/polyfills/01_require.js
+++ b/ext/node/polyfills/01_require.js
@@ -907,7 +907,7 @@ Module.prototype.require = function (id) {
Module.wrapper = [
// We provide the non-standard APIs in the CommonJS wrapper
// to avoid exposing them in global namespace.
- "(function (exports, require, module, __filename, __dirname, globalThis) { const { Buffer, clearImmediate, clearInterval, clearTimeout, console, global, process, setImmediate, setInterval, setTimeout} = globalThis; var window = undefined; (function () {",
+ "(function (exports, require, module, __filename, __dirname, globalThis) { const { Buffer, clearImmediate, clearInterval, clearTimeout, console, global, process, setImmediate, setInterval, setTimeout, performance} = globalThis; var window = undefined; (function () {",
"\n}).call(this); })",
];
Module.wrap = function (script) {