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

feat(core): add prefixColor property to @nx:run-commands #29348

Merged
merged 5 commits into from
Jan 28, 2025

Conversation

nc1z
Copy link
Contributor

@nc1z nc1z commented Dec 13, 2024

Current Behavior

Running tasks in parallel, we can set prefixes. However, there is no way to label our prefixes with colors. Currently the only way is to set the entire line to the color we want. This is not ideal as users may want to keep the default colors for the logs and only want to use the prefix colors as identifiers.

Expected Behavior

PR to add this option

Screenshots (Examples)

Tested with example screenshots below

Before (v20.2.2 latest release)

description

image

This PR (local release)

description

image

Related Issue(s)

Fixes #

Copy link

vercel bot commented Dec 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Dec 26, 2024 2:11am

Copy link

nx-cloud bot commented Dec 13, 2024

View your CI Pipeline Execution ↗ for commit 86fbdd3.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 33m 39s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 59s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx format:check --base=fbd3d... ✅ Succeeded 20s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 19s View ↗
nx documentation --no-dte ✅ Succeeded 1m 2s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-26 02:47:24 UTC

@nc1z nc1z changed the title feat(core): add prefixColor property to run-commands feat(core): add prefixColor property to @nx:run-commands Dec 13, 2024
@nc1z nc1z force-pushed the feat/run-commands-prefix-color branch from 6404389 to a16f58c Compare December 13, 2024 16:41
@nc1z nc1z marked this pull request as ready for review December 13, 2024 16:41
@nc1z nc1z requested review from a team as code owners December 13, 2024 16:41
@nc1z
Copy link
Contributor Author

nc1z commented Dec 14, 2024

Update PR description with images tested with local release vs latest release.

Build/CI should pass once nx run e2e-release:e2e-ci--src/circular-dependencies.test.ts is fixed

Copy link

nx-cloud bot commented Dec 17, 2024

Your CI Pipeline Execution ↗ for commit b85afe1 is in progress ⏳

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 43m 35s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check --base=ee4de... ✅ Succeeded 18s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 17s View ↗
nx documentation --no-dte ✅ Succeeded 1m 4s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-17 12:00:03 UTC

@AgentEnder AgentEnder merged commit 5aec542 into nrwl:master Jan 28, 2025
5 checks passed
FrozenPandaz pushed a commit that referenced this pull request Jan 28, 2025
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
Running tasks in parallel, we can set prefixes. However, there is no way
to label our prefixes with colors. Currently the only way is to set the
entire line to the color we want. This is not ideal as users may want to
keep the default colors for the logs and only want to use the prefix
colors as identifiers.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
PR to add this option

## Screenshots (Examples)

Tested with example screenshots below

### Before (v20.2.2 latest release)
<img
src="https://github.com/user-attachments/assets/dcc9b3fa-1977-4096-9dd2-3b111570c8cd"
alt="description" width="300" />

![image](https://github.com/user-attachments/assets/f25569a9-98e2-48f7-b61f-9f2a867b9882)

### This PR (local release)
<img
src="https://github.com/user-attachments/assets/6dc9eb3a-bc83-49cd-aad1-778b4f2eb354"
alt="description" width="300" />

![image](https://github.com/user-attachments/assets/f9594dec-4836-4cfd-9184-08edc0eae6a2)

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

---------

Co-authored-by: Isaac Mann <isaacplmann@users.noreply.github.com>
(cherry picked from commit 5aec542)
Copy link

github-actions bot commented Feb 3, 2025

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants