mobygate 0.6.0 → 0.6.1
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/CHANGELOG.md +11 -0
- package/bin/mobygate.js +9 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ All notable changes to mobygate are documented here. Format loosely follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version numbers are
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.6.1] — 2026-04-24
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **`mobygate update` on Windows** failed with `spawnSync npm ENOENT`
|
|
12
|
+
because `npm` resolves to `npm.cmd` (a batch file) on Windows, and
|
|
13
|
+
Node's `spawn` won't pick up `.cmd` extensions without going through
|
|
14
|
+
cmd.exe. Added `shell: IS_WIN` to every npm/git invocation in the
|
|
15
|
+
CLI's update path. The dashboard's update endpoint already had this
|
|
16
|
+
fix in v0.6.0; now the CLI matches.
|
|
17
|
+
|
|
7
18
|
## [0.6.0] — 2026-04-24
|
|
8
19
|
|
|
9
20
|
Big one. Native tool calling + in-dashboard self-update.
|
package/bin/mobygate.js
CHANGED
|
@@ -564,8 +564,13 @@ async function cmdUpdate() {
|
|
|
564
564
|
print(c.dim(`Current: v${pkg.version} · ${mode} install at ${REPO_ROOT}`));
|
|
565
565
|
|
|
566
566
|
// ---- Look up latest published version on npm
|
|
567
|
+
// shell: IS_WIN is required on Windows because `npm` is `npm.cmd`
|
|
568
|
+
// (a batch file), and Node's spawn won't resolve .cmd extensions
|
|
569
|
+
// without going through cmd.exe. Same for git on Windows where some
|
|
570
|
+
// distributions install git as a shim. On macOS/Linux these are real
|
|
571
|
+
// binaries, so the flag is a no-op.
|
|
567
572
|
info('Checking npm for the latest release...');
|
|
568
|
-
const view = spawnSync('npm', ['view', 'mobygate', 'version'], { encoding: 'utf8', timeout: 10_000 });
|
|
573
|
+
const view = spawnSync('npm', ['view', 'mobygate', 'version'], { encoding: 'utf8', timeout: 10_000, shell: IS_WIN });
|
|
569
574
|
if (view.status !== 0) {
|
|
570
575
|
return die(`Couldn't reach npm registry: ${view.stderr?.trim() || view.error?.message || 'unknown'}`);
|
|
571
576
|
}
|
|
@@ -579,15 +584,15 @@ async function cmdUpdate() {
|
|
|
579
584
|
// ---- Perform the upgrade
|
|
580
585
|
if (mode === 'npm') {
|
|
581
586
|
info(`Running \`npm install -g mobygate@latest\`...`);
|
|
582
|
-
const r = spawnSync('npm', ['install', '-g', 'mobygate@latest'], { stdio: 'inherit' });
|
|
587
|
+
const r = spawnSync('npm', ['install', '-g', 'mobygate@latest'], { stdio: 'inherit', shell: IS_WIN });
|
|
583
588
|
if (r.status !== 0) return die('npm install failed. See output above.');
|
|
584
589
|
ok(`Installed mobygate@${latest}`);
|
|
585
590
|
} else if (mode === 'git') {
|
|
586
591
|
info(`Running \`git pull\` in ${REPO_ROOT}...`);
|
|
587
|
-
const pull = spawnSync('git', ['-C', REPO_ROOT, 'pull', '--ff-only'], { stdio: 'inherit' });
|
|
592
|
+
const pull = spawnSync('git', ['-C', REPO_ROOT, 'pull', '--ff-only'], { stdio: 'inherit', shell: IS_WIN });
|
|
588
593
|
if (pull.status !== 0) return die('git pull failed. Resolve conflicts and retry.');
|
|
589
594
|
info(`Running \`npm install\`...`);
|
|
590
|
-
const install = spawnSync('npm', ['install'], { cwd: REPO_ROOT, stdio: 'inherit' });
|
|
595
|
+
const install = spawnSync('npm', ['install'], { cwd: REPO_ROOT, stdio: 'inherit', shell: IS_WIN });
|
|
591
596
|
if (install.status !== 0) return die('npm install failed. See output above.');
|
|
592
597
|
ok(`Pulled and installed. See git log for what changed.`);
|
|
593
598
|
} else {
|