All notable changes to this project will be documented in this file.
The format is loosely based on Keep a Changelog.
THIS SOFTWARE IS STILL IN ALPHA AND THERE ARE NO GUARANTEES REGARDING API STABILITY YET.
Once we reach the v1.0 release, this project will adhere to Semantic Versioning.
- Nothing so far
v0.8.0 - 2019-04-21
- Make Auth.Grant(…) idempotent and do not unnecessarily add smaller scopes
- Support extending permissions via Auth.Grant(…)
- Add boolean return value to Auth.Grant(…) to indicate if a new permission was granted
- Add Auth.Revoke(…) to remove permissions
- Fix flaky unit test TestBrain_Memory
- Fix flaky TestCLIAdapter_Register test
- Add new
Storage
type which manages encoding/decoding, concurrent access and logging for aMemory
- Factor out
Memory
related logic from Brain into newStorage
type- Removed
Brain.SetMemory(…)
,Brain.Set(…)
,Brain.Get(…)
,Brain.Delete(…)
,Brain.Memories(…)
,Brain.Close(…)
- All functions above except
Brain.Memories(…)
are now available as functions on theBot.Store
field
- Removed
- The
Auth
type no longer uses theMemory
interface but instead requires an instance of the newStorage
type - Removed the
BrainMemoryEvent
without replacement - Add
joetest.Storage
type to streamline making assertions on a bots storage/memory - Change the
Memory
interface to treat values as[]byte
and notstring
- Remove
Memories()
function fromMemory
interface and instead add aKeys()
function NewConfig(…)
now requires an instance of aStorage
v0.7.0 - 2019-04-18
- Add ReceiveMessageEvent.Data field to allow using the underlying message type of the adapters
- Add ReceiveMessageEvent.AuthorID field to identify the author of the message
- Add Message.Data field which contains a copy of the ReceiveMessageEvent.Data value
- Add Message.AuthorID field which contains a copy of the ReceiveMessageEvent.AuthorID value
- Add Auth.Grant(…) and Auth.CheckPermission(…) functions to allow implementing user permissions
- Add Brain.Close() function to let the brain implement the Memory interface
- Add Brain.SetMemory(…) function to give more control over a joe.Brain
- Fix joetest.Bot.Start(…) function to return only when actually all initialization is done
v0.6.0 - 2019-03-30
- implement
NewConfig
function to allow create configuration for unit tests of modules
v0.5.0 - 2019-03-18
- Fixed nil pointer panic in slack adapter when context is nil
v0.4.0 - 2019-03-18
- Change type of
Module
from function to interface to allow more flexibility - Introduce new
ModuleFunc
type to migrate old modules to new interface type
v0.3.0 - 2019-03-17
- Event handler functions can now accept interfaces instead of structs
- Add new
github.com/go-joe/joe/joetest
package for unit tests - Add new
joetest.Brain
type - Add new
WithLogger(…)
option - Switch license from MIT to BSD-3-Clause
- Move
TestingT
type into newjoetest
package - Move
TestBot
type into newjoetest
package and rename tojoetest.Bot
- Fixed flaky unit test of
CLIAdapter
v0.2.0 - 2019-03-10
- Add a lot more unit tests
- Add
TestBot.Start()
andTestBot.Stop()
to ease synchronously starting and stopping bot in unit tests - Add
TestBot.EmitSync(…)
to emit events synchronously in unit tests - Remove obsolete context argument from
NewTest(…)
function - Errors from passing invalid expressions to
Bot.Respond(…)
are now returned inBot.Run()
- Events are now processed in the exact same order in which they are emitted
- All pending events are now processed before the brain event loop returns
- Replace context argument from
Brain.HandleEvents()
with newBrain.Shutdown()
function Adapter
interface was simplified again to directly use theBrain
- Remove unnecessary
t
argument fromTestBot.EmitSync(…)
function - Deleted
Brain.Close()
because it was not actually meant to be used to close the brain and is thus confusing
v0.1.0 - 2019-03-03
Initial release, note that Joe is still in alpha and the API is not yet considered stable before the v1.0.0 release.