Open vicb opened 1 month ago
perf_hooks/$cloudflare.ts patches globalThis.performance, see:
perf_hooks/$cloudflare.ts
globalThis.performance
https://github.com/unjs/unenv/blob/a58d5160ad0bb7e949c9fd016996afa695c34f78/src/runtime/node/perf_hooks/%24cloudflare.ts#L37-L43
@IgorMinar I think you told me that we should not patch existing globals here. Is this a special case?
Note that performance is in the inject
performance
inject
https://github.com/unjs/unenv/blob/a58d5160ad0bb7e949c9fd016996afa695c34f78/src/presets/cloudflare.ts#L72
perf_hooks/$cloudflare.ts
patchesglobalThis.performance
, see:https://github.com/unjs/unenv/blob/a58d5160ad0bb7e949c9fd016996afa695c34f78/src/runtime/node/perf_hooks/%24cloudflare.ts#L37-L43
@IgorMinar I think you told me that we should not patch existing globals here. Is this a special case?
Note that
performance
is in theinject
https://github.com/unjs/unenv/blob/a58d5160ad0bb7e949c9fd016996afa695c34f78/src/presets/cloudflare.ts#L72