mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 03:21:47 +08:00
The dep upgrade in 9266b08e5e bumped uuid to ^14.0.0, which ships ES
modules only ("type": "module"; its sole node export, dist-node/index.js,
is ESM). Jest's CommonJS runtime cannot parse it, so the only suite that
imports uuid (useGetFlowId.test.ts) failed to run with "SyntaxError:
Unexpected token 'export'", failing the Frontend Jest Unit Tests job.
Add a moduleNameMapper entry routing uuid to a project mock, mirroring how
the repo already handles other ESM-only packages (vanilla-jsoneditor,
@jsonquerylang/jsonquery). The mock is RFC 4122-correct (crypto.randomUUID
for v4, deterministic SHA-1 v5 / MD5 v3 with namespace constants), so output
is byte-identical to the real package.