@ingit/cli 0.6.5 → 0.6.7
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/auto-update.cjs +13 -6
- package/package.json +6 -6
package/bin/auto-update.cjs
CHANGED
|
@@ -208,9 +208,11 @@ async function globalPackages(manager, run) {
|
|
|
208
208
|
return [];
|
|
209
209
|
return groups.flatMap((group) => {
|
|
210
210
|
const dependency = group?.dependencies?.[PACKAGE];
|
|
211
|
-
if (!dependency ||
|
|
211
|
+
if (!dependency || /^(link:|file:)/.test(dependency.version ?? ""))
|
|
212
212
|
return [];
|
|
213
|
-
if (
|
|
213
|
+
if (typeof dependency.path === "string" && import_node_path2.isAbsolute(dependency.path))
|
|
214
|
+
return [dependency.path];
|
|
215
|
+
if (typeof group.path !== "string" || !import_node_path2.isAbsolute(group.path))
|
|
214
216
|
return [];
|
|
215
217
|
return [import_node_path2.join(group.path, "node_modules", PACKAGE)];
|
|
216
218
|
});
|
|
@@ -328,10 +330,15 @@ async function autoUpdate({
|
|
|
328
330
|
release = await acquireLock(import_node_path2.join(import_node_path2.dirname(settingsPath), "auto-update.lock"));
|
|
329
331
|
if (!release || !(await getAppSettings(settingsPath)).autoUpdate)
|
|
330
332
|
return null;
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
const candidates = installation.manager === "pnpm" ? await globalPackages("pnpm", run) : [installation.packageDir];
|
|
334
|
+
if (candidates.length === 0)
|
|
335
|
+
return null;
|
|
336
|
+
for (const candidate of candidates) {
|
|
337
|
+
const installed = await readManifest(candidate);
|
|
338
|
+
if (installed.version && compareVersions(installed.version, version) !== -1) {
|
|
339
|
+
return import_node_path2.join(candidate, "bin", "ingit.cjs");
|
|
340
|
+
}
|
|
341
|
+
}
|
|
335
342
|
const command = updateArguments(installation.manager, version);
|
|
336
343
|
log(`ingit: updating ${manifest.version} → ${version} (${installation.manager} ${command.join(" ")})`);
|
|
337
344
|
const result = await run(installation.manager, command, true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ingit/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "Local git history & graph viewer in your browser",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ingit": "bin/ingit.cjs"
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"README.md"
|
|
11
11
|
],
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"@ingit/cli-linux-x64": "0.6.
|
|
14
|
-
"@ingit/cli-linux-arm64": "0.6.
|
|
15
|
-
"@ingit/cli-darwin-x64": "0.6.
|
|
16
|
-
"@ingit/cli-darwin-arm64": "0.6.
|
|
17
|
-
"@ingit/cli-win32-x64": "0.6.
|
|
13
|
+
"@ingit/cli-linux-x64": "0.6.7",
|
|
14
|
+
"@ingit/cli-linux-arm64": "0.6.7",
|
|
15
|
+
"@ingit/cli-darwin-x64": "0.6.7",
|
|
16
|
+
"@ingit/cli-darwin-arm64": "0.6.7",
|
|
17
|
+
"@ingit/cli-win32-x64": "0.6.7"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"engines": {
|