itty-packager 1.6.1 → 1.6.2

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.
@@ -126,7 +126,7 @@ async function getCommitMessage(newVersion, silent = false) {
126
126
  if (key === '\r' || key === '\n') {
127
127
  if (!placeholderCleared && inputBuffer === '') {
128
128
  // Empty input, skip
129
- process.stdout.write('\r\x1b[KšŸ’¬ Commit message: \x1b[?25h\n')
129
+ process.stdout.write('\r\x1b[KšŸ’¬ Commit message: \x1b[90mskipped\x1b[0m\x1b[?25h\n')
130
130
  cleanup()
131
131
  resolve(`released v${newVersion}`)
132
132
  return
@@ -139,6 +139,7 @@ async function getCommitMessage(newVersion, silent = false) {
139
139
  cleanup()
140
140
 
141
141
  if (!customMessage) {
142
+ process.stdout.write('\ršŸ’¬ Commit message: \x1b[90mskipped\x1b[0m\n')
142
143
  resolve(`released v${newVersion}`)
143
144
  } else {
144
145
  const escapedMessage = customMessage.replace(/"/g, '\\"')
@@ -428,6 +429,7 @@ This creates a clean, flat package structure in node_modules.
428
429
  await fs.ensureDir(tempDir)
429
430
 
430
431
  // Copy source files to temp directory
432
+ console.log(`šŸ“‹ Copying files...`)
431
433
  if (verbose) console.log(`šŸ“‹ Copying ${publishArgs.src}/ to ${path.relative(rootPath, tempDir)}/`)
432
434
 
433
435
  const filter = (src) => {
@@ -447,6 +449,7 @@ This creates a clean, flat package structure in node_modules.
447
449
  }
448
450
 
449
451
  await fs.copy(srcDir, tempDir, { filter })
452
+ if (!verbose) console.log(`āœ… Files copied`)
450
453
 
451
454
  // Copy root files that should be included in the package (only for non-root publishing)
452
455
  if (!isRootPublish) {
@@ -492,9 +495,11 @@ This creates a clean, flat package structure in node_modules.
492
495
  // Get commit message (interactive or default)
493
496
  const commitMessage = await getCommitMessage(newVersion, silent)
494
497
 
495
- if (verbose) console.log(`šŸ“‹ Committing changes...`)
498
+ console.log(`šŸ“‹ Committing changes...`)
499
+ if (verbose) console.log(`Running: git add . && git commit`)
496
500
  await runCommand('git add .', rootPath, verbose)
497
501
  await runCommand(`git commit -m "${commitMessage}"`, rootPath, verbose)
502
+ if (!verbose) console.log(`āœ… Changes committed`)
498
503
  } catch (error) {
499
504
  if (error.message.includes('cancelled')) {
500
505
  console.log('šŸ“‹ Commit cancelled - reverting version and exiting')
@@ -508,17 +513,20 @@ This creates a clean, flat package structure in node_modules.
508
513
  }
509
514
 
510
515
  if (shouldTag) {
511
- if (verbose) console.log(`šŸ·ļø Creating git tag v${newVersion}`)
516
+ console.log(`šŸ·ļø Creating git tag v${newVersion}`)
512
517
  await runCommand(`git tag -a v${newVersion} -m "Release v${newVersion}"`, rootPath, verbose)
518
+ if (!verbose) console.log(`āœ… Tag created`)
513
519
  }
514
520
 
515
521
  if (shouldPush) {
516
- if (verbose) console.log(`šŸ“¤ Pushing to remote...`)
522
+ console.log(`šŸ“¤ Pushing to remote...`)
517
523
  await runCommand('git push', rootPath, verbose)
524
+ if (!verbose) console.log(`āœ… Pushed to remote`)
518
525
 
519
526
  if (shouldTag) {
520
- if (verbose) console.log(`šŸ“¤ Pushing tags...`)
527
+ console.log(`šŸ“¤ Pushing tags...`)
521
528
  await runCommand('git push --tags', rootPath, verbose)
529
+ if (!verbose) console.log(`āœ… Tags pushed`)
522
530
  }
523
531
  }
524
532
  }
@@ -538,6 +546,7 @@ This creates a clean, flat package structure in node_modules.
538
546
 
539
547
  if (verbose) console.log(`Running: ${publishCmd}`)
540
548
  await runCommand(publishCmd, tempDir, verbose)
549
+ if (!verbose) console.log(`āœ… Published to npm`)
541
550
  }
542
551
 
543
552
  // Cleanup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itty-packager",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Universal build tool for itty libraries",
5
5
  "type": "module",
6
6
  "bin": {