@bobfrankston/npmglobalize 1.0.176 → 1.0.178
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 +7 -10
- package/package.json +1 -1
package/lib.js
CHANGED
|
@@ -4209,9 +4209,10 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
4209
4209
|
if (depsToPublish.length > 0) {
|
|
4210
4210
|
const action = forcePublish ? 'Publishing/updating' : 'Publishing';
|
|
4211
4211
|
console.log(`${action} file: dependencies first...`);
|
|
4212
|
-
for (const { name, version, path } of depsToPublish) {
|
|
4212
|
+
for (const { name, version, path: depPath } of depsToPublish) {
|
|
4213
4213
|
console.log('');
|
|
4214
4214
|
console.log(colors.yellow(`━━━ Publishing ${name}@${version} ━━━`));
|
|
4215
|
+
console.log(colors.dim(` ${depPath}`));
|
|
4215
4216
|
if (!dryRun) {
|
|
4216
4217
|
// Check if package has EVER been published to npm (any version)
|
|
4217
4218
|
const hasBeenPublished = checkPackageExists(name);
|
|
@@ -4220,7 +4221,7 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
4220
4221
|
// before) — already-published deps keep their own visibility setting.
|
|
4221
4222
|
// -public-deps overrides this: propagate npmVisibility regardless so a
|
|
4222
4223
|
// public consumer's transitive deps all get promoted to public.
|
|
4223
|
-
const depSuccess = await globalize(
|
|
4224
|
+
const depSuccess = await globalize(depPath, {
|
|
4224
4225
|
bump: 'patch', // Use existing version, don't bump
|
|
4225
4226
|
verbose,
|
|
4226
4227
|
quiet,
|
|
@@ -4676,9 +4677,8 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
4676
4677
|
}
|
|
4677
4678
|
}
|
|
4678
4679
|
const commitStart = Date.now();
|
|
4679
|
-
console.log(` ${timestamp()} git commit ... (pre-commit hooks may run)`);
|
|
4680
4680
|
let commitResult = gitCommit(commitMsg, cwd);
|
|
4681
|
-
console.log(`
|
|
4681
|
+
console.log(` git commit done (${((Date.now() - commitStart) / 1000).toFixed(1)}s)`);
|
|
4682
4682
|
if (!commitResult.success) {
|
|
4683
4683
|
// Check for corrupted git index ("invalid object" / "Error building trees")
|
|
4684
4684
|
const errText = commitResult.stderr + commitResult.output;
|
|
@@ -4704,14 +4704,11 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
4704
4704
|
// Pull latest from remote before version bump to avoid push rejection
|
|
4705
4705
|
if (currentGitStatus.hasRemote && !dryRun) {
|
|
4706
4706
|
const pullStart = Date.now();
|
|
4707
|
-
|
|
4708
|
-
const heartbeat = setInterval(() =>
|
|
4709
|
-
const elapsed = ((Date.now() - pullStart) / 1000).toFixed(0);
|
|
4710
|
-
console.log(` ${timestamp()} ... still pulling (${elapsed}s elapsed)`);
|
|
4711
|
-
}, 10000);
|
|
4707
|
+
process.stdout.write(` git pull --rebase origin ${currentGitStatus.currentBranch} `);
|
|
4708
|
+
const heartbeat = setInterval(() => process.stdout.write('.'), 2000);
|
|
4712
4709
|
const pullResult = await runCommandAsync('git', ['pull', '--rebase', 'origin', currentGitStatus.currentBranch], { cwd, silent: true });
|
|
4713
4710
|
clearInterval(heartbeat);
|
|
4714
|
-
|
|
4711
|
+
process.stdout.write(` done (${((Date.now() - pullStart) / 1000).toFixed(1)}s)\n`);
|
|
4715
4712
|
if (!pullResult.success) {
|
|
4716
4713
|
console.error(colors.yellow('Warning: git pull --rebase failed before version bump'));
|
|
4717
4714
|
if (verbose) {
|