Closed Wulfheart closed 2 years ago
I like this! 👌
Do you think we can get away with a minor semver update for it? Technically it is a breaking change as we're adding methods to a trait but I doubt this will have an real impact on devs. Wdyt?
I don't think that it is a major breaking change. As per semver.org:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.
Therefore I think it is only a minor version as it only adds functionality in a backward compatible manner. I am going to open a PR for it.
Thanks! I meant more like, if someone has already defined the runIf
or runUnless
methods and the signatures don't match then it will break their actions but the likelihood of that is very low so I'm happy with a minor jump. 🙂
Released in v2.4.0
! 🔥
I just stumbled across this and thought it would be a good idea to make running an action as an object analogous to running it as a job.
Therefore I propose to add
runIf(bool, ...)
andrunUnless(bool, ...)
(similar todispatch
) to the AsObject syntax so something like this isn't necessary anymore: