You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@studio/log

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@studio/log - npm Package Compare versions

Comparing version
1.7.1
to
1.7.2
+11
-0
CHANGES.md
# Changes
## 1.7.2
- 🐛 Fix --map if chunks have multiple lines
> When passing `--map sourcemaps.map` to `emojilog`, the created transform
> stream expected each chunk to contain a single line. With this change,
> the sourcemaps lookup also works for multiline chunks.
- ✨ Use Sinon 5 default sandbox
- 📚 Fix typo in message docs
## 1.7.1

@@ -4,0 +15,0 @@

+22
-13

@@ -17,17 +17,26 @@ /*

const transform = new Transform({
transform: (chunk, enc, callback) => {
let row = chunk.toString();
const match = row.match(/at (.+) \(.+:([0-9]+):([0-9]+)\)/i);
if (match) {
const pos = mapper.originalPositionFor({
line: Number(match[2]),
column: Number(match[3])
});
if (pos.line) {
const prefix = row.substring(0, match.index);
const name = pos.name || match[1];
row = `${prefix}at ${name} (${pos.source}:${pos.line}:${pos.column})`;
transform(chunk, enc, callback) {
let str = chunk.toString();
let p = str.indexOf('\n');
while (p !== -1) {
let row = str.substring(0, p);
const match = row.match(/at (.+) \(.+:([0-9]+):([0-9]+)\)/i);
if (match) {
const pos = mapper.originalPositionFor({
line: Number(match[2]),
column: Number(match[3])
});
if (pos.line) {
const prefix = row.substring(0, match.index);
const name = pos.name || match[1];
const source = pos.source;
row = `${prefix}at ${name} (${source}:${pos.line}:${pos.column})`;
}
}
this.push(row);
this.push('\n');
str = str.substring(p + 1);
p = str.indexOf('\n');
}
callback(null, row);
callback(null, str);
}

@@ -34,0 +43,0 @@ });

{
"name": "@studio/log",
"version": "1.7.1",
"version": "1.7.2",
"description": "A tiny JSON logger with emoji support",

@@ -40,3 +40,3 @@ "bin": {

"mocha": "^4.0.0",
"sinon": "^4.0.1",
"sinon": "^5.0.0-next.4",
"uglify-es": "^3.3.8"

@@ -43,0 +43,0 @@ },

@@ -129,3 +129,3 @@ # Studio Log

- The `topic` is added as the `"topic"`.
- If `message` is present, it's added as the `"msd"`.
- If `message` is present, it's added as the `"msg"`.
- If `data` is present, it's added as the `"data"`.

@@ -132,0 +132,0 @@ - If `error` is present, the `stack` property of the error is added as the