Skip to content

feat(devkit): add aggregateLog util for executor to plugin migration#26523

Merged
Coly010 merged 1 commit intomasterfrom
migration/aggregate-log-util
Jun 13, 2024
Merged

feat(devkit): add aggregateLog util for executor to plugin migration#26523
Coly010 merged 1 commit intomasterfrom
migration/aggregate-log-util

Conversation

@Coly010
Copy link
Copy Markdown
Contributor

@Coly010 Coly010 commented Jun 12, 2024

Current Behavior

There is no way to aggregate logs and output at the end of execution for the executor to plugin migrations

Expected Behavior

There should be a way to aggregate logs and output them at the end of execution

Usage:

// Call with the executorName that is being migrated
// Make sure the log itself does not contain dynamic values
// Add the project root that is being migrated

aggregateLog({executorName: '@nx/vite:build', project: projectRoot, log: 'Encountered X in project.json. Do Y to handle this manually.'})

// Then in GeneratorCallback run a task
return () => { flushLogs() };

Example Output
image

Related Issue(s)

Fixes #

@Coly010 Coly010 requested a review from a team as a code owner June 12, 2024 10:35
@Coly010 Coly010 self-assigned this Jun 12, 2024
@Coly010 Coly010 requested a review from AgentEnder June 12, 2024 10:35
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 12, 2024

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

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2024 4:49pm

@Coly010 Coly010 force-pushed the migration/aggregate-log-util branch from bb71447 to d1078ce Compare June 12, 2024 18:21
@Coly010 Coly010 enabled auto-merge (squash) June 12, 2024 18:46
Comment thread packages/devkit/src/generators/plugin-migrations/aggregate-log-util.ts Outdated
Comment thread packages/devkit/src/generators/plugin-migrations/aggregate-log-util.ts Outdated
@Coly010 Coly010 force-pushed the migration/aggregate-log-util branch from d1078ce to 4beeb23 Compare June 13, 2024 15:02
@Coly010 Coly010 requested a review from FrozenPandaz June 13, 2024 15:03
@Coly010 Coly010 force-pushed the migration/aggregate-log-util branch from 4beeb23 to d3d6f7e Compare June 13, 2024 15:04
@Coly010 Coly010 force-pushed the migration/aggregate-log-util branch from d3d6f7e to c332cb5 Compare June 13, 2024 16:47
@Coly010 Coly010 merged commit 364198f into master Jun 13, 2024
@Coly010 Coly010 deleted the migration/aggregate-log-util branch June 13, 2024 17:31
@github-actions
Copy link
Copy Markdown
Contributor

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 Jun 19, 2024
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.

2 participants