flow-runtime
flow-runtime copied to clipboard
Fix warn mode throwing validation errors
Fixes #113.
Summary
- Wrap warn-mode validation in a catch path so validation-time errors are emitted as warnings instead of escaping.
- Keep the existing warning behavior for normal validation failures.
- Add regression coverage using a
$Shapevalidation path that previously threw.
Tests
yarn --cwd packages/flow-runtime testyarn --cwd packages/flow-runtime eslint ./src/TypeContext.js ./src/typed.test.jsgit diff --check
Note: full yarn --cwd packages/flow-runtime lint is not clean in this local checkout because of existing fixture lint errors, so I also ran targeted ESLint on the changed files.