@vzn/vx-ci 0.0.637 → 0.0.639

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
@@ -74,11 +74,6 @@ and renders + appends the markdown in `flush()` — it holds no run handle,
74
74
  streams no per-event records (`wants: []`), and a slow or failing write can
75
75
  never fail or stall the run (core's crash-isolation + flush deadline).
76
76
 
77
- Core's manual path still exists without this plugin:
78
- `vx run --report=markdown --report-file "$GITHUB_STEP_SUMMARY"` writes a
79
- plain table. The plugin's summary is richer (verdict, stats, failure
80
- callouts) and automatic on every run.
81
-
82
77
  ## The PR check run
83
78
 
84
79
  With `GITHUB_TOKEN` in the environment (plus `GITHUB_REPOSITORY` /
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx-ci",
3
- "version": "0.0.637",
3
+ "version": "0.0.639",
4
4
  "license": "MIT",
5
5
  "description": "GitHub Actions integration for vx — a telemetry plugin that writes the run as a GitHub Actions job summary.",
6
6
  "keywords": [
@@ -33,7 +33,7 @@
33
33
  "access": "public"
34
34
  },
35
35
  "peerDependencies": {
36
- "@vzn/vx": "^0.0.637"
36
+ "@vzn/vx": "^0.0.639"
37
37
  },
38
38
  "repository": {
39
39
  "type": "git",
package/src/summary.ts CHANGED
@@ -1,12 +1,7 @@
1
1
  // Pure markdown rendering: RunSummaryRecord -> a GitHub Actions job summary.
2
- // Purpose-built for the job-summary surface (verdict headline, stats line,
3
- // failures called out above the table) rather than reusing core's
4
- // `--report=markdown` table — a job summary is a landing page, not a cell
5
- // grid. `escapeMarkdownCell` comes from core's façade: task names are the
6
- // same unvalidated strings core renders, and the old cloud job summary
7
- // shipped without the escape once already.
2
+ // A job summary is a landing page (verdict headline, stats line, failures
3
+ // called out above the table), not a cell grid.
8
4
  import {
9
- escapeMarkdownCell,
10
5
  exitSignal,
11
6
  isCacheHit,
12
7
  isPassStatus,
@@ -84,6 +79,19 @@ export function truncateUtf8(text: string, maxBytes: number, suffix: string): st
84
79
  return new TextDecoder().decode(bytes.subarray(0, end)) + suffix
85
80
  }
86
81
 
82
+ /**
83
+ * `value` as one table cell: task names are unvalidated, and the old cloud
84
+ * job summary shipped without the escape once. A pipe splits the row unless
85
+ * an ODD run of backslashes precedes it (GFM reads `\\` as one escaped
86
+ * backslash), so a pipe after an odd run is already escaped. A lone `\r`
87
+ * ends a line too.
88
+ */
89
+ function escapeMarkdownCell(value: string): string {
90
+ return value
91
+ .replace(/(\\*)\|/g, (pipe, run: string) => (run.length % 2 === 0 ? `${run}\\|` : pipe))
92
+ .replace(/\r\n|\r|\n/g, ' ')
93
+ }
94
+
87
95
  /**
88
96
  * A task id as inline markdown: `a#*x*` rendered as `a#` and an italic
89
97
  * `x` (item 1058). Table cells escape their pipes on top of this.