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

disable progress-estimator logging (for lerna run --stream build or CI) #689

Open
langpavel opened this issue Apr 19, 2020 · 3 comments · May be fixed by #942
Open

disable progress-estimator logging (for lerna run --stream build or CI) #689

langpavel opened this issue Apr 19, 2020 · 3 comments · May be fixed by #942
Labels
kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core) topic: monorepo Related to Lerna monorepos

Comments

@langpavel
Copy link

langpavel commented Apr 19, 2020

In CI environment or with lerna run --stream build it is desired to not clean line. This is caused by fancy logger (from progress-estimator)

Current Behavior

Fancy progress estimator appear in console on tsdx build.
This is not as cool as it should be in some cases,
it may overwrites output of different process run in parallel i.e. with lerna --stream

Desired Behavior

Possibility to turn on no line-destructive logger

Suggested Solution

Replace fancy progress-estimator with primitive console.log if:

  • CI environment is detected process.env.CI
  • new flag --no-estimate is set
  • (non std-out output detected)

Who does this impact? Who is this for?

  • CI environments (possibly automatically on)
  • People using lerna --stream
@langpavel langpavel changed the title fix lerna --stream build output fix lerna run --stream build output Apr 19, 2020
@agilgur5 agilgur5 changed the title fix lerna run --stream build output disable progress-estimator logging (for lerna run --stream build or CI) Apr 20, 2020
@agilgur5 agilgur5 added kind: feature New feature or request topic: monorepo Related to Lerna monorepos labels Apr 20, 2020
@agilgur5
Copy link
Collaborator

agilgur5 commented Apr 21, 2020

This sounds like a reasonable feature to have. Alternatively, would a --silent config option work for you? All of TSDX's tests run in parallel as well and it makes for quite messy output, so I've been thinking of adding a silencing option for that alone.

--silent might be preferred for CI too (if you like clean logs). But yea we could check for non-TTY env (process.stdout.isTTY) or for CI env(process.env.CI) to auto-set this or a console.log option.

I'm not sure what a console.log alternative would be called; should be more generic than --no-estimate but I can't think of it off the top of my head (I feel like there's a term for this).

@langpavel
Copy link
Author

langpavel commented Apr 24, 2020

@agilgur5
--silent is not what I'm looking for. Build and test output is quite useful. (You may send everything to /dev/null and result will be the same :-) )

I'm not using tsdx test runner in monorepo, only in one package if needed (for monorepo I have global jest config)
Sad is all the fancy logging output without respect to stupid terminals and text logs.

I can possibly prepare PR with --no-estimate

@agilgur5 agilgur5 added the scope: integration Related to an integration, not necessarily to core (but could influence core) label Apr 26, 2020
@helt
Copy link

helt commented Jul 3, 2020

lerna uses a global --no-progress flag, hence i suppose to stick with their naming convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request scope: integration Related to an integration, not necessarily to core (but could influence core) topic: monorepo Related to Lerna monorepos
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants