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

@equinor/echo-base

Package Overview
Dependencies
Maintainers
10
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/echo-base - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

13

package.json
{
"name": "@equinor/echo-base",
"version": "0.6.1",
"version": "0.6.2",
"module": "esm/index.js",

@@ -16,3 +16,4 @@ "main": "lib/index.js",

"test": "echo \"Run test from root folder\" && exit 1",
"build-docs": "npx typedoc --out docs src/index.ts"
"build-docs": "npx typedoc --out docs src/index.ts",
"echo-update-all": "echo-update -a"
},

@@ -34,5 +35,5 @@ "keywords": [

"devDependencies": {
"@types/node": "^14.14.37",
"typedoc": "^0.20.35",
"typescript": "^4.4.4"
"@types/node": "^17.0.12",
"typedoc": "^0.22.11",
"typescript": "^4.5.5"
},

@@ -47,2 +48,2 @@ "files": [

}
}
}

@@ -26,2 +26,14 @@ ![logo](https://raw.githubusercontent.com/equinor/EchoCore/main/doc/ee.png)

It's recommended to create your own error types, extending BaseError, and decorate it with your own fields:
```TS
export class PdfError extends BaseError {
docNo: string;
constructor(args: { message: string; docNo: string; innerError?: Error }) {
super({ name: 'PdfError', message: args.message, innerError: args.innerError });
this.docNo = args.docNo;
}
}
```
# Breaking Changes

@@ -35,4 +47,6 @@

`exception` argument renamed to `innerError`, of type `Record<string, unknown> | Error`
- Moved `EchoEvents` enum to `EchoCore`.
- Changed types for `EventHub` event keys in all functions from `string | EchoEvents` to `string` only.
- `BaseError` doesn't add properties directly onto itself anymore, but uses nested errors with argument `innerError`.
- Instead of `BaseError.allProperties()["someCustomProperty"]` use `BaseError.findPropertyByName("someCustomProperty")`. Since we now use `innerError` of type `Error` or Record<string, unknown>, the property has been moved from baseError[property] to baseError.innerError[property].
- Moved `EchoEvents` enum to `EchoCore`.
- Changed types for `EventHub` event keys in all functions from `string | EchoEvents` to `string` only.

@@ -39,0 +53,0 @@ v0.5.0:

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