# Change log

All notable changes to the project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [3.0.2] - 2022-08-30
### Fixed:
- Test assertion helpers now call `t.Helper()` to exclude themselves from stacktraces.

## [3.0.1] - 2022-08-29
### Fixed:
- Fixed import paths to have `/v3`.

## [3.0.0] - 2022-08-29
### Added:
- `TryReceive`, `RequireValue`, `AssertNoMoreValues`, `AssertChannelClosed`, `AssertChannelNotClosed`: new generics-based helpers related to channels.
- `WithTempFileData`, `WithTempDir`: new filesystem helpers.
- `jsonhelpers.AssertEqual`, `jsonhelpers.Value`: a simpler way to do JSON equality assertions and get the diff format that's provided by this package, without having to use the `matchers` API.
- `testbox.ShouldFail`, `testbox.ShouldFailAndExitEarly`: for making assertions about assertion logic.

### Changed:
- The minimum Go version is now 1.18.

## [2.3.2] - 2022-05-02
### Changed:
- Improved the panic message that is generated by `httphelpers.BrokenConnectionHandler` to make it clearer that this is an intentional error (if for instance the panic stacktrace is logged by `http.Server`).

## [2.3.1] - 2022-02-03
### Fixed:
- The `Assert`/`Require` methods in `matchers` now call `t.Helper()` (if that method exists) so the location of the failure will be more accurately reported.

## [2.3.0] - 2022-01-21
### Added:
- Subpackages `jsonhelpers` and `matchers`.

## [2.2.0] - 2020-07-06
### Added:
- Added `RetryMillis` field to `httphelpers.SSEEvent`.

## [2.1.0] - 2020-07-06
### Added:
- In `httphelpers.SSEStreamControl`: `EnqueueComment` and `SendComment`.

## [2.0.1] - 2020-07-02
### Fixed:
- Fixed a bug in `ChunkedStreamingHandler` that caused the response to hang before reading the headers if there was no initial data in the stream.

## [2.0.0] - 2020-07-01
### Added:
- In `httphelpers`, `ChunkedStreamingHandler`, `SSEHandler`, and `SSEEvent`
- In the main package, `ReadWithTimeout`.

### Changed:
- This project now requires modules and has a minimum Go version of 1.13.
- In `ldservices`, `ServerSideStreamingServiceHandler` now uses `httphelpers.SSEEvent` instead of having a dependency on the `eventsource` package. Its interface is now based on the new `SSEHandler` instead of using channels.
- In `httphelpers`, `PanicHandler` is replaced by `BrokenConnectionHandler`.

### Removed:
- The LaunchDarkly client-side streaming endpoint handler in `ldservices` was not used and has been removed.


## [1.2.0] - 2020-07-01
### Added:
- New package `testbox` for running a Go test in a temporary environment.

## [1.1.3] - 2020-06-04
### Added:
- Added `go.mod` so this package can be consumed as a module. This does not affect code that is currently consuming it via `go get`, `dep`, or `govendor`.

## [1.1.2] - 2020-04-01
### Fixed:
- Patch event type for client-side streams.

## [1.1.1] - 2020-04-01
### Fixed:
- In `ldservices`, fixed JSON property names for simulated client-side flag data.

## [1.1.0] - 2020-04-01
### Added:
- Method `HandlerForPathRegex` in `httphelpers`.
- New methods and types in `ldservices` to simulate LaunchDarkly client-side streaming endpoints.

## [1.0.0] - 2020-03-16
Initial release.
