Skip to content

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 14 Feb 03:42
· 161 commits to main since this release
cd35bd5

Lifecycle hooks for script orchestration

Summary

Quarry 0.9.0 introduces two new lifecycle hooks — prepare and beforeTerminal — that let scripts intercept the run lifecycle without external wrappers. Scripts can now filter or transform jobs before browser launch, and emit summary data after execution but before the terminal event closes the emit channel.

Highlights

  • prepare hook: transform or skip jobs before browser acquisition — return { action: 'skip' } to short-circuit a run without launching a browser, or { action: 'continue', job } to replace the payload
  • beforeTerminal hook: outcome-aware hook that fires after script execution with emit still open — useful for emitting summary items, final metadata, or conditional cleanup based on success/failure
  • Malformed return validation: null, undefined, or structurally invalid prepare returns produce a diagnostic crash instead of an unhandled TypeError
  • Contract coverage: CONTRACT_RUN.md now documents the full lifecycle hook execution model; CONTRACT_EMIT.md documents reserved skipped/reason summary fields
  • Examples: runnable hooks-prepare and hooks-before-terminal examples included
  • Testing: 31 new tests (24 executor + 7 loader) covering both hooks, edge cases, and ordering guarantees

References

Full Changelog: v0.8.0...v0.9.0