@vzn/vx-ci 0.0.633 → 0.0.635

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
@@ -1,6 +1,8 @@
1
1
  # @vzn/vx-ci
2
2
 
3
- GitHub Actions integration for [`@vzn/vx`](https://github.com/vznjs/vx) — a
3
+ Website: <https://vznjs.github.io/vx/> · this plugin: <https://vznjs.github.io/vx/plugins/vx-ci/> · source: <https://github.com/vznjs/vx>
4
+
5
+ GitHub Actions integration for [`@vzn/vx`](https://vznjs.github.io/vx/) — a
4
6
  telemetry plugin that writes every `vx run` as a **job summary** on the
5
7
  workflow run page.
6
8
 
@@ -29,8 +31,9 @@ that never became ready as `never ready (timed out)`, a sandboxed task's
29
31
  violation count, and the tasks each failure blocked. A footer line
30
32
  names the vx version, the command (what follows `--` counted, not
31
33
  quoted), tasks passed and outputs restored.
32
- Anywhere else — laptops, other CI — the plugin **declines** and costs
33
- nothing, so declaring it unconditionally is safe.
34
+ Anywhere else (`GITHUB_ACTIONS` not `true`: laptops, other CI)
35
+ `github()` returns `undefined`, which `plugins` skips: no option is
36
+ checked and nothing loads, so declaring it unconditionally is safe.
34
37
 
35
38
  ## Options
36
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx-ci",
3
- "version": "0.0.633",
3
+ "version": "0.0.635",
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.633"
36
+ "@vzn/vx": "^0.0.635"
37
37
  },
38
38
  "repository": {
39
39
  "type": "git",
package/src/plugin.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  // The `github()` telemetry plugin. Contributes one observe-only sink that
2
- // writes the run as a GitHub Actions job summary. Declines (returns
3
- // undefined) outside GitHub Actions — no `GITHUB_STEP_SUMMARY` file to write
4
- // and no cost — so declaring `github()` is safe in every environment, the
5
- // same decline pattern as `otel()`.
2
+ // writes the run as a GitHub Actions job summary. Off Actions
3
+ // (`GITHUB_ACTIONS` not 'true') the factory returns undefined, which
4
+ // `plugins` skips: no option check, no hook, no load, so declaring
5
+ // `github()` costs nothing on a laptop.
6
6
  import { appendFile, stat } from 'node:fs/promises'
7
7
  import { createRequire } from 'node:module'
8
8
  import {
@@ -83,7 +83,8 @@ const GITHUB_PLUGIN_KEYS: PluginOptionKinds<GithubPluginOptions> = {
83
83
  sizeOf: 'function',
84
84
  }
85
85
 
86
- export function github(options: GithubPluginOptions = {}): VxPlugin {
86
+ export function github(options: GithubPluginOptions = {}): VxPlugin | undefined {
87
+ if (process.env['GITHUB_ACTIONS'] !== 'true') return undefined
87
88
  refuseUnknownOptions('github()', options, GITHUB_PLUGIN_KEYS)
88
89
  // '' passes the kind check but reads wrong: `??` keeps it, so summaryFile
89
90
  // declined instead of using GITHUB_STEP_SUMMARY, checkName POSTed a name