Skip to content

feat: add --summary-stderr/--summary-file to varlock load, improve execSyncVarlock API - #681

Merged
theoephraim merged 4 commits into
mainfrom
feat/load-summary-stderr
May 1, 2026
Merged

theoephraim merged 4 commits into
mainfrom
feat/load-summary-stderr

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Summary

  • Add --summary-stderr and --summary-file flags to varlock load so integrations can get a human-readable redacted summary alongside machine-readable JSON output
  • Add backwards-compatible fullResult option to execSyncVarlock that returns { stdout, stderr } and throws VarlockExecError on failure — the old string-return behavior is preserved by default
  • Migrate all integrations to use fullResult: true with explicit stderr handling
  • Summary flags are silently skipped when --format pretty (stdout already has the summary)

Motivation

When integrations call varlock load --format json-full, they get JSON on stdout but have no way to surface a human-readable summary to the developer. Previously execSyncVarlock discarded stderr on success entirely, and used showLogsOnError/exitOnError workarounds for error display.

Now integrations pass --summary-stderr to get the pretty summary on stderr, and use fullResult: true to access both streams with proper error typing via VarlockExecError.

Test plan

  • All 5 packages typecheck clean
  • Expo integration tests pass (28/28)
  • Smoke tests
  • Manual test with vite/next dev server

@pkg-pr-new

pkg-pr-new Bot commented May 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

varlock

npm i https://pkg.pr.new/varlock@681

@varlock/cloudflare-integration

npm i https://pkg.pr.new/@varlock/cloudflare-integration@681

@varlock/expo-integration

npm i https://pkg.pr.new/@varlock/expo-integration@681

@varlock/nextjs-integration

npm i https://pkg.pr.new/@varlock/nextjs-integration@681

@varlock/vite-integration

npm i https://pkg.pr.new/@varlock/vite-integration@681

commit: 164d48f

… improve execSyncVarlock API

Add `--summary-stderr` and `--summary-file` flags to `varlock load` so
integrations can get a human-readable redacted summary alongside
machine-readable JSON output. The summary flags are silently skipped
when `--format pretty` since stdout already contains the summary.

Add `fullResult` option to `execSyncVarlock` that returns `{ stdout, stderr }`
and throws `VarlockExecError` on failure, giving callers structured access
to both streams. The old string-return behavior is preserved by default
for backwards compatibility.

Migrate all integrations to use `fullResult: true` with explicit stderr
handling, replacing the old `showLogsOnError`/`exitOnError` options.
The hashFiles glob `swift/**` included .build/ artifacts on macOS runners,
producing a different hash than clean Ubuntu checkouts — so cache restores
never matched. Narrowed to Package.swift + Sources/** to stabilize the key.

Also: trigger native builds when their workflow YAML changes, fall back to
building when the cache misses (instead of failing), and use
needs.*.result to decide artifact-vs-cache in release-preview.
Integrations should not show the summary by default — only surface
errors on failure. The --summary-stderr flag is a CLI feature for
users and the GitHub Action to opt into.
@theoephraim
theoephraim force-pushed the feat/load-summary-stderr branch from 5a67719 to 164d48f Compare May 1, 2026 21:44
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

bumpy-frog

The changes in this PR will be included in the next version bump.

minor Minor releases

  • @varlock/cloudflare-integration 1.0.0 → 1.1.0
  • @varlock/expo-integration 1.0.0 → 1.1.0
  • @varlock/nextjs-integration 1.0.1 → 1.1.0
  • @varlock/vite-integration 1.0.1 → 1.1.0
  • varlock 1.0.0 → 1.1.0

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

@theoephraim
theoephraim merged commit 6df118f into main May 1, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant