Skip to content

Release v4.183.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 22:17
57cfb07

Summary

A matches pattern now gives the same verdict on every host, every target framework, and in C# and JavaScript. Patterns are defined as a flagless JavaScript regular expression limited to forms that run in linear time. Screenplay checks them with its own matcher, without any timeout.

Changed

  • A matches pattern is now a flagless JavaScript RegExp restricted to a portable linear dialect. Both compilers refuse lookarounds, backreferences, \b, \p{…}, .NET-only syntax (\A, \z, inline options, class subtraction) and patterns over the size budget with PLAY0699. The message names the construct and suggests an equivalent where one exists. Existing models that use one of these constructs no longer compile: rewrite the pattern as the message suggests, for example \A/\z as ^/$ or a length-only lookahead as a counted repeat. See Commands. (#800)
  • matches rules are evaluated by Screenplay's own linear-time matcher instead of .NET's regular expression engine. Verdicts no longer depend on how busy the host is, on the target framework or on runtime settings, and there is no timeout. (#800)
  • A few matches verdicts in the reference evaluator now agree with JavaScript where they used to differ: \s no longer matches Unicode spaces such as the no-break space U+00A0 (this also affects the built-in email rule), . no longer matches \r, U+2028 or U+2029, and \w no longer matches U+0130. (#800)
  • Executable models saved by earlier versions still load when a pattern is outside the dialect. The evaluator reports such a rule as an unsupported validation, and generation checks report it as Unproven instead of timing out. (#800)

Fixed

  • A matches rule no longer rejects a valid value, and a generation check no longer reports PLAY0689, because the host was too slow to finish matching within a second. (#800)