Skip to content

refactor: remove redundant options param from copyConfigKeyEntry#7146

Merged
craigmichaelmartin merged 1 commit intomainfrom
remove-redundant-options-param-copy-config-key-entry
Apr 2, 2026
Merged

refactor: remove redundant options param from copyConfigKeyEntry#7146
craigmichaelmartin merged 1 commit intomainfrom
remove-redundant-options-param-copy-config-key-entry

Conversation

@craigmichaelmartin
Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

copyConfigKeyEntry accepted both a context: BuildContext (nested inside the config object) and a separate options: { stdout } parameter. Since context.options already carries stdout, the second parameter was redundant — every caller was passing context.options as the second argument anyway. The inconsistency was highlighted by a recent outputDebug call that reached for context.options.stdout instead of options.stdout.

Follow-up to #7142.

WHAT is this pull request doing?

  • Remove the options second parameter from copyConfigKeyEntry
  • Destructure stdout from context.options inside the function
  • Update the single call site in include-assets-step.ts
  • Update the test helper makeContext to include stdout in options, and remove the now-unnecessary second argument from all copyConfigKeyEntry test calls

How to test your changes?

Run the existing tests — no behaviour changes, pure refactor.

Measuring impact

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

🤖 Generated with Claude Code

@craigmichaelmartin craigmichaelmartin requested a review from a team as a code owner April 1, 2026 17:38
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@craigmichaelmartin craigmichaelmartin force-pushed the remove-redundant-options-param-copy-config-key-entry branch from 7c89405 to b648d38 Compare April 1, 2026 18:22
context.options already carries stdout, so the separate second
parameter was duplicating it — every caller was passing context.options
anyway. Pull stdout directly from context.options inside the function
and update the call site and tests accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@craigmichaelmartin craigmichaelmartin force-pushed the remove-redundant-options-param-copy-config-key-entry branch from b648d38 to b7797ab Compare April 1, 2026 18:29
@craigmichaelmartin craigmichaelmartin added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 4ed0ce1 Apr 2, 2026
26 checks passed
@craigmichaelmartin craigmichaelmartin deleted the remove-redundant-options-param-copy-config-key-entry branch April 2, 2026 08:49
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.

2 participants