Skip to content

[eas-cli] Print the eas-cli dependency notice only when stderr is a terminal - #4591

Open
vonovak wants to merge 1 commit into
mainfrom
vonovak/dependency-notice-tty
Open

vonovak wants to merge 1 commit into
mainfrom
vonovak/dependency-notice-tty

Conversation

@vonovak

@vonovak vonovak commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Why

When a project has eas-cli in its dependencies, eas-cli writes this notice to stderr before the command runs:

Found eas-cli in your project dependencies.
It's recommended to use the "cli.version" field in eas.json to enforce the eas-cli version for your project.
Learn more: https://github.com/expo/eas-cli#enforcing-eas-cli-version-for-your-project

The notice is advice for a person. A program that runs eas-cli reads stderr for the command's error, and it finds this notice first. In expo/expo-agent-cli, status --explain showed the notice as the reason that build:list failed.

This is the first of four stacked PRs that make eas-cli output easier for programs to read: #4591 (this PR) ← #4592 writes the failure reason to stderr ← #4593 prints a JSON error with --json ← #4594 adds error codes to it.

How

eas-cli prints the notice only when stderr is a terminal (process.stderr.isTTY is true). When stderr is a pipe or a file, eas-cli skips the notice and does not read package.json for it.

Who runs eas-cli stderr Notice
A person, in a terminal terminal printed, as before
A program that captures stderr pipe not printed
CI or EAS Build usually a pipe or a file not printed

Trade-off: CI logs and EAS Build logs no longer show the notice.

I did not use --non-interactive for this check. That flag stops prompts, but it does not tell who reads the output. A person can pass it in a terminal, and a program can run eas-cli without it.

LLM Authorship

  • Vojtech asked for this change after a review of expo/expo-agent-cli found the notice quoted as an error. Claude Code wrote the change.
  • An AI design review chose the TTY gate over --json or --non-interactive. An AI diff review found that the test failed when run in a terminal. The test now sets isTTY for every test in the file.

Test Plan

  • New unit test: with eas-cli in devDependencies, a call without a TTY prints nothing, and a later call with a TTY prints the notice. The test fails without the fix. It passes piped and in a terminal (script -q /dev/null yarn test ...).
  • Real run in a scratch project with eas-cli in devDependencies, stderr captured to a file: 24.12.1 printed the notice; this branch does not.
  • tsc, oxlint and oxfmt are clean.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.48%. Comparing base (4400b93) to head (7f317ab).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4591      +/-   ##
==========================================
+ Coverage   74.46%   74.48%   +0.02%     
==========================================
  Files        1029     1029              
  Lines       50390    50390              
  Branches    10891    10891              
==========================================
+ Hits        37519    37528       +9     
+ Misses      11881    11872       -9     
  Partials      990      990              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vonovak
vonovak added this pull request to stack #4595 October 9, 2026 19:52
@vonovak
vonovak marked this pull request as ready for review October 9, 2026 20:46
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
packages/eas-cli/** @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

@vonovak
vonovak requested a review from sjchmiela October 12, 2026 07:29
@sjchmiela
sjchmiela requested review from douglowder and removed request for sjchmiela October 12, 2026 07:31
@douglowder

Copy link
Copy Markdown
Contributor

eas-cli now uses changesets for changelogs (#4580). The required "Check for a changeset" check fails on PRs that edit CHANGELOG.md.

To update this PR:

  1. Revert the changes to CHANGELOG.md.
  2. Run yarn changeset, select the changed packages and the bump type, and write the summary.
  3. Commit the new file in .changeset/.

The release adds the PR link and the author to the entry. If this PR needs no changelog entry, revert the CHANGELOG.md changes and add the "no changelog" label.

…erminal

The notice is advice for a person. A program that runs eas-cli reads
stderr for the command's error and found this notice first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vonovak
vonovak force-pushed the vonovak/dependency-notice-tty branch from 6c3eff0 to 7f317ab Compare October 15, 2026 14:33
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

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