@bobfrankston/npmglobalize 1.0.175 → 1.0.177
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.
- package/lib.js +13 -0
- 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,9 @@ 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();
|
|
4672
4679
|
let commitResult = gitCommit(commitMsg, cwd);
|
|
4680
|
+
console.log(` git commit done (${((Date.now() - commitStart) / 1000).toFixed(1)}s)`);
|
|
4673
4681
|
if (!commitResult.success) {
|
|
4674
4682
|
// Check for corrupted git index ("invalid object" / "Error building trees")
|
|
4675
4683
|
const errText = commitResult.stderr + commitResult.output;
|
|
@@ -4694,7 +4702,12 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
4694
4702
|
}
|
|
4695
4703
|
// Pull latest from remote before version bump to avoid push rejection
|
|
4696
4704
|
if (currentGitStatus.hasRemote && !dryRun) {
|
|
4705
|
+
const pullStart = Date.now();
|
|
4706
|
+
process.stdout.write(` git pull --rebase origin ${currentGitStatus.currentBranch} `);
|
|
4707
|
+
const heartbeat = setInterval(() => process.stdout.write('.'), 2000);
|
|
4697
4708
|
const pullResult = await runCommandAsync('git', ['pull', '--rebase', 'origin', currentGitStatus.currentBranch], { cwd, silent: true });
|
|
4709
|
+
clearInterval(heartbeat);
|
|
4710
|
+
process.stdout.write(` done (${((Date.now() - pullStart) / 1000).toFixed(1)}s)\n`);
|
|
4698
4711
|
if (!pullResult.success) {
|
|
4699
4712
|
console.error(colors.yellow('Warning: git pull --rebase failed before version bump'));
|
|
4700
4713
|
if (verbose) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/npmglobalize",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.177",
|
|
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.
|
|
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.
|
|
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",
|