Skip to content

Commit 5ab646e

Browse files
committed
v2.24.2: Fix stdout corruption when --json is used
1 parent a7671cd commit 5ab646e

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@clickup/pg-microsharding",
33
"description": "Microshards support for PostgreSQL",
4-
"version": "2.24.1",
4+
"version": "2.24.2",
55
"license": "MIT",
66
"keywords": [
77
"postgresql",

src/internal/logging.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ export const stderr = new StdWritable(process.stderr);
8282
* The caller may pipe it to a file if needed.*/
8383
export const stdlog = new FileLogWritable();
8484

85-
// A log-update engine.
86-
const progressObj = logUpdate.create(stdout, { showCursor: true });
85+
// A log-update engine. We use stderr, to not pollute the output when --json
86+
// flag is used for instance.
87+
const progressObj = logUpdate.create(stderr, { showCursor: true });
8788

8889
// Last unique lines written with progress().
8990
const progressLoggedLines: Set<string> = new Set();

0 commit comments

Comments
 (0)