@bobfrankston/npmglobalize 1.0.175 → 1.0.176

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 (2) hide show
  1. package/lib.js +17 -0
  2. package/package.json +3 -3
package/lib.js CHANGED
@@ -4632,7 +4632,10 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
4632
4632
  if (nulCount > 0 && verbose) {
4633
4633
  console.log(` Removed ${nulCount} 'nul' file(s) (Windows reserved name)`);
4634
4634
  }
4635
+ const addStart = Date.now();
4636
+ process.stdout.write(` git add -A ... `);
4635
4637
  let addResult = runCommand('git', ['add', '-A'], { cwd, silent: true });
4638
+ process.stdout.write(`done (${((Date.now() - addStart) / 1000).toFixed(1)}s)\n`);
4636
4639
  if (!addResult.success) {
4637
4640
  const errText = addResult.stderr + addResult.output;
4638
4641
  const deniedFiles = parseDeniedFiles(errText);
@@ -4652,7 +4655,10 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
4652
4655
  }
4653
4656
  fs.writeFileSync(gitignorePath, gitignoreContent);
4654
4657
  console.log(colors.green('✓ Updated .gitignore'));
4658
+ const retryStart = Date.now();
4659
+ console.log(` ${timestamp()} git add -A (retry) ...`);
4655
4660
  addResult = runCommand('git', ['add', '-A'], { cwd, silent: true });
4661
+ console.log(` ${timestamp()} git add -A done (${((Date.now() - retryStart) / 1000).toFixed(1)}s)`);
4656
4662
  if (addResult.success) {
4657
4663
  console.log(colors.green('✓ git add succeeded after updating .gitignore'));
4658
4664
  }
@@ -4669,7 +4675,10 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
4669
4675
  console.log(colors.yellow('Continuing with --force...'));
4670
4676
  }
4671
4677
  }
4678
+ const commitStart = Date.now();
4679
+ console.log(` ${timestamp()} git commit ... (pre-commit hooks may run)`);
4672
4680
  let commitResult = gitCommit(commitMsg, cwd);
4681
+ console.log(` ${timestamp()} git commit done (${((Date.now() - commitStart) / 1000).toFixed(1)}s)`);
4673
4682
  if (!commitResult.success) {
4674
4683
  // Check for corrupted git index ("invalid object" / "Error building trees")
4675
4684
  const errText = commitResult.stderr + commitResult.output;
@@ -4694,7 +4703,15 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
4694
4703
  }
4695
4704
  // Pull latest from remote before version bump to avoid push rejection
4696
4705
  if (currentGitStatus.hasRemote && !dryRun) {
4706
+ const pullStart = Date.now();
4707
+ console.log(` ${timestamp()} git pull --rebase origin ${currentGitStatus.currentBranch} ...`);
4708
+ const heartbeat = setInterval(() => {
4709
+ const elapsed = ((Date.now() - pullStart) / 1000).toFixed(0);
4710
+ console.log(` ${timestamp()} ... still pulling (${elapsed}s elapsed)`);
4711
+ }, 10000);
4697
4712
  const pullResult = await runCommandAsync('git', ['pull', '--rebase', 'origin', currentGitStatus.currentBranch], { cwd, silent: true });
4713
+ clearInterval(heartbeat);
4714
+ console.log(` ${timestamp()} git pull done (${((Date.now() - pullStart) / 1000).toFixed(1)}s)`);
4698
4715
  if (!pullResult.success) {
4699
4716
  console.error(colors.yellow('Warning: git pull --rebase failed before version bump'));
4700
4717
  if (verbose) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/npmglobalize",
3
- "version": "1.0.175",
3
+ "version": "1.0.176",
4
4
  "description": "Transform file: dependencies to npm versions for publishing",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  "@bobfrankston/mailx": "^1.0.466",
37
37
  "@bobfrankston/npmglobalize": "^1.0.153",
38
38
  "@bobfrankston/themecolors": "^0.1.6",
39
- "@bobfrankston/userconfig": "^1.0.8",
39
+ "@bobfrankston/userconfig": "^1.0.9",
40
40
  "@npmcli/package-json": "^7.0.4",
41
41
  "json5": "^2.2.3",
42
42
  "libnpmversion": "^8.0.3",
@@ -68,7 +68,7 @@
68
68
  "@bobfrankston/mailx": "^1.0.466",
69
69
  "@bobfrankston/npmglobalize": "^1.0.153",
70
70
  "@bobfrankston/themecolors": "^0.1.6",
71
- "@bobfrankston/userconfig": "^1.0.8",
71
+ "@bobfrankston/userconfig": "^1.0.9",
72
72
  "@npmcli/package-json": "^7.0.4",
73
73
  "json5": "^2.2.3",
74
74
  "libnpmversion": "^8.0.3",