Skip to content

Commit 6b466c9

Browse files
conico974vicb
andauthored
Apply suggestions from code review
Co-authored-by: Victor Berchet <[email protected]>
1 parent 507ca50 commit 6b466c9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.changeset/famous-weeks-deliver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@opennextjs/cloudflare": patch
33
---
44

5-
global `setTimeout`, `setInterval` and `setImmediate` now use the one from node
5+
global timer functions now use the one from node:timers

packages/cloudflare/src/cli/build/bundle-server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
146146
},
147147
banner: {
148148
// We need to import them here, assigning them to `globalThis` does not work because node:timers use `globalThis` and thus create an infinite loop
149+
// See https://github.com/cloudflare/workerd/blob/d6a764c/src/node/internal/internal_timers.ts#L56-L70
149150
js: `import {setInterval, clearInterval, setTimeout, clearTimeout, setImmediate, clearImmediate} from "node:timers"`,
150151
},
151152
platform: "node",

0 commit comments

Comments
 (0)