@nx/rspack 20.5.0-rc.3 → 20.5.0-rc.4

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "20.5.0-rc.3",
4
+ "version": "20.5.0-rc.4",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/js": "20.5.0-rc.3",
28
- "@nx/devkit": "20.5.0-rc.3",
29
- "@nx/web": "20.5.0-rc.3",
30
- "@nx/module-federation": "20.5.0-rc.3",
27
+ "@nx/js": "20.5.0-rc.4",
28
+ "@nx/devkit": "20.5.0-rc.4",
29
+ "@nx/web": "20.5.0-rc.4",
30
+ "@nx/module-federation": "20.5.0-rc.4",
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "@rspack/core": "^1.1.5",
33
33
  "@rspack/dev-server": "^1.0.9",
@@ -1,24 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
- const devkit_1 = require("@nx/devkit");
5
4
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
6
  async function normalizeOptions(host, options) {
7
- await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'application');
8
- const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
7
+ await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
8
+ const { projectName, projectRoot: appProjectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
9
9
  ...options,
10
10
  projectType: 'application',
11
11
  });
12
12
  // --monorepo takes precedence over --rootProject
13
13
  // This won't be needed once we add --bundler=rspack to the @nx/react:app preset
14
14
  const rootProject = !options.monorepo && options.rootProject;
15
- const e2eProjectName = options.rootProject
16
- ? 'e2e'
17
- : `${(0, devkit_1.names)(appProjectName).fileName}-e2e`;
15
+ const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
16
+ const appProjectName = !isTsSolutionSetup || options.name ? projectName : importPath;
17
+ const e2eProjectName = options.rootProject ? 'e2e' : `${projectName}-e2e`;
18
18
  const normalized = {
19
19
  ...options,
20
20
  rootProject,
21
- name: (0, devkit_1.names)(options.name).fileName,
21
+ name: appProjectName,
22
22
  projectName: appProjectName,
23
23
  appProjectRoot,
24
24
  e2eProjectName,