@nx/angular-rspack 20.8.0 → 20.8.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.
@@ -344,15 +344,25 @@ async function getProject(root) {
344
344
  return undefined;
345
345
  }
346
346
  const projectGraph = await (0, graph_1.retrieveOrCreateProjectGraph)();
347
- (0, node_assert_1.default)(projectGraph, 'Cannot find the project. Please make sure to run this task with the Nx CLI and set "root" to a directory contained in a project.');
348
347
  let projectName = process.env.NX_TASK_TARGET_PROJECT;
349
- if (!projectName) {
350
- const projectRootMappings = createProjectRootMappings(projectGraph.nodes);
351
- projectName =
352
- (0, find_project_for_path_1.findProjectForPath)(node_path_1.posix.relative(devkit_1.workspaceRoot, root), projectRootMappings) ?? undefined;
348
+ if (projectGraph) {
349
+ if (!projectName) {
350
+ const projectRootMappings = createProjectRootMappings(projectGraph.nodes);
351
+ projectName =
352
+ (0, find_project_for_path_1.findProjectForPath)(node_path_1.posix.relative(devkit_1.workspaceRoot, root), projectRootMappings) ?? undefined;
353
+ }
354
+ if (projectName) {
355
+ return projectGraph.nodes[projectName];
356
+ }
353
357
  }
354
- (0, node_assert_1.default)(projectName, 'Cannot find the project. Please make sure to run this task with the Nx CLI and set "root" to a directory contained in a project.');
355
- return projectGraph.nodes[projectName];
358
+ return {
359
+ name: undefined,
360
+ data: {
361
+ name: undefined,
362
+ root: root,
363
+ sourceRoot: undefined,
364
+ },
365
+ };
356
366
  }
357
367
  function createProjectRootMappings(nodes) {
358
368
  const projectRootMappings = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular-rspack",
3
- "version": "20.8.0",
3
+ "version": "20.8.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -64,7 +64,7 @@
64
64
  "tslib": "^2.3.0",
65
65
  "webpack-merge": "^6.0.1",
66
66
  "ws": "^8.18.0",
67
- "@nx/angular-rspack-compiler": "20.8.0"
67
+ "@nx/angular-rspack-compiler": "20.8.1"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@code-pushup/models": "^0.63.0",