Upgrading http-errors from 1.x to 2.x
Comparison of the public API of http-errors 1.8.1 and 2.0.1, computed automatically from their TypeScript types. A changed signature is a candidate for a breaking change, not a certainty.
Summary
| Removed import paths | 0 |
|---|---|
| Removed exports | 0 |
| Changed signatures | 4 |
| Removed class or interface members | 0 |
| Changed class or interface members | 0 |
| Newly deprecated | 0 |
| Requirement changes (engines, peer dependencies) | 1 |
| New exports | 0 |
Removed exports
None detected.
Changed signatures
| export | Before | After |
|---|---|---|
http-errors · UnknownError | string | number | Error | { [key: string]: any; } | string | Error | { [key: string]: any; } |
http-errors · CreateHttpError | <N extends UnknownError>(arg: N, ...rest: UnknownError[]) => HttpError<N extends number ? N : number> | interface |
http-errors · NamedConstructors | { [code: string]: HttpErrorConstructor<number>; HttpError: HttpErrorConstructor<number>; } & Record<"BadRequest" | "400", HttpErrorConstructor<400>> & Record<"Unauthorized" | "401", HttpErrorConstructor<401>> & Record<"PaymentRequired" | "402", HttpErrorConstructor<402>> & Record<"Forbidden" | "403", HttpErrorConstructor<403>> & Record<"NotFound" | "404", HttpErrorConstructor<404>> & Record<"MethodNotAllowed" | "405", HttpErrorConstructor<405>> & Record<"NotAcceptable" | "406", HttpErrorConstructor<406>> & Record<"ProxyAuthenticationRequired" | "407", HttpErrorConstructor<407>> & Record<"Reque… | { HttpError: HttpErrorConstructor<number>; } & Record<"BadRequest" | "400", HttpErrorConstructor<400>> & Record<"Unauthorized" | "401", HttpErrorConstructor<401>> & Record<"PaymentRequired" | "402", HttpErrorConstructor<402>> & Record<"Forbidden" | "403", HttpErrorConstructor<403>> & Record<"NotFound" | "404", HttpErrorConstructor<404>> & Record<"MethodNotAllowed" | "405", HttpErrorConstructor<405>> & Record<"NotAcceptable" | "406", HttpErrorConstructor<406>> & Record<"ProxyAuthenticationRequired" | "407", HttpErrorConstructor<407>> & Record<"RequestTimeout" | "408", HttpErrorConstructor<408>>… |
http-errors · HttpErrorConstructor | new (msg?: string | undefined) => HttpError<N> | interface |
Removed class or interface members
None detected.
Changed class or interface members
None detected.
Newly deprecated
None detected.
Requirement changes (engines, peer dependencies)
| Before | After | |
|---|---|---|
engines.node | >= 0.6 | >= 0.8 |
Frequently asked questions
What are the breaking changes when upgrading http-errors from 1 to 2?
Between http-errors 1.8.1 and 2.0.1, Vigia found 0 removed exports, 4 changed signatures and 0 removed or changed class or interface members.
What became deprecated in http-errors 2?
0 exports or members are newly marked as deprecated in http-errors 2.0.1.
For agents
GET https://vigia.coredls.cloud/v1/packages/npm/http-errors/upgrade?from=1.8.1&to=2.0.1