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

@equinor/echo-base

Package Overview
Dependencies
Maintainers
12
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.10 to 0.6.11

2

esm/errors/BaseError.js

@@ -135,3 +135,3 @@ import { __extends } from "tslib";

}
else if (typeof value === 'object') {
else if (!!value && typeof value === 'object') {
rec[name] = getAllProperties(value, args);

@@ -138,0 +138,0 @@ }

@@ -139,3 +139,3 @@ "use strict";

}
else if (typeof value === 'object') {
else if (!!value && typeof value === 'object') {
rec[name] = getAllProperties(value, args);

@@ -142,0 +142,0 @@ }

{
"name": "@equinor/echo-base",
"version": "0.6.10",
"version": "0.6.11",
"module": "esm/index.js",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -45,7 +45,12 @@ import { BaseError, findPropertyByName, getAllProperties } from './BaseError';

});
it(`should generate frontEnd stackTraceId if innerError/backEnd stackTraceId is null`, () => {
const innerError = { errors: { errorTraceId: null } };
const actualError = new BaseError({ name: 'BaseError', message, innerError });
expect(actualError.errorTraceId).toBe('frontEnd_mocked-static-id-9999');
});
});
describe('getAllProperties', () => {
const input = { a: 'a', b: 1, c: { nestedProp: 'prop1' } };
it('should return an empty object if undefined argument', () => {

@@ -57,2 +62,3 @@ const actualError = getAllProperties(undefined);

it('should preserve properties of different types', () => {
const input = { a: 'a', b: 1, c: { nestedProp: 'prop1' } };
const actualError = getAllProperties(input);

@@ -62,2 +68,8 @@ expect(actualError).toStrictEqual(input);

it('should preserve null & undefined value', () => {
const input = { c: { nestedProp: null, nestedProp2: undefined } };
const actualError = getAllProperties(input);
expect(actualError).toStrictEqual(input);
});
it('should preserve properties of an Error', () => {

@@ -64,0 +76,0 @@ const actualError = getAllProperties(new CustomTestError('message'));

@@ -154,3 +154,3 @@ import { BaseErrorArgs } from '../types/error';

//ignore
} else if (typeof value === 'object') {
} else if (!!value && typeof value === 'object') {
rec[name] = getAllProperties(value, args);

@@ -157,0 +157,0 @@ } else {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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