@vzn/vx-ci 0.0.612 → 0.0.614

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/plugin.ts +14 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx-ci",
3
- "version": "0.0.612",
3
+ "version": "0.0.614",
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.612"
36
+ "@vzn/vx": "^0.0.614"
37
37
  },
38
38
  "repository": {
39
39
  "type": "git",
package/src/plugin.ts CHANGED
@@ -5,7 +5,13 @@
5
5
  // same decline pattern as `otel()`.
6
6
  import { appendFile, stat } from 'node:fs/promises'
7
7
  import { createRequire } from 'node:module'
8
- import { refuseUnknownOptions, type PluginOptionKinds, definePlugin, type VxPlugin } from '@vzn/vx'
8
+ import {
9
+ refuseUnknownOptions,
10
+ type PluginOptionKinds,
11
+ definePlugin,
12
+ UserError,
13
+ type VxPlugin,
14
+ } from '@vzn/vx'
9
15
  import type { FetchFn } from './checks.js'
10
16
  import { githubCacheScope } from './cache-scope.js'
11
17
 
@@ -79,6 +85,13 @@ const GITHUB_PLUGIN_KEYS: PluginOptionKinds<GithubPluginOptions> = {
79
85
 
80
86
  export function github(options: GithubPluginOptions = {}): VxPlugin {
81
87
  refuseUnknownOptions('github()', options, GITHUB_PLUGIN_KEYS)
88
+ // '' passes the kind check but reads wrong: `??` keeps it, so summaryFile
89
+ // declined instead of using GITHUB_STEP_SUMMARY, checkName POSTed a name
90
+ // GitHub refuses (422) and title rendered an empty heading.
91
+ for (const key of ['summaryFile', 'title', 'checkName'] as const) {
92
+ if (options[key] === '')
93
+ throw new UserError(`github() option "${key}" must be a non-empty string, got ""`)
94
+ }
82
95
  return definePlugin(import.meta, {
83
96
  async config(workspace) {
84
97
  if (options.cacheScope === false || workspace.cacheScope !== undefined) return