fix(generator-toolbox): normalize (#8374)

This commit is contained in:
Pierre Donias
2025-02-24 10:12:19 +01:00
committed by GitHub
parent 5910a47780
commit 821c25f864
3 changed files with 6 additions and 4 deletions

View File

@@ -62,12 +62,12 @@ import { Synchronized } from '@vates/generator-toolbox'
async function consume(generator: AsyncGenerator) {
for await (const val of generator) {
console.log({val})
console.log({ val })
}
}
const forker = new Synchronized(generator)
const first = forker.fork('first')
const second = forker.fork('second')
const forker = new Synchronized(generator)
const first = forker.fork('first')
const second = forker.fork('second')
await Promise.all([consume(first), consume(second)])
```

View File

@@ -14,6 +14,7 @@
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"postversion": "npm publish --access public",
"test": "tsc && node --test **/*.test.mjs"
},
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@vates/generator-toolbox",

View File

@@ -31,6 +31,7 @@
<!--packages-start-->
- @vates/generator-toolbox patch
- @xen-orchestra/rest-api patch
<!--packages-end-->