@nx/workspace 24.0.6 → 24.1.0-beta.1

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.
@@ -8,7 +8,7 @@ const devkit_1 = require("@nx/devkit");
8
8
  function updateBuildTargets(tree, schema) {
9
9
  (0, devkit_1.getProjects)(tree).forEach((projectConfig, project) => {
10
10
  let changed = false;
11
- Object.entries(projectConfig.targets || {}).forEach(([target, targetConfig]) => {
11
+ Object.entries(projectConfig.targets || {}).forEach(([, targetConfig]) => {
12
12
  changed =
13
13
  updateJsonValue(targetConfig, (value) => {
14
14
  const [project, target, configuration] = value.split(':');
@@ -35,9 +35,11 @@ function updateJsonValue(config, callback) {
35
35
  }
36
36
  }
37
37
  else if (Array.isArray(value)) {
38
- value.forEach((x, idx) => recur(value, idx, x));
38
+ value.forEach((x, idx) => {
39
+ changed = recur(value, idx, x) || changed;
40
+ });
39
41
  }
40
- else if (typeof value === 'object') {
42
+ else if (value && typeof value === 'object') {
41
43
  Object.entries(value).forEach(([k, v]) => {
42
44
  changed = recur(value, k, v) || changed;
43
45
  });
@@ -82,7 +82,6 @@ function generatePreset(host, opts) {
82
82
  stdio: 'inherit',
83
83
  cwd: newWorkspaceRoot,
84
84
  };
85
- const pmc = (0, devkit_1.getPackageManagerCommand)();
86
85
  const nxInstallationPaths = (0, internal_1.getNxRequirePaths)(newWorkspaceRoot);
87
86
  const nxBinForNewWorkspaceRoot = require.resolve('nx/bin/nx', {
88
87
  paths: nxInstallationPaths,
@@ -250,7 +250,6 @@ async function createReadme(tree, { name, appName, directory, preset, nxCloud, w
250
250
  const formattedNames = (0, devkit_1.names)(name);
251
251
  // default to an empty one for custom presets
252
252
  const presetInfo = presetToPluginMap[preset] ?? {
253
- package: '',
254
253
  generateLibCmd: null,
255
254
  };
256
255
  const nxCloudOnboardingUrl = nxCloudToken
@@ -12,7 +12,7 @@ function checkProjectIsSafeToRemove(tree, schema, project) {
12
12
  return;
13
13
  }
14
14
  const containedProjects = [];
15
- for (const [_, p] of (0, devkit_1.getProjects)(tree)) {
15
+ for (const [, p] of (0, devkit_1.getProjects)(tree)) {
16
16
  if (project.name !== p.name &&
17
17
  !(0, devkit_1.normalizePath)((0, path_1.relative)(project.root, p.root)).startsWith('..')) {
18
18
  containedProjects.push(p.name);
@@ -48,20 +48,20 @@ async function checkTargets(tree, schema) {
48
48
  }
49
49
  }
50
50
  function checkIfProjectIsUsed(config, callback) {
51
- function recur(obj, key, value) {
51
+ function recur(value) {
52
52
  if (typeof value === 'string') {
53
53
  callback(value);
54
54
  }
55
55
  else if (Array.isArray(value)) {
56
- value.forEach((x, idx) => recur(value, idx, x));
56
+ value.forEach((x) => recur(x));
57
57
  }
58
58
  else if (typeof value === 'object') {
59
- Object.entries(value).forEach(([k, v]) => {
60
- recur(value, k, v);
59
+ Object.entries(value).forEach(([, v]) => {
60
+ recur(v);
61
61
  });
62
62
  }
63
63
  }
64
- Object.entries(config).forEach(([k, v]) => {
65
- recur(config, k, v);
64
+ Object.entries(config).forEach(([, v]) => {
65
+ recur(v);
66
66
  });
67
67
  }
package/generators.json CHANGED
@@ -6,7 +6,6 @@
6
6
  "factory": "./dist/src/generators/preset/preset#presetGenerator",
7
7
  "schema": "./dist/src/generators/preset/schema.json",
8
8
  "description": "Create application in an empty workspace.",
9
- "x-use-standalone-layout": true,
10
9
  "hidden": true
11
10
  },
12
11
  "move": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/workspace",
3
- "version": "24.0.6",
3
+ "version": "24.1.0-beta.1",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "files": [
@@ -78,17 +78,17 @@
78
78
  }
79
79
  },
80
80
  "dependencies": {
81
- "@nx/devkit": "24.0.6",
81
+ "@nx/devkit": "24.1.0-beta.1",
82
82
  "@zkochan/js-yaml": "0.0.7",
83
83
  "chalk": "^4.1.0",
84
84
  "picomatch": "^4.0.7",
85
85
  "semver": "^7.6.3",
86
86
  "tslib": "^2.3.0",
87
87
  "yargs-parser": "21.1.1",
88
- "nx": "24.0.6"
88
+ "nx": "24.1.0-beta.1"
89
89
  },
90
90
  "devDependencies": {
91
- "nx": "24.0.6"
91
+ "nx": "24.1.0-beta.1"
92
92
  },
93
93
  "publishConfig": {
94
94
  "access": "public"