@d3ara1n/pi-hashline-edit 0.5.5 → 0.5.6
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 +1 -1
- package/src/pi/grep-tool.ts +2 -2
- package/src/pi/grep.test.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d3ara1n/pi-hashline-edit",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hashline-style file editing for pi — line-anchored edits verified by content hash, replacing oldText/newText matching",
|
|
6
6
|
"homepage": "https://github.com/d3ara1n/pi-extensions/tree/main/packages/pi-hashline-edit#readme",
|
package/src/pi/grep-tool.ts
CHANGED
|
@@ -129,10 +129,10 @@ const grepOverrideSchema = Type.Object({
|
|
|
129
129
|
}),
|
|
130
130
|
),
|
|
131
131
|
wordMatch: Type.Optional(Type.Boolean({ description: "Match whole words only (rg -w)" })),
|
|
132
|
-
path: Type.Union([Type.String(), Type.Array(Type.String())], {
|
|
132
|
+
path: Type.Optional(Type.Union([Type.String(), Type.Array(Type.String())], {
|
|
133
133
|
description:
|
|
134
134
|
"Directory or file to search (string or array of paths; default: current directory)",
|
|
135
|
-
}),
|
|
135
|
+
})),
|
|
136
136
|
glob: Type.Optional(
|
|
137
137
|
Type.String({ description: "Filter files by glob pattern, e.g. '*.ts' or '**/*.spec.ts'" }),
|
|
138
138
|
),
|
package/src/pi/grep.test.ts
CHANGED
|
@@ -96,7 +96,9 @@ test("formats parsed rg matches with full-line hash anchors", async () => {
|
|
|
96
96
|
],
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
const
|
|
99
|
+
const tool = makeGrepOverrideWithBackend(dir, fake.backend);
|
|
100
|
+
assert.deepEqual(tool.parameters.required, ["pattern"]);
|
|
101
|
+
const result = await call(tool, {
|
|
100
102
|
pattern: "alpha",
|
|
101
103
|
});
|
|
102
104
|
const output = text(result);
|