@nx/react 16.5.0-beta.3 → 16.5.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.
- package/migrations.json +9 -0
- package/package.json +7 -7
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +18 -2
- package/src/executors/module-federation-dev-server/schema.json +1 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +17 -1
- package/src/executors/module-federation-ssr-dev-server/schema.json +1 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
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.
|
|
3
|
+
"version": "16.5.1",
|
|
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.
|
|
35
|
-
"@nx/devkit": "16.5.
|
|
36
|
-
"@nx/js": "16.5.
|
|
37
|
-
"@nx/linter": "16.5.
|
|
38
|
-
"@nx/web": "16.5.
|
|
34
|
+
"@nrwl/react": "16.5.1",
|
|
35
|
+
"@nx/devkit": "16.5.1",
|
|
36
|
+
"@nx/js": "16.5.1",
|
|
37
|
+
"@nx/linter": "16.5.1",
|
|
38
|
+
"@nx/web": "16.5.1",
|
|
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": "
|
|
49
|
+
"gitHead": "7b7f1e7f72a34cb31cff43ea0ebb80d0eab1ac79"
|
|
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)(
|
|
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
|
-
|
|
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.
|
|
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": {
|
package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js
CHANGED
|
@@ -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
|
|
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.
|
|
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": {
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -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.
|
|
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";
|
package/src/utils/versions.js
CHANGED
|
@@ -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.
|
|
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';
|