Skip to content

Release v4.48.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 10:38
3baf4a4

Screenplay applications can now be composed from focused files with imports, specifications can say what sets off slices that are not driven by a command, and four sample applications show the whole language in use.

Added

  • import "<path or glob>" imports .play files relative to the importing file, with **, *, ? and ... At the top level it brings in whole documents; inside a module or feature it places each imported file there, so a file can hold just a slice. A file matched by several imports is imported once, at the deepest placement. See Imports.
  • screenplay <file> compiles the application that file is the root of, and IPlayFileCompiler.CompileApplication(path) does the same from code. Folder compilation, workspaces and the executable semantic model resolve imports the same way.
  • Specification actions: given clock and when clock, when trigger, given capture and when capture, and when query with then result [exactly] and then no result. when query binds to the executable model today; the others are checked against the application and fail closed until the executable model admits them.
  • Diagnostics PLAY0454–PLAY0460 for file imports and PLAY0461–PLAY0468 for specification actions.
  • The VS Code extension validates a workspace folder as one application: names declared in other files are not reported as unknown, and a file an import places is checked in its placement. Import paths and specification steps are highlighted, explained on hover and completed in VS Code and Monaco.
  • The event model board shows what sets off a specification that is not a command.
  • Sample applications in Samples: Library, Invoicing (every construct in the language), Commerce and TimeTracking (focused files composed with imports).
  • The @cratis/screenplay-compiler package parses file imports and specification actions, and compileApplication assembles an application from a map of documents.

Fixed

  • A query written with its key on the header line (query X => RM? by id Type) no longer crashes the compiler when a command reads that view; the diagnostic says to put by on its own line in the query body.
  • Bare enumeration members in produces when conditions and in specification values, and DateTime values written as ISO 8601 instants such as 2026-10-05T08:00:00Z, now bind in the executable semantic model the way the compiler already accepted them.