fix(zustand): v5 selector stability issues (#4539)

* fix(zustand): v5 selector stability issues

* address comments
This commit is contained in:
Vikhyath Mondreti
2026-05-09 16:07:12 -07:00
committed by GitHub
parent 6544e0a783
commit 13666b162d
23 changed files with 641 additions and 236 deletions
+19
View File
@@ -0,0 +1,19 @@
import { spawnSync } from 'node:child_process'
export function formatGeneratedSource(source: string, stdinFilePath: string, cwd: string): string {
const result = spawnSync('bunx', ['biome', 'format', '--stdin-file-path', stdinFilePath], {
cwd,
encoding: 'utf8',
input: source,
})
if (result.status !== 0) {
throw new Error(
`Failed to format generated source for ${stdinFilePath}:\n${
result.stderr || result.stdout || 'unknown error'
}`
)
}
return result.stdout
}