@nx/react 16.5.0 → 16.6.0-beta.0

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/migrations.json CHANGED
@@ -950,6 +950,15 @@
950
950
  "alwaysAddToPackageJson": false
951
951
  }
952
952
  }
953
+ },
954
+ "16.5.0-beta.4": {
955
+ "version": "16.5.0-beta.4",
956
+ "packages": {
957
+ "@types/react": {
958
+ "version": "18.2.14",
959
+ "alwaysAddToPackageJson": false
960
+ }
961
+ }
953
962
  }
954
963
  }
955
964
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "16.5.0",
3
+ "version": "16.6.0-beta.0",
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, 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": {
@@ -31,11 +31,11 @@
31
31
  "migrations": "./migrations.json"
32
32
  },
33
33
  "dependencies": {
34
- "@nrwl/react": "16.5.0",
35
- "@nx/devkit": "16.5.0",
36
- "@nx/js": "16.5.0",
37
- "@nx/linter": "16.5.0",
38
- "@nx/web": "16.5.0",
34
+ "@nrwl/react": "16.6.0-beta.0",
35
+ "@nx/devkit": "16.6.0-beta.0",
36
+ "@nx/js": "16.6.0-beta.0",
37
+ "@nx/linter": "16.6.0-beta.0",
38
+ "@nx/web": "16.6.0-beta.0",
39
39
  "@phenomnomnominal/tsquery": "~5.0.1",
40
40
  "@svgr/webpack": "^8.0.1",
41
41
  "chalk": "^4.1.0",
@@ -46,5 +46,5 @@
46
46
  "access": "public"
47
47
  },
48
48
  "types": "./index.d.ts",
49
- "gitHead": "eaebcc34f92db2200dab0bde2e2e1dde107a47bf"
49
+ "gitHead": "5a7ffb93c9e84bffbf52f6ae9c6c1e3b8edb9d35"
50
50
  }
@@ -22,11 +22,27 @@ function moduleFederationDevServer(options, context) {
22
22
  catch (_c) {
23
23
  throw new Error(`Could not load ${moduleFederationConfigPath}. Was this project generated with "@nx/react:host"?\nSee: https://nx.dev/recipes/module-federation/faster-builds`);
24
24
  }
25
- const remotesToSkip = new Set((0, find_matching_projects_1.findMatchingProjects)((_a = options.skipRemotes) !== null && _a !== void 0 ? _a : [], context.projectGraph.nodes));
25
+ const remotesToSkip = new Set((_a = (0, find_matching_projects_1.findMatchingProjects)(options.skipRemotes, context.projectGraph.nodes)) !== null && _a !== void 0 ? _a : []);
26
+ if (remotesToSkip.size > 0) {
27
+ devkit_1.logger.info(`Remotes not served automatically: ${[...remotesToSkip.values()].join(', ')}`);
28
+ }
29
+ const remotesNotInWorkspace = [];
26
30
  const knownRemotes = ((_b = moduleFederationConfig.remotes) !== null && _b !== void 0 ? _b : []).filter((r) => {
27
31
  const validRemote = Array.isArray(r) ? r[0] : r;
28
- return !remotesToSkip.has(validRemote);
32
+ if (remotesToSkip.has(validRemote)) {
33
+ return false;
34
+ }
35
+ else if (!context.projectGraph.nodes[validRemote]) {
36
+ remotesNotInWorkspace.push(validRemote);
37
+ return false;
38
+ }
39
+ else {
40
+ return true;
41
+ }
29
42
  });
43
+ if (remotesNotInWorkspace.length > 0) {
44
+ devkit_1.logger.warn(`Skipping serving ${remotesNotInWorkspace.join(', ')} as they could not be found in the workspace. Ensure they are served correctly.`);
45
+ }
30
46
  const remotePorts = knownRemotes.map((r) => context.projectGraph.nodes[r].data.targets['serve'].options.port);
31
47
  const devServeApps = !options.devRemotes
32
48
  ? []
@@ -19,7 +19,7 @@
19
19
  "items": {
20
20
  "type": "string"
21
21
  },
22
- "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository.",
22
+ "description": "List of remote applications to not automatically serve, either statically or in development mode.",
23
23
  "x-priority": "important"
24
24
  },
25
25
  "buildTarget": {
@@ -22,7 +22,23 @@ function moduleFederationSsrDevServer(options, context) {
22
22
  throw new Error(`Could not load ${moduleFederationConfigPath}. Was this project generated with "@nx/react:host"?`);
23
23
  }
24
24
  const remotesToSkip = new Set((_a = options.skipRemotes) !== null && _a !== void 0 ? _a : []);
25
- const knownRemotes = ((_b = moduleFederationConfig.remotes) !== null && _b !== void 0 ? _b : []).filter((r) => !remotesToSkip.has(r));
25
+ const remotesNotInWorkspace = [];
26
+ const knownRemotes = ((_b = moduleFederationConfig.remotes) !== null && _b !== void 0 ? _b : []).filter((r) => {
27
+ const validRemote = Array.isArray(r) ? r[0] : r;
28
+ if (remotesToSkip.has(validRemote)) {
29
+ return false;
30
+ }
31
+ else if (!context.projectGraph.nodes[validRemote]) {
32
+ remotesNotInWorkspace.push(validRemote);
33
+ return false;
34
+ }
35
+ else {
36
+ return true;
37
+ }
38
+ });
39
+ if (remotesNotInWorkspace.length > 0) {
40
+ devkit_1.logger.warn(`Skipping serving ${remotesNotInWorkspace.join(', ')} as they could not be found in the workspace. Ensure they are served correctly.`);
41
+ }
26
42
  const devServeApps = !options.devRemotes
27
43
  ? []
28
44
  : Array.isArray(options.devRemotes)
@@ -35,7 +35,7 @@
35
35
  "items": {
36
36
  "type": "string"
37
37
  },
38
- "description": "List of remote applications to not automatically serve, either statically or in development mode. This can be useful for multi-repository module federation setups where the host application uses a remote application from an external repository.",
38
+ "description": "List of remote applications to not automatically serve, either statically or in development mode.",
39
39
  "x-priority": "important"
40
40
  },
41
41
  "host": {
@@ -13,7 +13,7 @@ const ct_utils_1 = require("../../utils/ct-utils");
13
13
  */
14
14
  function cypressComponentConfigGenerator(tree, options) {
15
15
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
16
- const { cypressComponentConfiguration: baseCyCtConfig } = (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
16
+ const { componentConfigurationGenerator: baseCyCtConfig } = (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
17
17
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
18
18
  const installTask = yield baseCyCtConfig(tree, {
19
19
  project: options.project,
@@ -5,7 +5,7 @@ export declare const reactDomVersion = "18.2.0";
5
5
  export declare const reactIsVersion = "18.2.0";
6
6
  export declare const swcLoaderVersion = "0.1.15";
7
7
  export declare const babelLoaderVersion = "^9.1.2";
8
- export declare const typesReactVersion = "18.2.13";
8
+ export declare const typesReactVersion = "18.2.14";
9
9
  export declare const typesReactDomVersion = "18.2.6";
10
10
  export declare const typesReactIsVersion = "18.2.1";
11
11
  export declare const typesNodeVersion = "18.14.2";
@@ -9,7 +9,7 @@ exports.reactDomVersion = '18.2.0';
9
9
  exports.reactIsVersion = '18.2.0';
10
10
  exports.swcLoaderVersion = '0.1.15';
11
11
  exports.babelLoaderVersion = '^9.1.2';
12
- exports.typesReactVersion = '18.2.13';
12
+ exports.typesReactVersion = '18.2.14';
13
13
  exports.typesReactDomVersion = '18.2.6';
14
14
  exports.typesReactIsVersion = '18.2.1';
15
15
  exports.typesNodeVersion = '18.14.2';