Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scripts, teraslice-cli, ts-transforms] Update execa from 5.1.0 to 9.4.0 #3767

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

busma13
Copy link
Contributor

@busma13 busma13 commented Sep 23, 2024

This PR makes the following changes:

  • Update execa from 5.1.0 to 9.4.0
  • Update import statements and commands
  • Add type check to exec() and runCli() commands to ensure string type is returned

Comment on lines +72 to +74
if (typeof stdout !== 'string') {
throw new Error('exec() requires ExecOpts that result in a stdout string. See the execa docs for details.');
}
Copy link
Contributor Author

@busma13 busma13 Sep 26, 2024

Choose a reason for hiding this comment

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

Depending on the ExecOpts passed into exec stdout could be any of 'string | string[] | Uint8Array | unknown[]'. We don't use any options that change the stdout return type and always expect a string, so I think this should be fine. Though the error message could be better

@busma13 busma13 marked this pull request as ready for review September 26, 2024 22:35
@busma13 busma13 requested review from godber and jsnoble September 26, 2024 22:35
Copy link
Member

@godber godber left a comment

Choose a reason for hiding this comment

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

I approve this, but I'm confused by your ternary.

packages/scripts/src/helpers/scripts.ts Show resolved Hide resolved
@godber godber merged commit 7c27d7d into master Sep 27, 2024
67 checks passed
@godber godber deleted the update-execa branch September 27, 2024 15:01
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