Commit graph

30 commits

Author SHA1 Message Date
Sven Slootweg 2fca34933d Merge pull request 'change flatten to Array#flat (Node 10.x EOL)' (#3) from f0x-validatem/core:master into master
Reviewed-on: #3
2022-10-29 14:48:20 +02:00
f0x 68381f23cf change flatten to Array#flat (Node 10.x EOL) 2022-10-29 12:38:58 +00:00
f0x 950b35d9c3 only run extractFramesGecko when required 2022-10-29 00:41:35 +00:00
Sven Slootweg 1f43580bc5 Replace stacktrace splitting logic to resolve a REDoS vulnerability 2022-03-20 00:27:22 +01:00
Sven Slootweg 061123e1b4 Add testValue API 2022-03-03 03:46:36 +01:00
Sven Slootweg 1ca1fe1110 Revert "Ensure that validateOptions produces an object by default"
This reverts commit b1b22c0a63.
2020-09-27 14:23:41 +02:00
Sven Slootweg b1b22c0a63 Ensure that validateOptions produces an object by default 2020-09-27 14:08:49 +02:00
Sven Slootweg 2941aef6c8 Don't skip subsequent validators when an earlier validator changed the value from null to non-null 2020-09-08 18:38:22 +02:00
Sven Slootweg 679bd40563 Don't insert an isPlainObject rule in validateOptions; this is redundant and interferes with object-or-wrapped-literal usecases 2020-07-20 22:17:18 +02:00
Sven Slootweg a0231a7fc3 No longer expect a ValidationError to be an Error instance 2020-07-20 22:15:38 +02:00
Sven Slootweg d13a4a8235 Let users return Error objects from validators 2020-07-09 20:57:50 +02:00
Sven Slootweg 955fec8ab1 Add Gecko support and make failed stacktrace parsing more robust 2020-07-09 20:55:29 +02:00
Sven Slootweg 783f67a03e Add FIXME comment 2020-07-03 13:17:47 +02:00
Sven Slootweg fb82fb820a Actually detect endings in stack frame regex, and not a literal $ 2020-07-01 15:56:12 +02:00
Sven Slootweg 1a97d4ee09 Handle anonymous stack frames correctly 2020-07-01 15:54:41 +02:00
Sven Slootweg bae1f0e9fc Don't attempt to generate function description when the location of a stacktrace frame could not be determined 2020-07-01 15:50:15 +02:00
Sven Slootweg d610cad10b Add a global "no heuristics" flag for validator debugging 2020-07-01 14:58:16 +02:00
Sven Slootweg 2d26d92d17 Refactor colors, heuristically detect the source of a validation failure 2020-07-01 13:22:38 +02:00
Sven Slootweg 9a31868883 Improve error processing with syncpipe 2020-07-01 11:26:49 +02:00
Sven Slootweg eba89ed9c5 Improve subError rendering 2020-07-01 11:22:51 +02:00
Sven Slootweg be5fd46005 Add support for rest operator in arguments 2020-06-30 23:51:01 +02:00
Sven Slootweg b82a7d359d Support object syntax for validateArguments as well 2020-06-28 21:16:03 +02:00
Sven Slootweg 558b9ead9c Improve multi-level subError rendering (eg. nested 'either') 2020-06-28 01:17:00 +02:00
Sven Slootweg 27beee88f0 Omit '(root)' specifier entirely 2020-06-28 00:15:01 +02:00
Sven Slootweg 1cc19bff3e Also render subErrors as a tree for root-level errors 2020-06-28 00:01:11 +02:00
Sven Slootweg 8214fb3bc5 Improve error rendering, add support for subErrors 2020-06-27 23:41:40 +02:00
Sven Slootweg 50b49dc9a8 Add support for callIfNull 2020-06-14 01:05:37 +02:00
Sven Slootweg 8ed6ad0abe Add TODO markers for error aggregration 2020-06-14 01:04:29 +02:00
Sven Slootweg a1fd0b7adf Replace flatten implementation to reduce bundle size 2020-05-26 22:15:16 +02:00
Sven Slootweg aa644fa3f5 Rewrite to modular design 2020-05-26 04:23:41 +02:00