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

@river-build/dlog

Package Overview
Dependencies
Maintainers
0
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@river-build/dlog - npm Package Compare versions

Comparing version 0.0.27 to 0.0.28

2

dist/check.js

@@ -15,3 +15,3 @@ import { Err } from '@river-build/proto';

const e = new CodeException(message ?? 'Unknown', code ?? Err.ERR_UNSPECIFIED, data);
log('throwWithCode', e.message, e.stack);
log('throwWithCode', e);
throw e;

@@ -18,0 +18,0 @@ }

@@ -98,2 +98,3 @@ import { bin_toHexString, isHexString, shortenHexString } from './binary';

const allDlogs = new Map();
const isDev = typeof process !== 'undefined' && process.env.NODE_ENV === 'development';
const makeDlog = (d, opts) => {

@@ -122,7 +123,7 @@ if (opts?.printStack) {

if (c instanceof Error) {
tailArgs.push('\n');
isDev ? fmt.push('%O\n') : fmt.push('%o\n');
tailArgs.push(c);
}
else {
fmt.push('%O\n');
isDev ? fmt.push('%O\n') : fmt.push('%o\n');
newArgs.push(cloneAndFormat(c, { shortenHex: true }));

@@ -132,3 +133,3 @@ }

else {
fmt.push('%O ');
isDev ? fmt.push('%O ') : fmt.push('%o ');
newArgs.push(c);

@@ -135,0 +136,0 @@ }

@@ -7,2 +7,4 @@ /**

import { bin_fromHexString } from '../binary';
import { CodeException } from '../check';
import { Err } from '@river-build/proto';
describe('dlogTest', () => {

@@ -182,3 +184,16 @@ test('basic', () => {

});
test('handle error', () => {
const e = new CodeException('test', Err.ERR_UNSPECIFIED);
const log = dlogError('test:dlog');
log.enabled = true;
let output = '';
log.baseDebug.log = (...args) => {
for (const arg of args) {
output += `${arg}`;
}
};
log('throwWithCode', e);
expect(output).toContain('CodeException [Error]: test at Object.<anonymous>');
});
});
//# sourceMappingURL=dlog.test.js.map
{
"name": "@river-build/dlog",
"version": "0.0.27",
"version": "0.0.28",
"packageManager": "yarn@3.8.0",

@@ -22,3 +22,3 @@ "type": "module",

"@bufbuild/protobuf": "^1.9.0",
"@river-build/proto": "^0.0.27",
"@river-build/proto": "^0.0.28",
"browser-or-node": "^2.1.1",

@@ -46,3 +46,3 @@ "debug": "^4.3.4",

],
"gitHead": "a5f49a28e7b6947b6e65e500e0e860474014f1c7"
"gitHead": "8198ded419044570801554db8b16bf5325eae424"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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