@ff-labs/pi-fff 0.10.1-nightly.31be224 → 0.10.1

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ff-labs/pi-fff",
3
3
  "public": true,
4
- "version": "0.10.1-nightly.31be224",
4
+ "version": "0.10.1",
5
5
  "description": "pi extension: FFF-powered fuzzy file and content search",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -40,19 +40,14 @@
40
40
  "typecheck": "tsc --noEmit"
41
41
  },
42
42
  "dependencies": {
43
+ "@ff-labs/fff-bun": "*",
43
44
  "@ff-labs/fff-node": "*"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "@earendil-works/pi-coding-agent": "*",
47
48
  "@earendil-works/pi-tui": "*",
48
- "@ff-labs/fff-bun": "*",
49
49
  "@sinclair/typebox": "*"
50
50
  },
51
- "peerDependenciesMeta": {
52
- "@ff-labs/fff-bun": {
53
- "optional": true
54
- }
55
- },
56
51
  "devDependencies": {
57
52
  "@types/node": "^22.0.0",
58
53
  "typescript": "^5.0.0"
@@ -128,6 +128,14 @@ export function resolveAuxRoot(
128
128
  return null;
129
129
  }
130
130
 
131
+ export function isOutsideWorkspaceRelativePath(relativePath: string): boolean {
132
+ return (
133
+ path.isAbsolute(relativePath) ||
134
+ relativePath === ".." ||
135
+ relativePath.startsWith(`..${path.sep}`)
136
+ );
137
+ }
138
+
131
139
  // Decide whether a `path` parameter should route to the workspace finder or
132
140
  // to an aux finder. Accepts absolute paths, `~`-prefixed paths, and relative
133
141
  // paths escaping the workspace (`../other-project`); everything is resolved
@@ -147,7 +155,7 @@ export function routePathConstraint(
147
155
  candidate = path.resolve(cwd, candidate);
148
156
  }
149
157
  const rel = path.relative(cwd, candidate);
150
- if (rel !== ".." && !rel.startsWith(`..${path.sep}`)) return null;
158
+ if (!isOutsideWorkspaceRelativePath(rel)) return null;
151
159
  return resolveAuxRoot(candidate);
152
160
  }
153
161