@bobfrankston/npmglobalize 1.0.93 → 1.0.94

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 -2
  2. package/package.json +1 -1
package/lib.js CHANGED
@@ -2044,8 +2044,8 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
2044
2044
  console.log(colors.yellow('Continuing with --force despite errors...'));
2045
2045
  }
2046
2046
  // Check npm visibility and current publication status
2047
- const currentAccess = checkNpmAccess(pkg.name);
2048
- const isScoped = pkg.name.startsWith('@');
2047
+ let currentAccess = checkNpmAccess(pkg.name);
2048
+ let isScoped = pkg.name.startsWith('@');
2049
2049
  // Check if public intent was explicitly declared anywhere:
2050
2050
  // CLI (--npm public), config file (.globalize.json5), or package.json publishConfig
2051
2051
  const npmVisibilityExplicitlySet = 'npmVisibility' in options
@@ -2102,6 +2102,8 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
2102
2102
  const normalizedScope = scope.startsWith('@') ? scope : `@${scope}`;
2103
2103
  const newName = `${normalizedScope}/${pkg.name}`;
2104
2104
  pkg.name = newName;
2105
+ isScoped = true;
2106
+ currentAccess = checkNpmAccess(newName);
2105
2107
  writePackageJson(cwd, pkg);
2106
2108
  console.log(colors.green(`✓ Renamed package to ${newName}`));
2107
2109
  // Save scope to .userconfig if not already there
@@ -2185,6 +2187,8 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
2185
2187
  const normalizedScope = scope.startsWith('@') ? scope : `@${scope}`;
2186
2188
  const newName = `${normalizedScope}/${pkg.name}`;
2187
2189
  pkg.name = newName;
2190
+ isScoped = true;
2191
+ currentAccess = checkNpmAccess(newName);
2188
2192
  writePackageJson(cwd, pkg);
2189
2193
  console.log(colors.green(`✓ Renamed package to ${newName}`));
2190
2194
  if (!ucfg.scope) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/npmglobalize",
3
- "version": "1.0.93",
3
+ "version": "1.0.94",
4
4
  "description": "Transform file: dependencies to npm versions for publishing",
5
5
  "main": "index.js",
6
6
  "type": "module",