Releases: JasperFx/alba
Releases · JasperFx/alba
v8.0.0
Breaking Changes
- Dropped support for .NET 6/7, .NET 8+ is required.
- Updated the contract for custom assertions to have better ergonomics:
- public void Assert(Scenario scenario, HttpContext context, ScenarioAssertionException ex)
+ public void Assert(Scenario scenario, AssertionContext context)
{
- var body = ex.ReadBody(context);
+ var body = context.ReadBodyAsString();
if (!body.Contains(Text))
{
- ex.Add($"Expected text '{Text}' was not found in the response body");
+ context.AddFailure($"Expected text '{Text}' was not found in the response body");
}
}
- Removed
AlbaHost.ForStartup<T>
, useAlbaHost.For<T>
instead.
New Features
- Added support for stubbing individual authentication schemes with
JwtSecurityStub
&AuthenticationStub
. - Added
StatusCodeShouldBeSuccess
to built in assertions.
Internal Changes
- Updated the JWT Token stub to generate tokens using ASP.NET Core 8's JsonWebToken. Make sure your project doesn't reference
System.IdentityModel.Tokens.Jwt
as it'll cause things to break. - Removed a number of long-obsolete types.
- Sealed a handful of different types.
- Updated Vitepress to latest (docs)
- Replaced build infrastructure with Nuke.Build
All Changes
- Update Vitepress & deal with CSS breaks by @Hawxy in #147
- Move docs publish to GHA-based workflow by @Hawxy in #148
- .NET 8 Updates by @Hawxy in #151
- Swap build system to nuke by @Hawxy in #152
- remove redundant containskey by @SimonCropp in #156
- fix CVEs by @SimonCropp in #155
- remove redundant stubTypeSpecificClaims state machine by @SimonCropp in #158
- discard some un-used parameters by @SimonCropp in #157
- Update auth implementation to match .NET 8 by @Hawxy in #165
- Move to file-scoped namespaces by @Hawxy in #166
- Add support for stubbing a specific authentication scheme by @Hawxy in #168
- Add AssertionContext by @Hawxy in #167
- Created an Assertion for StatusCodeShouldBeSuccess by @JeffryGonzalez in #161
- Release cleanup by @Hawxy in #169
New Contributors
- @SimonCropp made their first contribution in #156
- @JeffryGonzalez made their first contribution in #161
Full Changelog: v7.4.1...v8.0.0
v7.4.1
v7.4.0
New Features
Route Auto-Complete in supported IDEs
Visual Studio & Rider developers will see API routes when typing URL parameters.
OpenTelemetry Support
Alba has OpenTelemetry support for Scenario
calls and thus can be integrated with OTEL-compatible tooling.
Misc
Full Changelog: v7.3.0...v7.4.0
v7.3.0
Feature Updates
- Add ByteArray to the IUrlExpression and Scenario by @dgrozenok in #131
- Expose ReadBody on ScenarioAssertionException by @Hawxy in #133
New Contributors
- @dgrozenok made their first contribution in #131
Full Changelog: v7.2.1...v7.3.0
v7.2.1
v7.2.0
Feature Updates
- Remove baseline dependency to improve compatibility with other JasperFx projects. (by @Hawxy in #127)
- Refactored form data writing to use
FormUrlEncodedContent
internally. This removes the requirement to manually encode field data.
Full Changelog: v7.1.0...v7.2.0
v7.1.0
Feature Updates
- Added support for multipart form posts in #126. See the relevant docs. (by @Hawxy)
- Marked
ForStartup<T>
extension as obsolete. This will be removed in a future release, please move to a different scaffolding method. (by @jeremydmiller)
Docs
- Refreshed the docs with updated design & content: https://jasperfx.github.io/alba/
Full Changelog: v7.0.1...v7.1.0
v7.0.0
Breaking changes
- Dropped support for .NET 5, supported targets are now .NET 6 & .NET 7 (by @jeremydmiller)
- Added support for Minimal APIs. For pure minimal API projects this should automatically work but mixed projects may require additional configuration. See https://jasperfx.github.io/alba/scenarios/json.html#sending-json for more information. (by @jeremydmiller)
Features
- Add async overloads for
IScenarioResult
methods (#120). These overloads are preferred over the sync alternatives going forward. (by @Hawxy) - Permit the use of ValidAudiences during token creation in JWT extensions. All values on the
TokenValidationParameters
are now cloned to prevent future problems. (#119) (by @Hawxy)
Bug fixes
- (v7.0.1) Fix
IOptions
resolution within Json serialization
Full Changelog: v6.1.0...v7.0.0
v6.1.0
What's Changed
- Preserve name claim type settings by @Hawxy in #99
- Add docs for using xUnit with .NET 6 templates by @Hawxy in #100
- Handle non-HMAC signing keys by @yuriylsh in #101
- v6.1.0 by @Hawxy in #103
- Bump nanoid from 3.1.30 to 3.2.0 by @dependabot in #102
- Move to package license expression by @Hawxy in #104
New Contributors
Full Changelog: v6.0.0...v6.1.0