Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

defekt

Package Overview
Dependencies
Maintainers
5
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

defekt - npm Package Compare versions

Comparing version 8.2.0 to 9.0.0

3

build/lib/CustomError.d.ts
declare class CustomError<TErrorName extends string = string> extends Error {
code: TErrorName;
cause?: unknown;
data?: any;

@@ -8,3 +7,3 @@ constructor({ code, message, cause, data }: {

message: string;
cause?: unknown;
cause?: Error;
data?: any;

@@ -11,0 +10,0 @@ });

import { CustomError } from './CustomError';
interface CustomErrorConstructor<TErrorName extends string> {
new (parameters?: string | {
cause?: unknown;
cause?: Error;
data?: any;

@@ -6,0 +6,0 @@ message?: string;

@@ -0,1 +1,13 @@

# [9.0.0](https://github.com/thenativeweb/defekt/compare/8.2.0...9.0.0) (2022-03-23)
### Bug Fixes
* Adjust CustomError.cause type to changes in TypeScript. ([#358](https://github.com/thenativeweb/defekt/issues/358)) ([a288ae1](https://github.com/thenativeweb/defekt/commit/a288ae1f5748c066717c7632dc5e00946868d860))
### BREAKING CHANGES
* This restricts the type of `cause` to `Error | undefined`.
# [8.2.0](https://github.com/thenativeweb/defekt/compare/8.1.0...8.2.0) (2022-02-22)

@@ -2,0 +14,0 @@

class CustomError<TErrorName extends string = string> extends Error {
public code: TErrorName;
public cause?: unknown;
public data?: any;

@@ -11,3 +9,3 @@

message: string;
cause?: unknown;
cause?: Error;
data?: any;

@@ -14,0 +12,0 @@ }) {

@@ -5,3 +5,3 @@ import { CustomError } from './CustomError';

new(
parameters?: string | { cause?: unknown; data?: any; message?: string }
parameters?: string | { cause?: Error; data?: any; message?: string }
): CustomError<TErrorName>;

@@ -8,0 +8,0 @@

@@ -17,3 +17,3 @@ import { CustomError } from './CustomError';

messageOrMetadata: string | {
cause?: unknown;
cause?: Error;
data?: any;

@@ -20,0 +20,0 @@ message?: string;

{
"name": "defekt",
"version": "8.2.0",
"version": "9.0.0",
"description": "defekt is custom errors made simple.",

@@ -37,3 +37,3 @@ "contributors": [

"assertthat": "6.4.0",
"roboter": "12.7.0",
"roboter": "13.0.0",
"semantic-release-configuration": "2.0.7"

@@ -40,0 +40,0 @@ },

@@ -10,2 +10,3 @@ {

"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,

@@ -12,0 +13,0 @@ "target": "es2019"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc