@bobfrankston/npmglobalize 1.0.18 → 1.0.19

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 +6 -4
  2. package/package.json +1 -1
package/lib.js CHANGED
@@ -1100,7 +1100,8 @@ export async function globalize(cwd, options = {}) {
1100
1100
  if (install) {
1101
1101
  console.log(`Installing globally: ${pkgName}@${pkgVersion}...`);
1102
1102
  if (!dryRun) {
1103
- const installResult = runCommand('npm', ['install', '-g', `${pkgName}@latest`], { cwd, silent: false });
1103
+ // Install from local directory (faster and works immediately after publish)
1104
+ const installResult = runCommand('npm', ['install', '-g', '.'], { cwd, silent: false, shell: true });
1104
1105
  if (installResult.success) {
1105
1106
  // Verify installation by checking if command exists
1106
1107
  const verifyResult = runCommand('npm', ['list', '-g', '--depth=0', pkgName], { cwd, silent: true });
@@ -1113,17 +1114,18 @@ export async function globalize(cwd, options = {}) {
1113
1114
  }
1114
1115
  else {
1115
1116
  console.error(colors.red(`✗ Global install failed`));
1116
- console.error(colors.yellow(' Try running manually: npm install -g ' + pkgName));
1117
+ console.error(colors.yellow(' Try running manually: npm install -g .'));
1117
1118
  }
1118
1119
  }
1119
1120
  else {
1120
- console.log(` [dry-run] Would run: npm install -g ${pkgName}`);
1121
+ console.log(` [dry-run] Would run: npm install -g .`);
1121
1122
  }
1122
1123
  }
1123
1124
  if (wsl) {
1124
1125
  console.log(`Installing in WSL: ${pkgName}@${pkgVersion}...`);
1125
1126
  if (!dryRun) {
1126
- const wslResult = runCommand('wsl', ['npm', 'install', '-g', `${pkgName}@latest`], { cwd, silent: false });
1127
+ // Install from local directory in WSL
1128
+ const wslResult = runCommand('wsl', ['npm', 'install', '-g', '.'], { cwd, silent: false });
1127
1129
  if (wslResult.success) {
1128
1130
  // Verify WSL installation
1129
1131
  const verifyResult = runCommand('wsl', ['npm', 'list', '-g', '--depth=0', pkgName], { cwd, silent: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/npmglobalize",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Transform file: dependencies to npm versions for publishing",
5
5
  "main": "index.js",
6
6
  "type": "module",