pi-agent-browser-native 0.2.18 → 0.2.19
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 +5 -0
- package/package.json +1 -1
- package/scripts/doctor.mjs +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.2.19 - 2026-05-03
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- resolve relative Pi package sources from the settings file directory in `pi-agent-browser-doctor`, so global settings that point at a local checkout are detected correctly
|
|
9
|
+
|
|
5
10
|
## 0.2.18 - 2026-05-03
|
|
6
11
|
|
|
7
12
|
### Fixed
|
package/package.json
CHANGED
package/scripts/doctor.mjs
CHANGED
|
@@ -125,7 +125,7 @@ function isPathLikeSource(source) {
|
|
|
125
125
|
return source.startsWith("/") || source.startsWith("./") || source.startsWith("../") || source.startsWith("~");
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
function sourceLooksLikeThisPackage(source, cwd) {
|
|
128
|
+
function sourceLooksLikeThisPackage(source, cwd, sourceBaseDir = cwd) {
|
|
129
129
|
const text = String(source ?? "").trim();
|
|
130
130
|
if (text.length === 0) return false;
|
|
131
131
|
if (/^npm:pi-agent-browser-native(?:@|$)/.test(text)) return true;
|
|
@@ -133,12 +133,13 @@ function sourceLooksLikeThisPackage(source, cwd) {
|
|
|
133
133
|
if (text.includes(REPO_URL_FRAGMENT)) return true;
|
|
134
134
|
|
|
135
135
|
if (!isPathLikeSource(text)) return false;
|
|
136
|
-
const resolvedSource = resolve(
|
|
136
|
+
const resolvedSource = resolve(sourceBaseDir, expandUserPath(text));
|
|
137
137
|
const cwdEntrypoint = resolve(cwd, EXTENSION_ENTRYPOINT);
|
|
138
138
|
const packageEntrypoint = resolve(THIS_PACKAGE_ROOT, EXTENSION_ENTRYPOINT);
|
|
139
139
|
return (
|
|
140
140
|
resolvedSource === cwd ||
|
|
141
141
|
resolvedSource === cwdEntrypoint ||
|
|
142
|
+
resolvedSource === THIS_PACKAGE_ROOT ||
|
|
142
143
|
resolvedSource === packageEntrypoint ||
|
|
143
144
|
isInsidePath(cwdEntrypoint, resolvedSource) ||
|
|
144
145
|
isInsidePath(packageEntrypoint, resolvedSource)
|
|
@@ -223,15 +224,16 @@ function entrySource(entry) {
|
|
|
223
224
|
|
|
224
225
|
function collectSettingsSources(settings, settingsPath, cwd) {
|
|
225
226
|
const sources = [];
|
|
227
|
+
const sourceBaseDir = dirname(settingsPath);
|
|
226
228
|
for (const [index, entry] of arrayEntries(settings?.packages)) {
|
|
227
229
|
const source = entrySource(entry);
|
|
228
|
-
if (sourceLooksLikeThisPackage(source, cwd)) {
|
|
230
|
+
if (sourceLooksLikeThisPackage(source, cwd, sourceBaseDir)) {
|
|
229
231
|
sources.push({ kind: "package", source: String(source), location: `${settingsPath} packages[${index}]` });
|
|
230
232
|
}
|
|
231
233
|
}
|
|
232
234
|
for (const [index, entry] of arrayEntries(settings?.extensions)) {
|
|
233
235
|
const source = entrySource(entry);
|
|
234
|
-
if (sourceLooksLikeThisPackage(source, cwd)) {
|
|
236
|
+
if (sourceLooksLikeThisPackage(source, cwd, sourceBaseDir)) {
|
|
235
237
|
sources.push({ kind: "extension", source: String(source), location: `${settingsPath} extensions[${index}]` });
|
|
236
238
|
}
|
|
237
239
|
}
|