@augment-vir/node 31.23.2 → 31.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,10 +115,6 @@ export function streamShellCommand(command, cwd, shell = 'bash', env = process.e
115
115
  });
116
116
  return shellTarget;
117
117
  }
118
- function prepareChunkForLogging(chunk, trimEndingLine) {
119
- const stringified = chunk.toString();
120
- return trimEndingLine ? stringified.replace(/\n$/, '') : stringified;
121
- }
122
118
  /**
123
119
  * Runs a shell command and returns its output.
124
120
  *
@@ -136,19 +132,19 @@ export async function runShellCommand(command, options = {}) {
136
132
  const shellTarget = streamShellCommand(command, options.cwd, options.shell, options.env, options.hookUpToConsole);
137
133
  shellTarget.listen(ShellStdoutEvent, ({ detail: chunk }) => {
138
134
  if (options.stdoutCallback) {
139
- void options.stdoutCallback(prepareChunkForLogging(chunk, false), shellTarget.childProcess);
135
+ void options.stdoutCallback(chunk.toString(), shellTarget.childProcess);
140
136
  }
141
137
  if (options.hookUpToConsole) {
142
- process.stdout.write(prepareChunkForLogging(chunk, true) + '\n');
138
+ process.stdout.write(chunk.toString());
143
139
  }
144
140
  stdout += String(chunk);
145
141
  });
146
142
  shellTarget.listen(ShellStderrEvent, ({ detail: chunk }) => {
147
143
  if (options.stderrCallback) {
148
- void options.stderrCallback(prepareChunkForLogging(chunk, false), shellTarget.childProcess);
144
+ void options.stderrCallback(chunk.toString(), shellTarget.childProcess);
149
145
  }
150
146
  if (options.hookUpToConsole) {
151
- process.stderr.write(prepareChunkForLogging(chunk, true) + '\n');
147
+ process.stderr.write(chunk.toString());
152
148
  }
153
149
  stderr += String(chunk);
154
150
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/node",
3
- "version": "31.23.2",
3
+ "version": "31.23.3",
4
4
  "description": "A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.",
5
5
  "keywords": [
6
6
  "augment",
@@ -33,13 +33,13 @@
33
33
  "types": "dist/index.d.ts",
34
34
  "scripts": {
35
35
  "compile": "virmator compile",
36
- "test": "npm i @prisma/client && virmator --no-deps test node --test-concurrency 1",
37
- "test:coverage": "npm i @prisma/client && virmator test node coverage --test-concurrency 1",
36
+ "test": "virmator --no-deps test node --test-concurrency 1",
37
+ "test:coverage": "virmator test node coverage --test-concurrency 1",
38
38
  "test:update": "npm test"
39
39
  },
40
40
  "dependencies": {
41
- "@augment-vir/assert": "^31.23.2",
42
- "@augment-vir/common": "^31.23.2",
41
+ "@augment-vir/assert": "^31.23.3",
42
+ "@augment-vir/common": "^31.23.3",
43
43
  "@date-vir/duration": "^7.3.1",
44
44
  "ansi-styles": "^6.2.1",
45
45
  "terminate": "^2.8.0",
@@ -48,8 +48,8 @@
48
48
  "typed-event-target": "^4.1.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@augment-vir/test": "^31.23.2",
52
- "@prisma/client": "^6.8.2",
51
+ "@augment-vir/test": "^31.23.3",
52
+ "@prisma/client": "^6.9.0",
53
53
  "@types/node": "^22.15.29",
54
54
  "@web/dev-server-esbuild": "^1.0.4",
55
55
  "@web/test-runner": "^0.20.2",
@@ -59,7 +59,7 @@
59
59
  "c8": "^10.1.3",
60
60
  "concurrently": "^9.1.2",
61
61
  "istanbul-smart-text-reporter": "^1.1.5",
62
- "prisma": "^6.8.2",
62
+ "prisma": "^6.9.0",
63
63
  "typescript": "^5.8.3"
64
64
  },
65
65
  "peerDependencies": {
@@ -173,12 +173,6 @@ export type RunShellCommandOptions = {
173
173
  stderrCallback?: (stderr: string, childProcess: ChildProcess) => MaybePromise<void> | undefined;
174
174
  };
175
175
 
176
- function prepareChunkForLogging(chunk: string | Buffer, trimEndingLine: boolean): string {
177
- const stringified = chunk.toString();
178
-
179
- return trimEndingLine ? stringified.replace(/\n$/, '') : stringified;
180
- }
181
-
182
176
  /**
183
177
  * Runs a shell command and returns its output.
184
178
  *
@@ -207,25 +201,19 @@ export async function runShellCommand(
207
201
 
208
202
  shellTarget.listen(ShellStdoutEvent, ({detail: chunk}) => {
209
203
  if (options.stdoutCallback) {
210
- void options.stdoutCallback(
211
- prepareChunkForLogging(chunk, false),
212
- shellTarget.childProcess,
213
- );
204
+ void options.stdoutCallback(chunk.toString(), shellTarget.childProcess);
214
205
  }
215
206
  if (options.hookUpToConsole) {
216
- process.stdout.write(prepareChunkForLogging(chunk, true) + '\n');
207
+ process.stdout.write(chunk.toString());
217
208
  }
218
209
  stdout += String(chunk);
219
210
  });
220
211
  shellTarget.listen(ShellStderrEvent, ({detail: chunk}) => {
221
212
  if (options.stderrCallback) {
222
- void options.stderrCallback(
223
- prepareChunkForLogging(chunk, false),
224
- shellTarget.childProcess,
225
- );
213
+ void options.stderrCallback(chunk.toString(), shellTarget.childProcess);
226
214
  }
227
215
  if (options.hookUpToConsole) {
228
- process.stderr.write(prepareChunkForLogging(chunk, true) + '\n');
216
+ process.stderr.write(chunk.toString());
229
217
  }
230
218
  stderr += String(chunk);
231
219
  });