Skip to content

Fix warn mode throwing validation errors#291

Open
sellimenes wants to merge 1 commit into
gajus:masterfrom
sellimenes:fix-warn-validation-throws
Open

Fix warn mode throwing validation errors#291
sellimenes wants to merge 1 commit into
gajus:masterfrom
sellimenes:fix-warn-validation-throws

Conversation

@sellimenes
Copy link
Copy Markdown

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 $Shape validation path that previously threw.

Tests

  • yarn --cwd packages/flow-runtime test
  • yarn --cwd packages/flow-runtime eslint ./src/TypeContext.js ./src/typed.test.js
  • git 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors are sometimes thrown with "warn" option

1 participant