portable-agent-layer 0.115.0-canary.6 → 0.115.0
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/package.json
CHANGED
|
@@ -66,6 +66,8 @@ export function getInstalledVersion(): string {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
const PULLED_BRANCH = "@{upstream}";
|
|
70
|
+
|
|
69
71
|
async function checkRepo(): Promise<UpdateCache> {
|
|
70
72
|
const repoDir = palPkg();
|
|
71
73
|
const current = getInstalledVersion();
|
|
@@ -79,7 +81,7 @@ async function checkRepo(): Promise<UpdateCache> {
|
|
|
79
81
|
});
|
|
80
82
|
await fetch.exited;
|
|
81
83
|
|
|
82
|
-
const remote = Bun.spawn(["git", "rev-parse",
|
|
84
|
+
const remote = Bun.spawn(["git", "rev-parse", PULLED_BRANCH], {
|
|
83
85
|
cwd: repoDir,
|
|
84
86
|
stdout: "pipe",
|
|
85
87
|
stderr: "ignore",
|
|
@@ -88,8 +90,8 @@ async function checkRepo(): Promise<UpdateCache> {
|
|
|
88
90
|
const remoteHash = (await new Response(remote.stdout).text()).trim();
|
|
89
91
|
|
|
90
92
|
// "Ahead" (local unpushed commits) is not an update — only remote commits we
|
|
91
|
-
// lack are. Count HEAD..
|
|
92
|
-
const behind = Bun.spawn(["git", "rev-list", "--count",
|
|
93
|
+
// lack are. Count HEAD..upstream so being ahead or diverged never nags.
|
|
94
|
+
const behind = Bun.spawn(["git", "rev-list", "--count", `HEAD..${PULLED_BRANCH}`], {
|
|
93
95
|
cwd: repoDir,
|
|
94
96
|
stdout: "pipe",
|
|
95
97
|
stderr: "ignore",
|
|
@@ -100,11 +102,10 @@ async function checkRepo(): Promise<UpdateCache> {
|
|
|
100
102
|
|
|
101
103
|
const available = behindCount > 0 && remoteHash.length > 0;
|
|
102
104
|
|
|
103
|
-
// Get remote version from package.json on origin/main
|
|
104
105
|
let latest = current;
|
|
105
106
|
if (available) {
|
|
106
107
|
try {
|
|
107
|
-
const show = Bun.spawn(["git", "show",
|
|
108
|
+
const show = Bun.spawn(["git", "show", `${PULLED_BRANCH}:package.json`], {
|
|
108
109
|
cwd: repoDir,
|
|
109
110
|
stdout: "pipe",
|
|
110
111
|
stderr: "ignore",
|