bunosh 0.4.10 → 0.4.11

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.
Files changed (3) hide show
  1. package/bunosh.js +4 -21
  2. package/package.json +1 -1
  3. package/src/io.js +1 -1
package/bunosh.js CHANGED
@@ -326,8 +326,11 @@ process.on('exit', (code) => {
326
326
  const tasksWarning = tasksExecuted.filter(ti => ti.result?.status === TaskStatus.WARNING).length;
327
327
 
328
328
  const commandArgs = process.argv.slice(2);
329
+
330
+ // Test environment detection
329
331
  const isTestEnvironment = process.env.NODE_ENV === 'test' ||
330
- (typeof Bun !== 'undefined' && typeof Bun?.jest !== 'undefined') ||
332
+ (typeof jest !== 'undefined' && jest.isRunning) ||
333
+ (process.env.VITEST_WORKER_ID !== undefined) ||
331
334
  commandArgs.some(arg => {
332
335
  const lowerArg = arg.toLowerCase();
333
336
  return lowerArg.includes('vitest') ||
@@ -338,26 +341,6 @@ process.on('exit', (code) => {
338
341
 
339
342
  const ignoreFailuresMode = globalThis._bunoshIgnoreFailuresMode || false;
340
343
 
341
- if (process.env.BUNOSH_DEBUG) {
342
- console.log('\n[DEBUG] Exit handler:');
343
- console.log(' tasksFailed:', tasksFailed);
344
- console.log(' isTestEnvironment:', isTestEnvironment);
345
- console.log(' ignoreFailuresMode:', ignoreFailuresMode);
346
- console.log(' NODE_ENV:', process.env.NODE_ENV);
347
- console.log(' commandArgs:', commandArgs);
348
- console.log(' full process.argv:', process.argv);
349
- if (isTestEnvironment) {
350
- const matchingArg = commandArgs.find(arg => {
351
- const lowerArg = arg.toLowerCase();
352
- return lowerArg.includes('vitest') ||
353
- lowerArg.includes('jest') ||
354
- lowerArg === '--test' ||
355
- lowerArg.startsWith('test:');
356
- });
357
- console.log(' Matched command arg:', matchingArg);
358
- }
359
- }
360
-
361
344
  if (tasksFailed > 0 && !isTestEnvironment && !ignoreFailuresMode) {
362
345
  process.exitCode = 1;
363
346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunosh",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "type": "module",
5
5
  "module": "index.js",
6
6
  "bin": {
package/src/io.js CHANGED
@@ -3,7 +3,7 @@ import chalk from 'chalk';
3
3
  import cprint from './font.js';
4
4
 
5
5
  export function say(...args) {
6
- console.log('!', ...args);
6
+ console.log('', ...args);
7
7
  }
8
8
 
9
9
  export async function ask(question, defaultValueOrOptions = {}, options = {}) {