Repository navigation
Release v4.184.0
Text rules can now say what they mean: contains, not contains, starts with and ends with are first-class rules, and the lookaround patterns Studio generated for them work again instead of being refused.
Added
- Concept and command rules
contains "x",not contains "x",starts with "x"andends with "x"on text values. They compare UTF-16 code units ordinally, an absent value passes, and they are written to the executable model in a new ESM version; models that do not use them keep their bytes and version. See Commands. (#810) - Public pattern admission checks
PortableMatchPattern.Check(pattern)in .NET andcheckPortableMatchPattern(pattern)in@cratis/screenplay-compiler. They report whether amatchespattern is admitted, deprecated, refused or invalid, with the diagnostic code, the construct and its offset, a suggestion, and the first-class replacement for a Studio pattern. (#810)
Changed
matchespatterns in the exact shapes Studio generated for equals, not equals, contains, not contains, starts with and ends with (both the$and the(?![\s\S])forms) now bind as the matching first-class rule with warning PLAY0787 and a quick fix, instead of failing with PLAY0699. Executable models already holding these patterns evaluate them as the first-class rule. Every other lookaround is still refused. (#810)