@erclx/canon 4.24.0 → 4.24.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "canon",
3
3
  "description": "Automated governance, versioning, and discovery tools for Claude Code.",
4
- "version": "4.24.0",
4
+ "version": "4.24.1",
5
5
  "author": {
6
6
  "name": "Eric Le",
7
7
  "url": "https://github.com/erclx"
@@ -58,7 +58,7 @@ A span anywhere in the bullet has to survive all of these:
58
58
  | No whitespace, `<`, `>`, `$`, `*`, `\|`, `?`, `^` | A backticked command, a placeholder, a glob, a pattern |
59
59
  | No `://` and no leading `/`, `~`, `@`, `#`, `!` | A URL, an absolute path, a module alias |
60
60
  | Contains `/` | A bare filename with no folder around it |
61
- | Extension starts with a letter, or ends with `/` | A dotted number such as an address |
61
+ | Not a dotted-decimal segment, or ends with `/` | A dotted number such as an address |
62
62
  | Not a single top-level folder | `src/`, which nobody claims to have rewritten whole |
63
63
  | A `file:line` span leads its bullet | A citation into a file the bullet is describing |
64
64
  | The region carries no no-change marker | A bullet recording a file it deliberately left alone |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erclx/canon",
3
3
  "type": "module",
4
- "version": "4.24.0",
4
+ "version": "4.24.1",
5
5
  "description": "Infrastructure and quality tooling for developer workflows",
6
6
  "license": "MIT",
7
7
  "bin": {
package/src/pr/paths.ts CHANGED
@@ -94,15 +94,18 @@ function isNotRepositoryPath(span: string): boolean {
94
94
  }
95
95
 
96
96
  /**
97
- * Whether the span's last segment carries a file extension.
97
+ * Whether the span's last segment is a bare dotted-decimal number, such as
98
+ * an address (`127.0.0.1`) or an unprefixed version number (`1.2.3`).
98
99
  *
99
- * The extension has to start with a letter, which is what keeps `127.0.0.1`
100
- * out. A bare dotted number reaching the comparison is the shape that put
101
- * `src/serve/127.0.0.1` in a report over a body that was correct.
100
+ * This is the one exclusion `resolveSpan` still applies to a non-directory
101
+ * span. A bare dotted number reaching the comparison is the shape that put
102
+ * `src/serve/127.0.0.1` in a report over a body that was correct, and every
103
+ * other segment carrying no extension, such as `.husky/post-merge`, now
104
+ * resolves.
102
105
  */
103
- function hasExtension(span: string): boolean {
106
+ function isDottedNumber(span: string): boolean {
104
107
  const segment = span.slice(span.lastIndexOf('/') + 1)
105
- return /\.[A-Za-z][A-Za-z0-9]*$/.test(segment)
108
+ return /^\d+(?:\.\d+)+$/.test(segment)
106
109
  }
107
110
 
108
111
  /** Blanks every backticked span so a cue search never fires inside one. */
@@ -285,7 +288,7 @@ function resolveSpan(span: string): ResolvedSpan | undefined {
285
288
  : { path: span, directory: true }
286
289
  }
287
290
 
288
- return hasExtension(span) ? { path: span, directory: false } : undefined
291
+ return isDottedNumber(span) ? undefined : { path: span, directory: false }
289
292
  }
290
293
 
291
294
  /**