@meridiona/meridian 1.27.2 → 1.27.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.
- package/bin/meridian.js +13 -8
- package/package.json +2 -2
package/bin/meridian.js
CHANGED
|
@@ -87,24 +87,29 @@ if (cmd === 'setup' || cmd === 'install') {
|
|
|
87
87
|
run('bash', [path.join(bundle, 'scripts', 'meridian-npm-setup.sh'), bundle, ...rest]);
|
|
88
88
|
} else if (cmd === 'update' || cmd === '_update-continue') {
|
|
89
89
|
if (cmd === 'update') {
|
|
90
|
-
// Step 1:
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
90
|
+
// Step 1: install both packages atomically so the new launcher and the
|
|
91
|
+
// darwin-arm64 bundle are always in sync. Using npmInstallLatest() here
|
|
92
|
+
// instead of installing only the thin launcher prevents a race where the old
|
|
93
|
+
// launcher re-execs itself if the npm root moves between installs.
|
|
94
94
|
console.log('meridian update: downloading latest release…');
|
|
95
95
|
console.log(' Size varies: ~5 MB (binary-only) → ~165 MB (Python deps changed). May take 1-3 min if large.');
|
|
96
96
|
const _start = Date.now();
|
|
97
|
-
const up =
|
|
97
|
+
const up = npmInstallLatest();
|
|
98
98
|
if (up.status) process.exit(up.status);
|
|
99
|
-
console.log(`
|
|
100
|
-
// Re-exec the freshly installed launcher
|
|
99
|
+
console.log(` Packages updated in ${Math.round((Date.now() - _start) / 1000)}s`);
|
|
100
|
+
// Re-exec the freshly installed launcher so step 2 always runs the latest code.
|
|
101
101
|
const npmRoot = (spawnSync('npm', ['root', '-g'], { encoding: 'utf8' }).stdout || '').trim();
|
|
102
102
|
const newLauncher = path.join(npmRoot, '@meridiona', 'meridian', 'bin', 'meridian.js');
|
|
103
103
|
if (fs.existsSync(newLauncher)) {
|
|
104
104
|
const r = spawnSync(process.execPath, [newLauncher, '_update-continue'], { stdio: 'inherit' });
|
|
105
105
|
process.exit(r.status ?? 1);
|
|
106
106
|
}
|
|
107
|
-
//
|
|
107
|
+
// New launcher not found after a successful install — fail loudly; do NOT
|
|
108
|
+
// silently continue in the old process (which may run stale setup code).
|
|
109
|
+
console.error('meridian update: new launcher not found at', newLauncher);
|
|
110
|
+
console.error(' The npm install appeared to succeed but the expected file is missing.');
|
|
111
|
+
console.error(' Try: npm install -g @meridiona/meridian && meridian update');
|
|
112
|
+
process.exit(1);
|
|
108
113
|
}
|
|
109
114
|
// Step 2 (runs in new launcher): install bundle + run setup.
|
|
110
115
|
const _bundleStart = Date.now();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meridiona/meridian",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.4",
|
|
4
4
|
"description": "Your project management, written by your work — local-first PM automation from real dev activity (macOS, Apple Silicon).",
|
|
5
5
|
"homepage": "https://github.com/Meridiona/meridian",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=18"
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@meridiona/meridian-darwin-arm64": "1.27.
|
|
27
|
+
"@meridiona/meridian-darwin-arm64": "1.27.4"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|