@sylphx/flow 2.1.1 → 2.1.2
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 +31 -0
- package/package.json +1 -1
- package/src/core/upgrade-manager.ts +15 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 2.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ad6ae71: Fix upgrade command not detecting Flow CLI version
|
|
8
|
+
|
|
9
|
+
**Bug Fix:**
|
|
10
|
+
|
|
11
|
+
The `sylphx-flow upgrade` command was incorrectly reading the version from project config file instead of the globally installed CLI package. This caused it to always report "All components are up to date" even when a newer version was available.
|
|
12
|
+
|
|
13
|
+
**Changes:**
|
|
14
|
+
|
|
15
|
+
- Fixed `getCurrentFlowVersion()` to read from the running CLI's package.json
|
|
16
|
+
- Added fallback to check globally installed package version
|
|
17
|
+
- Now correctly detects when Flow CLI needs updating
|
|
18
|
+
|
|
19
|
+
**Before:**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
$ sylphx-flow upgrade
|
|
23
|
+
✓ All components are up to date # Wrong!
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**After:**
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
$ sylphx-flow upgrade
|
|
30
|
+
Sylphx Flow: 2.1.1 → 2.1.2
|
|
31
|
+
Upgrade to latest version? (Y/n)
|
|
32
|
+
```
|
|
33
|
+
|
|
3
34
|
## 2.1.1
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sylphx/flow",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "One CLI to rule them all. Unified orchestration layer for Claude Code, OpenCode, Cursor and all AI development tools. Auto-detection, auto-installation, auto-upgrade.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -276,11 +276,21 @@ export class UpgradeManager {
|
|
|
276
276
|
|
|
277
277
|
private async getCurrentFlowVersion(): Promise<string | null> {
|
|
278
278
|
try {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
return null;
|
|
279
|
+
// Read version from the running CLI's package.json
|
|
280
|
+
// __dirname points to dist/ or src/, so go up to package root
|
|
281
|
+
const packagePath = path.join(__dirname, '..', '..', 'package.json');
|
|
282
|
+
const packageJson = JSON.parse(await fs.readFile(packagePath, 'utf-8'));
|
|
283
|
+
return packageJson.version || null;
|
|
284
|
+
} catch (error) {
|
|
285
|
+
// Fallback: try to get version from globally installed package
|
|
286
|
+
try {
|
|
287
|
+
const { stdout } = await execAsync('npm list -g @sylphx/flow --depth=0 --json');
|
|
288
|
+
const result = JSON.parse(stdout);
|
|
289
|
+
const flowPackage = result.dependencies?.['@sylphx/flow'];
|
|
290
|
+
return flowPackage?.version || null;
|
|
291
|
+
} catch {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
284
294
|
}
|
|
285
295
|
}
|
|
286
296
|
|