pr-shepherd 0.28.0 → 0.29.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/README.md
CHANGED
|
@@ -210,11 +210,13 @@ export default rule;
|
|
|
210
210
|
|
|
211
211
|
`suppress: true` hides the item from agent output. `autoResolve: true` queues it for the minimize/resolve mutation. Both can apply together.
|
|
212
212
|
|
|
213
|
+
TypeScript rules are loaded by the runtime's native TypeScript support; keep them to erasable syntax such as type annotations and `import type`. Runtime TypeScript features that need transpilation, such as enums, namespaces, parameter properties, and decorators, are not supported. Use `.mts` for portable ESM rules across Node, Bun, and Deno.
|
|
214
|
+
|
|
213
215
|
Ready-to-use examples for common patterns are in [`examples/classification/`](examples/classification/).
|
|
214
216
|
|
|
215
217
|
## Requirements
|
|
216
218
|
|
|
217
|
-
- Node.js >= 22.
|
|
219
|
+
- Node.js >= 22.18.0, Bun, or Deno
|
|
218
220
|
- A GitHub token or authenticated `gh` CLI; private repositories require `repo` scope.
|
|
219
221
|
- `git`
|
|
220
222
|
|
package/bin/classify/loader.mjs
CHANGED
|
@@ -32,22 +32,6 @@ function collectRuleFiles(dir) {
|
|
|
32
32
|
.map((name) => join(dir, name))
|
|
33
33
|
.sort();
|
|
34
34
|
}
|
|
35
|
-
let tsxAttempted = false;
|
|
36
|
-
async function ensureTsxRegistered() {
|
|
37
|
-
if (tsxAttempted)
|
|
38
|
-
return;
|
|
39
|
-
tsxAttempted = true;
|
|
40
|
-
try {
|
|
41
|
-
const { register } = await import("tsx/esm/api");
|
|
42
|
-
register();
|
|
43
|
-
/* c8 ignore start */
|
|
44
|
-
}
|
|
45
|
-
catch (err) {
|
|
46
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
47
|
-
process.stderr.write(`pr-shepherd: failed to register tsx — .ts/.mts classification rules will not load: ${msg}\n`);
|
|
48
|
-
}
|
|
49
|
-
/* c8 ignore stop */
|
|
50
|
-
}
|
|
51
35
|
const ruleCache = new Map();
|
|
52
36
|
export async function loadRules(files) {
|
|
53
37
|
if (files.length === 0)
|
|
@@ -56,9 +40,6 @@ export async function loadRules(files) {
|
|
|
56
40
|
const cached = ruleCache.get(cacheKey);
|
|
57
41
|
if (cached !== undefined)
|
|
58
42
|
return cached;
|
|
59
|
-
const hasTs = files.some((f) => f.endsWith(".ts") || f.endsWith(".mts"));
|
|
60
|
-
if (hasTs)
|
|
61
|
-
await ensureTsxRegistered();
|
|
62
43
|
const rules = [];
|
|
63
44
|
for (const file of files) {
|
|
64
45
|
try {
|
package/bin/index.mjs
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pr-shepherd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Ong",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
9
|
-
"pr-shepherd": "bin/
|
|
9
|
+
"pr-shepherd": "bin/index.mjs"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"bin/**",
|
|
@@ -20,11 +20,10 @@
|
|
|
20
20
|
"LICENSE"
|
|
21
21
|
],
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=22.
|
|
23
|
+
"node": ">=22.18.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"picomatch": "^4.0.4",
|
|
27
|
-
"tsx": "^4.22.4",
|
|
28
27
|
"yaml": "^2.7.0"
|
|
29
28
|
},
|
|
30
29
|
"exports": {
|
package/bin/pr-shepherd
DELETED