Skip to content

Commit

Permalink
cleanup(devkit): prevent mutating targetDefaults in migration to crys…
Browse files Browse the repository at this point in the history
…tal helper (#26316)

<!-- 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` -->

## Current Behavior
<!-- This is the behavior we have today -->

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

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

Fixes #
  • Loading branch information
leosvelperez authored Jun 3, 2024
1 parent adc1d70 commit 030ede2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,9 @@ class ExecutorToPluginMigrator<T> {
}

#getTargetDefaultsForExecutor() {
this.#targetDefaultsForExecutor =
this.#nxJson.targetDefaults?.[this.#executor];
this.#targetDefaultsForExecutor = structuredClone(
this.#nxJson.targetDefaults?.[this.#executor]
);
}

#getCreatedTargetForProjectRoot(targetName: string, projectRoot: string) {
Expand Down

0 comments on commit 030ede2

Please sign in to comment.