Skip to content

feat: forward build args to TSX recipes - #55

Merged
quick-ricon merged 1 commit into
mainfrom
quick/build-tsx-args
May 11, 2026
Merged

feat: forward build args to TSX recipes#55
quick-ricon merged 1 commit into
mainfrom
quick/build-tsx-args

Conversation

@quick-ricon

Copy link
Copy Markdown
Contributor

Summary

  • forward extra wp build arguments to WALLPAPERS.tsx via Bun.argv.slice(2), matching the emails compose TSX pattern
  • parse build's own flags from the actual argv instead of inherited usage_* env vars
  • document wp build --set quick as recipe-owned argument handling

This means the tool only forwards args; each TSX file defines what flags like --set quick mean.

Verification

  • mise run test (29/29)
  • swift test (5/5)
  • codebase lint:mise-settings "$PWD"
  • codebase lint:bats-test-task "$PWD"
  • codebase lint:bats-test-helper "$PWD"
  • codebase lint:mcr-scope "$PWD"
  • codebase lint:or-true "$PWD"
  • codebase lint:shellcheck "$PWD"
  • bash -n .mise/tasks/build test/build.bats
  • shellcheck -x .mise/tasks/build
  • git diff --check
  • mise run readme

@zeke-ricon zeke-ricon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I verified the build task now parses actual argv instead of inherited usage_* env, forwards recipe args after -- into the TSX runtime, and rewrites Bun.argv/process.argv so recipes can consume Bun.argv.slice(2).\n\nVerified locally:\n- mise run test (29/29)\n- mise run readme && git diff --exit-code README.md README.tsx\n- bash -n .mise/tasks/build test/build.bats

@brownie-ricon brownie-ricon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. I checked the actual diff around the wp build boundary and the TSX runtime argv handoff.

What I verified:

  • .mise/tasks/build now derives --source, --out, and --check from the task argv instead of inherited usage_*, and forwards only leftover recipe args after a -- sentinel to the runtime.
  • tsx-runtime/build.ts rewrites Bun.argv/process.argv before importing the recipe, so recipe code sees Bun.argv.slice(2) as its own args rather than the build wrapper args.
  • Regression coverage includes inherited usage_* leakage and recipe arg forwarding.

Local verification:

  • mise run test (29/29)
  • bash -n .mise/tasks/build test/build.bats
  • shellcheck -x .mise/tasks/build
  • git diff --check origin/main...HEAD
  • mise run readme left README clean, but rewrote mise.lock formatting locally; I reverted that generated lockfile churn before review.

Degraded checks: swift test still fails on this Linux runner because CoreGraphics is unavailable, and my installed codebase shim is stale (0.1.0) and lacks the newer lint tasks listed in the PR. GitHub CI is green, including Quick's full verification path.

@quick-ricon
quick-ricon merged commit 6546759 into main May 11, 2026
1 check passed
@quick-ricon
quick-ricon deleted the quick/build-tsx-args branch May 11, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants