From 4df1d37ddc54242c339765f22fb90ba2e9e3a99a Mon Sep 17 00:00:00 2001 From: dave caruso Date: Thu, 1 Jun 2023 21:16:47 -0400 Subject: Bundle and minify `.exports.js` files. (#3036) * move all exports.js into src/js * finalize the sort of this * and it works * add test.ts to gitignore * okay * convert some to ts just to show * finish up * fixup makefile * minify syntax in dev * finish rebase * dont minify all modules * merge * finish rebase merge * flaky test that hangs --- src/js/node/perf_hooks.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/js/node/perf_hooks.js (limited to 'src/js/node/perf_hooks.js') diff --git a/src/js/node/perf_hooks.js b/src/js/node/perf_hooks.js new file mode 100644 index 000000000..fb5929c57 --- /dev/null +++ b/src/js/node/perf_hooks.js @@ -0,0 +1,28 @@ +// Hardcoded module "node:perf_hooks" +import { throwNotImplemented } from "../shared"; + +export var performance = globalThis.performance; + +export class PerformanceObserver { + constructor() { + throwNotImplemented("PerformanceObserver"); + } +} + +export class PerformanceEntry { + constructor() { + throwNotImplemented("PerformanceEntry"); + } +} +export class PerformanceNodeTiming { + constructor() { + throw new Error("PerformanceNodeTiming is not supported in this environment."); + } +} + +export default { + performance, + PerformanceEntry, + PerformanceNodeTiming, + [Symbol.for("CommonJS")]: 0, +}; -- cgit v1.2.3