fuigo 1.0.2 → 1.0.4

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.
@@ -31,10 +31,25 @@ function readLocalVersion() {
31
31
  try { return require('../package.json').version; } catch { return undefined; }
32
32
  }
33
33
 
34
+ // The platform packages are scoped under the `fuigo` npm org: @fuigo/<platform>-<arch>.
35
+ // The meta package stays unscoped -- it is the name users install, and this is
36
+ // the same split @next, @anthropic-ai and @vscode use for native sidecars.
37
+ //
38
+ // Scoping is not cosmetic. npm's spam filter refuses to CREATE an unscoped
39
+ // package name containing the token `win32-arm64` (403 "Package name triggered
40
+ // spam detection"), which is why fuigo-win32-arm64 never existed at any version
41
+ // and Windows ARM shipped without a binary until 1.0.3. Measured: the refused
42
+ // name fails even when published ALONE ten minutes after a successful sibling,
43
+ // while the same binary under a different name publishes fine. A scope removes
44
+ // that entire class of failure for every platform, not just the one that hit it.
45
+ //
46
+ // The DIRECTORY is still fuigo-<platform>-<arch>; only the npm name is scoped.
47
+ const platformPackageName = (k) => `@fuigo/${k}`;
48
+
34
49
  // Returns null when npm skipped the matching optional dependency
35
50
  // (unsupported platform, or --no-optional).
36
51
  function resolvePlatformPackageDir() {
37
- const platformPkg = `fuigo-${process.platform}-${process.arch}`;
52
+ const platformPkg = platformPackageName(`${process.platform}-${process.arch}`);
38
53
  try {
39
54
  return path.dirname(require.resolve(`${platformPkg}/package.json`));
40
55
  } catch {
@@ -108,7 +123,7 @@ function resolveBinary() {
108
123
  const platformDir = resolvePlatformPackageDir();
109
124
  if (!platformDir) {
110
125
  console.error(`${pkgName}: no platform binary installed for ${process.platform}-${process.arch}.`);
111
- console.error(` Expected sibling package fuigo-${process.platform}-${process.arch}.`);
126
+ console.error(` Expected sibling package ${platformPackageName(`${process.platform}-${process.arch}`)}.`);
112
127
  console.error(` This usually means npm skipped optionalDependencies (e.g. --no-optional)`);
113
128
  console.error(` or the platform is not supported.`);
114
129
  process.exit(1);
@@ -40,12 +40,27 @@ if (!SUPPORTED.has(key)) {
40
40
  process.exit(0);
41
41
  }
42
42
 
43
+ // The platform packages are scoped under the `fuigo` npm org: @fuigo/<platform>-<arch>.
44
+ // The meta package stays unscoped -- it is the name users install, and this is
45
+ // the same split @next, @anthropic-ai and @vscode use for native sidecars.
46
+ //
47
+ // Scoping is not cosmetic. npm's spam filter refuses to CREATE an unscoped
48
+ // package name containing the token `win32-arm64` (403 "Package name triggered
49
+ // spam detection"), which is why fuigo-win32-arm64 never existed at any version
50
+ // and Windows ARM shipped without a binary until 1.0.3. Measured: the refused
51
+ // name fails even when published ALONE ten minutes after a successful sibling,
52
+ // while the same binary under a different name publishes fine. A scope removes
53
+ // that entire class of failure for every platform, not just the one that hit it.
54
+ //
55
+ // The DIRECTORY is still fuigo-<platform>-<arch>; only the npm name is scoped.
56
+ const platformPackageName = (k) => `@fuigo/${k}`;
57
+
43
58
  // Resolve the per-platform sibling package's directory. The matching
44
59
  // optionalDependency is installed by npm based on `os`/`cpu` filters; the
45
60
  // other five are silently skipped. If the matching one is missing, npm was
46
61
  // likely invoked with --no-optional or the platform is unsupported.
47
62
  function resolvePlatformPackageDir() {
48
- const platformPkg = `fuigo-${key}`;
63
+ const platformPkg = platformPackageName(key);
49
64
  try {
50
65
  return path.dirname(require.resolve(`${platformPkg}/package.json`));
51
66
  } catch {
@@ -180,7 +195,7 @@ function cleanupOldVersions(binName) {
180
195
 
181
196
  const platformDir = resolvePlatformPackageDir();
182
197
  if (!platformDir) {
183
- console.error(`fuigo: platform package fuigo-${key} not installed.`);
198
+ console.error(`fuigo: platform package ${platformPackageName(key)} not installed.`);
184
199
  console.error(' This usually means npm was invoked with --no-optional, or the install failed.');
185
200
  console.error(' Try: npm install -g fuigo');
186
201
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuigo",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Bring Fuigo into your terminal",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -35,11 +35,11 @@
35
35
  "@iarna/toml": "^3.0.0"
36
36
  },
37
37
  "optionalDependencies": {
38
- "fuigo-darwin-arm64": "1.0.2",
39
- "fuigo-darwin-x64": "1.0.2",
40
- "fuigo-linux-arm64": "1.0.2",
41
- "fuigo-linux-x64": "1.0.2",
42
- "fuigo-win32-arm64": "1.0.2",
43
- "fuigo-win32-x64": "1.0.2"
38
+ "@fuigo/darwin-arm64": "1.0.4",
39
+ "@fuigo/darwin-x64": "1.0.4",
40
+ "@fuigo/linux-arm64": "1.0.4",
41
+ "@fuigo/linux-x64": "1.0.4",
42
+ "@fuigo/win32-arm64": "1.0.4",
43
+ "@fuigo/win32-x64": "1.0.4"
44
44
  }
45
45
  }