@nx/devkit 17.2.0-beta.10 → 17.2.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/devkit",
3
- "version": "17.2.0-beta.10",
3
+ "version": "17.2.0-beta.12",
4
4
  "private": false,
5
5
  "description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more. Learn more about [extending Nx by leveraging the Nx Devkit](https://nx.dev/extending-nx/intro/getting-started) on our docs.",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "tmp": "~0.2.1",
35
35
  "tslib": "^2.3.0",
36
36
  "semver": "7.5.3",
37
- "@nrwl/devkit": "17.2.0-beta.10"
37
+ "@nrwl/devkit": "17.2.0-beta.12"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "nx": ">= 16 <= 18"
@@ -71,7 +71,7 @@ function removeConfigurationDefinedByPlugin(targetName, targetFromProjectConfig,
71
71
  }
72
72
  // Options
73
73
  for (const [optionName, optionValue] of Object.entries(targetFromProjectConfig.options ?? {})) {
74
- if (targetFromCreateNodes.options[optionName] === optionValue) {
74
+ if (equals(targetFromCreateNodes.options[optionName], optionValue)) {
75
75
  delete targetFromProjectConfig.options[optionName];
76
76
  }
77
77
  }
@@ -97,6 +97,15 @@ function removeConfigurationDefinedByPlugin(targetName, targetFromProjectConfig,
97
97
  delete projectConfig.targets[targetName];
98
98
  }
99
99
  }
100
+ function equals(a, b) {
101
+ if (Array.isArray(a) && Array.isArray(b)) {
102
+ return a.length === b.length && a.every((v, i) => v === b[i]);
103
+ }
104
+ if (typeof a === 'object' && typeof b === 'object') {
105
+ return hashObject(a) === hashObject(b);
106
+ }
107
+ return a === b;
108
+ }
100
109
  function shouldRemoveArrayProperty(arrayValuesFromProjectConfiguration, arrayValuesFromCreateNodes) {
101
110
  const setOfArrayValuesFromProjectConfiguration = new Set(arrayValuesFromProjectConfiguration);
102
111
  loopThroughArrayValuesFromCreateNodes: for (const arrayValueFromCreateNodes of arrayValuesFromCreateNodes) {