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
109
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.114 to 0.0.115

4

dist/dlog.js
import { bin_toHexString, isHexString, shortenHexString } from './binary';
import debug from 'debug';
import { isJest } from './utils';
import { isTestEnv } from './utils';
// Works as debug.enabled, but falls back on options if not explicitly set in env instead of returning false.

@@ -21,3 +21,3 @@ debug.enabled = (ns) => {

if (opts !== undefined) {
if (!opts.allowJest && isJest()) {
if (!opts.allowJest && isTestEnv()) {
return false;

@@ -24,0 +24,0 @@ }

@@ -5,4 +5,4 @@ /**

import { bin_fromBase64, bin_fromHexString, isHexString } from '../binary';
describe('types', () => {
test('bin_fromHexString', () => {
describe.concurrent('types', () => {
it('bin_fromHexString', () => {
const expected = new Uint8Array([1, 35, 69, 103, 137, 171, 205, 239]);

@@ -24,3 +24,3 @@ expect(bin_fromHexString('0123456789abcdef')).toEqual(expected);

});
test('bin_fromBase64String', () => {
it('bin_fromBase64String', () => {
const expected = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9]);

@@ -33,3 +33,3 @@ const expected2 = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9]);

});
test('isHexString', () => {
it('isHexString', () => {
expect(isHexString('0123456789abcdef')).toBeTruthy();

@@ -36,0 +36,0 @@ expect(isHexString('0123456789ABCDEF')).toBeTruthy();

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

import { bin_fromHexString } from '../binary';
describe('dlogTest', () => {
test('basic', () => {
describe.concurrent('dlogTest', () => {
it('basic', () => {
const longHex = bin_fromHexString('0102030405060708090a0b0c0d0e0f101112131415161718191a');

@@ -53,3 +53,3 @@ const obj = {

});
test('extend', () => {
it('extend', () => {
const base_log = dlog('test:dlog');

@@ -62,3 +62,3 @@ const log = base_log.extend('extend');

});
test('enabled1', () => {
it('enabled1', () => {
const log = dlog('test:dlog');

@@ -73,3 +73,3 @@ if (log.enabled) {

});
test('circularReference', () => {
it('circularReference', () => {
const log = dlog('test:dlog');

@@ -91,7 +91,7 @@ class A {

});
test('numbers', () => {
it('numbers', () => {
const log = dlog('test:dlog');
log('test same number:', { a: 1, b: 1, c: 1, d: 2 });
});
test('error', () => {
it('error', () => {
const log = dlogError('test:dlog:error');

@@ -116,3 +116,3 @@ log('test same number:', { a: 1, b: 1, c: 1, d: 2 });

});
test('set', () => {
it('set', () => {
const s = new Set([111, 222, { aaa: 333 }]);

@@ -134,3 +134,3 @@ dlog('test:dlog')(s);

});
test('map', () => {
it('map', () => {
const s = new Map([

@@ -158,3 +158,3 @@ ['aaa', 111],

});
test('enabled2', () => {
it('enabled2', () => {
const ns = 'uniqueLogName';

@@ -161,0 +161,0 @@ // Override

export declare function isNodeEnv(): boolean;
export declare function isJest(): boolean;
export declare function isTestEnv(): boolean;
//# sourceMappingURL=utils.d.ts.map

@@ -5,5 +5,5 @@ import { isNode } from 'browser-or-node';

}
export function isJest() {
export function isTestEnv() {
return isNode && (process.env.NODE_ENV === 'test' || process.env.JEST_WORKER_ID !== undefined);
}
//# sourceMappingURL=utils.js.map
{
"name": "@river-build/dlog",
"version": "0.0.114",
"version": "0.0.115",
"packageManager": "yarn@3.8.0",

@@ -14,6 +14,6 @@ "type": "module",

"lint:fix": "yarn lint --fix",
"my-jest": "NODE_EXTRA_CA_CERTS=${HOME}/river-ca-cert.pem yarn node -r ../../scripts/node-no-warn.js --experimental-vm-modules $(yarn bin jest)",
"test": "yarn my-jest",
"test": "vitest run",
"test:watch": "vitest --watch",
"test:ci": "yarn test",
"test:debug": "DEBUG=test yarn my-jest",
"test:debug": "DEBUG=test yarn test",
"watch": "tsc --watch"

@@ -23,3 +23,3 @@ },

"@bufbuild/protobuf": "^1.9.0",
"@river-build/proto": "^0.0.114",
"@river-build/proto": "^0.0.115",
"browser-or-node": "^3.0.0",

@@ -31,3 +31,2 @@ "debug": "^4.3.4",

"@types/debug": "^4.1.8",
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^6.10.0",

@@ -38,8 +37,5 @@ "@typescript-eslint/parser": "^7.14.1",

"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.3",
"jest": "^29.6.2",
"jest-extended": "^4.0.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"vitest": "^2.1.5"
},

@@ -49,3 +45,3 @@ "files": [

],
"gitHead": "5f1068c1e64125231ba237baed300747321545df"
"gitHead": "73769df4df6060fb6c41334004744caa13b89deb"
}

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

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