- Remove dependency on @curveball/kernel
- Finally! Curveball v1. Only took 6 years.
- CommonJS support has been dropped. The previous version of this library supported both CommonJS and ESM. The effort of this no longer feels worth it. ESM is the future, so we're dropping CommonJS.
- Now requires Node 18.
- Upgraded to Typescript 5.3.
- To match RFC9110,
UnprocessableEntity
is nowUnprocessableContent
, andPayloadToolarge
is nowContentTooLarge
. The old classes still exist and have been marked as deprecated. - Updated references from RFC7807 to RFC9457.
- This package now supports ESM and CommonJS modules.
- No longer supports Node 14.
isHttpError
andisHttpProblem
can now take any (unknown) type as arguments, making it easier to use these functions without casting.Forbiddden
->Forbidden
.- Update everything to latest curveball defaults.
- Update all dependencies.
- Update everything to latest curveball standards.
- Publish on github packages
- Mass-renamed httpCode to the more common httpStatus.
- Added all missing status codes.
- Fully unittested.
- Added
isHttpProblem()
helper function. - Added 408, 409, 410, 411, 412, 413.
- The
allow
parameter fromMethodNotAllowed
is now optional. - Added 406, 407, 422.
- Added
Unauthorized
,PaymentRequired
,Forbidden
. - Added support for
WWW-Authenticate
header for 401 responses andAllow
for 405 responses.
- Dropped
ClientError
andServerError
interfaces, they aren't useful in TS. - Added
HttpError
andHttpProblem
interfaces. - Added
isHttpError
type guard. - Added
isClientError
andisServerError
helpers.
- First version with just a few errors to test the ergonomics of this package.