@nx/react 20.1.0-canary.20241011-37a7eb1 → 20.1.0-canary.20241015-1badac8

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/react",
3
- "version": "20.1.0-canary.20241011-37a7eb1",
3
+ "version": "20.1.0-canary.20241015-1badac8",
4
4
  "private": false,
5
5
  "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -38,11 +38,11 @@
38
38
  "minimatch": "9.0.3",
39
39
  "picocolors": "^1.1.0",
40
40
  "tslib": "^2.3.0",
41
- "@module-federation/enhanced": "0.6.6",
42
- "@nx/devkit": "20.1.0-canary.20241011-37a7eb1",
43
- "@nx/js": "20.1.0-canary.20241011-37a7eb1",
44
- "@nx/eslint": "20.1.0-canary.20241011-37a7eb1",
45
- "@nx/web": "20.1.0-canary.20241011-37a7eb1",
41
+ "@module-federation/enhanced": "0.6.9",
42
+ "@nx/devkit": "20.1.0-canary.20241015-1badac8",
43
+ "@nx/js": "20.1.0-canary.20241015-1badac8",
44
+ "@nx/eslint": "20.1.0-canary.20241015-1badac8",
45
+ "@nx/web": "20.1.0-canary.20241015-1badac8",
46
46
  "express": "^4.19.2",
47
47
  "http-proxy-middleware": "^3.0.0"
48
48
  },
@@ -8,7 +8,5 @@ function setupTspathForRemote(tree, options) {
8
8
  const project = (0, devkit_1.readProjectConfiguration)(tree, options.projectName);
9
9
  const exportPath = (0, maybe_js_1.maybeJs)(options, './src/remote-entry.ts');
10
10
  const exportName = 'Module';
11
- (0, js_1.addTsConfigPath)(tree, `${options.projectName}/${exportName}`, [
12
- (0, devkit_1.joinPathFragments)(project.root, exportPath),
13
- ]);
11
+ (0, js_1.addTsConfigPath)(tree, `${options.projectName.replace(/-/g, '_')}/${exportName}`, [(0, devkit_1.joinPathFragments)(project.root, exportPath)]);
14
12
  }
@@ -70,6 +70,14 @@ async function remoteGenerator(host, schema) {
70
70
  }
71
71
  }
72
72
  await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'application');
73
+ const REMOTE_NAME_REGEX = '^[a-zA-Z_$][a-zA-Z_$0-9]*$';
74
+ const remoteNameRegex = new RegExp(REMOTE_NAME_REGEX);
75
+ if (!remoteNameRegex.test(options.projectName)) {
76
+ throw new Error((0, devkit_1.stripIndents) `Invalid remote name: ${options.projectName}. Remote project names must:
77
+ - Start with a letter, dollar sign ($) or underscore (_)
78
+ - Followed by any valid character (letters, digits, underscores, or dollar signs)
79
+ The regular expression used is ${REMOTE_NAME_REGEX}.`);
80
+ }
73
81
  const initAppTask = await (0, application_1.default)(host, {
74
82
  ...options,
75
83
  name: options.projectName,
@@ -116,7 +124,10 @@ async function remoteGenerator(host, schema) {
116
124
  (0, add_remote_to_dynamic_host_1.addRemoteToDynamicHost)(host, options.projectName, options.devServerPort, pathToMFManifest);
117
125
  }
118
126
  (0, add_mf_env_to_inputs_1.addMfEnvToTargetDefaultInputs)(host);
119
- const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, {}, { '@module-federation/enhanced': versions_1.moduleFederationEnhancedVersion });
127
+ const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, {}, {
128
+ '@module-federation/enhanced': versions_1.moduleFederationEnhancedVersion,
129
+ '@nx/web': versions_1.nxVersion,
130
+ });
120
131
  tasks.push(installTask);
121
132
  if (!options.skipFormat) {
122
133
  await (0, devkit_1.formatFiles)(host);
@@ -37,7 +37,7 @@ export declare const isbotVersion = "^3.6.5";
37
37
  export declare const corsVersion = "~2.8.5";
38
38
  export declare const typesCorsVersion = "~2.8.12";
39
39
  export declare const moduleFederationNodeVersion = "~2.5.0";
40
- export declare const moduleFederationEnhancedVersion = "0.6.6";
40
+ export declare const moduleFederationEnhancedVersion = "0.6.9";
41
41
  export declare const lessVersion = "3.12.2";
42
42
  export declare const sassVersion = "^1.55.0";
43
43
  export declare const rollupPluginUrlVersion = "^8.0.2";
@@ -43,7 +43,7 @@ exports.isbotVersion = '^3.6.5';
43
43
  exports.corsVersion = '~2.8.5';
44
44
  exports.typesCorsVersion = '~2.8.12';
45
45
  exports.moduleFederationNodeVersion = '~2.5.0';
46
- exports.moduleFederationEnhancedVersion = '0.6.6';
46
+ exports.moduleFederationEnhancedVersion = '0.6.9';
47
47
  // style preprocessors
48
48
  exports.lessVersion = '3.12.2';
49
49
  exports.sassVersion = '^1.55.0';