Skip to content

[rush] Add --node-diagnostic-dir=DIR parameter #5099

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

Merged
merged 4 commits into from
Feb 7, 2025

Conversation

dmichon-msft
Copy link
Contributor

Summary

Adds a new command line parameter --node-diagnostic-dir=DIR that, when specified, tells all child processes to write their NodeJS diagnostic output to ${DIR}/${packageName}/${phaseIdentifier} so that information about package and phase is preserved without polluting the main tree.

Details

Added a new phased command hook createEnvironmentForOperation that can be used to modify the environment variables that will be used for an Operation's execution. Note that this hook is executed during createOperations, and so does not have access to any information that is produced after that point, e.g. the list of tracked files on the system.

How it was tested

Local invocation with NODE_OPTIONS=--heap-prof and --node-diagnostic-dir=/workspaces/temp on my codespace produced a tree of .heapprofile files.

Impacted documentation

CLI docs

@dmichon-msft dmichon-msft merged commit ad9aba9 into microsoft:main Feb 7, 2025
5 checks passed
@dmichon-msft dmichon-msft deleted the cpu-profiler-plugin branch February 7, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants