@nx/workspace 21.3.0-canary.20250710-13551c9 → 21.3.0-canary.20250712-18e5d95

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/workspace",
3
- "version": "21.3.0-canary.20250710-13551c9",
3
+ "version": "21.3.0-canary.20250712-18e5d95",
4
4
  "private": false,
5
5
  "description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.",
6
6
  "repository": {
@@ -38,14 +38,14 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@nx/devkit": "21.3.0-canary.20250710-13551c9",
41
+ "@nx/devkit": "21.3.0-canary.20250712-18e5d95",
42
42
  "@zkochan/js-yaml": "0.0.7",
43
43
  "chalk": "^4.1.0",
44
44
  "enquirer": "~2.3.6",
45
45
  "picomatch": "4.0.2",
46
46
  "tslib": "^2.3.0",
47
47
  "yargs-parser": "21.1.1",
48
- "nx": "21.3.0-canary.20250710-13551c9"
48
+ "nx": "21.3.0-canary.20250712-18e5d95"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
@@ -40,7 +40,7 @@ function getNxTasksCommand(ci, packageManagerPrefix, mainBranch, hasTypecheck, h
40
40
  function getNxCloudFixCiCommand(packageManagerPrefix) {
41
41
  return {
42
42
  comments: [
43
- `Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ai`,
43
+ `Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci`,
44
44
  ],
45
45
  command: `${packageManagerPrefix} nx fix-ci`,
46
46
  alwaysRun: true,
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createProjectConfigurationInNewDestination = createProjectConfigurationInNewDestination;
4
4
  const devkit_1 = require("@nx/devkit");
5
+ const project_config_1 = require("../../utils/project-config");
5
6
  function createProjectConfigurationInNewDestination(tree, schema, projectConfig) {
6
7
  projectConfig.name = schema.newProjectName;
7
8
  const isRootProject = projectConfig.root === '.';
@@ -45,8 +46,9 @@ function createProjectConfigurationInNewDestination(tree, schema, projectConfig)
45
46
  }
46
47
  // Original sourceRoot is typically 'src' or 'app', but it could be any folder.
47
48
  // Make sure it is updated to be under the new destination.
48
- if (isRootProject && projectConfig.sourceRoot) {
49
- newProject.sourceRoot = (0, devkit_1.joinPathFragments)(schema.relativeToRootDestination, projectConfig.sourceRoot);
49
+ const sourceRoot = (0, project_config_1.getProjectSourceRoot)(projectConfig, tree);
50
+ if (isRootProject && sourceRoot) {
51
+ newProject.sourceRoot = (0, devkit_1.joinPathFragments)(schema.relativeToRootDestination, sourceRoot);
50
52
  }
51
53
  if (schema.isNxConfiguredInPackageJson) {
52
54
  // Update the existing project configuration in the package.json
@@ -8,6 +8,7 @@ const ts_config_1 = require("../../../utilities/ts-config");
8
8
  const typescript_1 = require("../../../utilities/typescript");
9
9
  const utils_1 = require("./utils");
10
10
  const ts_solution_setup_1 = require("../../../utilities/typescript/ts-solution-setup");
11
+ const project_config_1 = require("../../utils/project-config");
11
12
  let tsModule;
12
13
  /**
13
14
  * Updates all the imports in the workspace and modifies the tsconfig appropriately.
@@ -33,7 +34,7 @@ function updateImports(tree, schema, project) {
33
34
  let serverEntryPointImportPath;
34
35
  if (tree.exists(tsConfigPath)) {
35
36
  tsConfig = (0, devkit_1.readJson)(tree, tsConfigPath);
36
- const sourceRoot = project.sourceRoot ?? (0, devkit_1.joinPathFragments)(project.root, 'src');
37
+ const sourceRoot = (0, project_config_1.getProjectSourceRoot)(project, tree);
37
38
  mainEntryPointImportPath = Object.keys(tsConfig.compilerOptions?.paths ?? {}).find((path) => tsConfig.compilerOptions.paths[path].some((x) => x.startsWith(ensureTrailingSlash(sourceRoot))));
38
39
  secondaryEntryPointImportPaths = Object.keys(tsConfig.compilerOptions?.paths ?? {}).filter((path) => tsConfig.compilerOptions.paths[path].some((x) => x.startsWith(ensureTrailingSlash(project.root)) &&
39
40
  !x.startsWith(ensureTrailingSlash(sourceRoot))));
@@ -0,0 +1,2 @@
1
+ import { type ProjectConfiguration, type Tree } from '@nx/devkit';
2
+ export declare function getProjectSourceRoot(project: ProjectConfiguration, tree?: Tree): string;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProjectSourceRoot = getProjectSourceRoot;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const node_fs_1 = require("node:fs");
6
+ const node_path_1 = require("node:path");
7
+ function getProjectSourceRoot(project, tree) {
8
+ if (tree) {
9
+ return (project.sourceRoot ??
10
+ (tree.exists((0, devkit_1.joinPathFragments)(project.root, 'src'))
11
+ ? (0, devkit_1.joinPathFragments)(project.root, 'src')
12
+ : project.root));
13
+ }
14
+ return (project.sourceRoot ??
15
+ ((0, node_fs_1.existsSync)((0, node_path_1.join)(devkit_1.workspaceRoot, project.root, 'src'))
16
+ ? (0, devkit_1.joinPathFragments)(project.root, 'src')
17
+ : project.root));
18
+ }
@@ -1,4 +1,4 @@
1
1
  export declare const nxVersion: any;
2
2
  export declare const typescriptVersion = "~5.8.2";
3
- export declare const angularCliVersion = "~20.0.0";
3
+ export declare const angularCliVersion = "~20.1.0";
4
4
  export declare const angularRspackVersion = "^21.1.0";
@@ -5,5 +5,5 @@ exports.nxVersion = require('../../package.json').version;
5
5
  exports.typescriptVersion = '~5.8.2';
6
6
  // TODO: remove when preset generation is reworked and
7
7
  // deps are not installed from workspace
8
- exports.angularCliVersion = '~20.0.0';
8
+ exports.angularCliVersion = '~20.1.0';
9
9
  exports.angularRspackVersion = '^21.1.0';