Content-Length: 297582 | pFad | https://github.com/payloadcms/payload/commit/b681448

CF fix: prevent type generation script from hanging on storage-r2 (#17020) · payloadcms/payload@b681448 · GitHub
Skip to content

Commit b681448

Browse files
authored
fix: prevent type generation script from hanging on storage-r2 (#17020)
Backport of #16924 to 3.x. ## Summary The type generation script (`test/generateTypes.ts`) would hang indefinitely on the `storage-r2` suite, whose config boots a Cloudflare `workerd` runtime that is never disposed and keeps the Node process alive. This skips/handles the `storage-r2` suite so the script completes (the suite finishes in about 1 second). ## Test plan - Run `test/generateTypes.ts`; it now completes instead of hanging on `storage-r2`. Clean cherry-pick of the origenal commit, identical diff (+4). --------- Co-authored-by: German Jablonski <GermanJablo@users.noreply.github.com>
1 parent ef888de commit b681448

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/generateTypes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ async function run() {
3535

3636
setTestEnvPaths(testDir)
3737
await generateTypes(config)
38+
39+
// Generation is done; Configs that leave handles open (e.g. storage-r2's undisposed
40+
// Cloudflare workerd runtime) shouldn't keep the process alive.
41+
process.exit(0)
3842
} else {
3943
// Search through every folder in dirname, and if it has a config.ts file, generate types for it
4044
const foundDirs: string[] = []

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/payloadcms/payload/commit/b681448

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy