@nx/react 21.4.0-canary.20250812-d2a0593 → 21.4.0-canary.20250813-811d184
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 +9 -9
- package/src/generators/application/lib/create-application-files.js +2 -2
- package/src/generators/component-story/component-story.d.ts.map +1 -1
- package/src/generators/component-story/component-story.js +2 -1
- package/src/generators/host/lib/add-module-federation-files.d.ts.map +1 -1
- package/src/generators/host/lib/add-module-federation-files.js +3 -2
- package/src/generators/library/lib/create-files.d.ts.map +1 -1
- package/src/generators/library/lib/create-files.js +3 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/react",
|
3
|
-
"version": "21.4.0-canary.
|
3
|
+
"version": "21.4.0-canary.20250813-811d184",
|
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,19 +38,19 @@
|
|
38
38
|
"minimatch": "9.0.3",
|
39
39
|
"picocolors": "^1.1.0",
|
40
40
|
"tslib": "^2.3.0",
|
41
|
-
"@nx/devkit": "21.4.0-canary.
|
42
|
-
"@nx/js": "21.4.0-canary.
|
43
|
-
"@nx/eslint": "21.4.0-canary.
|
44
|
-
"@nx/web": "21.4.0-canary.
|
45
|
-
"@nx/vite": "21.4.0-canary.
|
46
|
-
"@nx/module-federation": "21.4.0-canary.
|
47
|
-
"@nx/rollup": "21.4.0-canary.
|
41
|
+
"@nx/devkit": "21.4.0-canary.20250813-811d184",
|
42
|
+
"@nx/js": "21.4.0-canary.20250813-811d184",
|
43
|
+
"@nx/eslint": "21.4.0-canary.20250813-811d184",
|
44
|
+
"@nx/web": "21.4.0-canary.20250813-811d184",
|
45
|
+
"@nx/vite": "21.4.0-canary.20250813-811d184",
|
46
|
+
"@nx/module-federation": "21.4.0-canary.20250813-811d184",
|
47
|
+
"@nx/rollup": "21.4.0-canary.20250813-811d184",
|
48
48
|
"express": "^4.21.2",
|
49
49
|
"http-proxy-middleware": "^3.0.5",
|
50
50
|
"semver": "^7.6.3"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
|
-
"nx": "21.4.0-canary.
|
53
|
+
"nx": "21.4.0-canary.20250813-811d184"
|
54
54
|
},
|
55
55
|
"publishConfig": {
|
56
56
|
"access": "public"
|
@@ -221,10 +221,10 @@ function generateReactRouterFiles(tree, options, templateVariables) {
|
|
221
221
|
tree.write('.gitignore', `${gitignore}\n.cache\nbuild\npublic/build\n.env\n\.react-router\n`);
|
222
222
|
}
|
223
223
|
else {
|
224
|
-
(0, devkit_1.generateFiles)(tree, (0,
|
224
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, '../files/react-router-ssr/non-root'), options.appProjectRoot, templateVariables);
|
225
225
|
}
|
226
226
|
if (options.isUsingTsSolutionConfig) {
|
227
|
-
(0, devkit_1.generateFiles)(tree, (0,
|
227
|
+
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, '../files/react-router-ssr/ts-solution'), options.appProjectRoot, templateVariables);
|
228
228
|
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'package.json'), (json) => {
|
229
229
|
if (options.projectName !== options.importPath) {
|
230
230
|
json.nx = { name: options.projectName };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component-story.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/component-story/component-story.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"component-story.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/component-story/component-story.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAWtC,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,IAAI,EACV,EACE,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,EAAE,gCAAgC,QA2EpC;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,EAAE,CAAC,UAAU,EACzB,cAAc,EAAE,EAAE,CAAC,IAAI,EACvB,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,OAAO,EACzB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,EAClB,aAAa,CAAC,EAAE,OAAO,QAwBxB;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,gCAAgC,iBAWzC;AAED,eAAe,uBAAuB,CAAC"}
|
@@ -9,6 +9,7 @@ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-set
|
|
9
9
|
const ast_utils_1 = require("../../utils/ast-utils");
|
10
10
|
const component_props_1 = require("../../utils/component-props");
|
11
11
|
const framework_1 = require("../../utils/framework");
|
12
|
+
const path_1 = require("path");
|
12
13
|
let tsModule;
|
13
14
|
function createComponentStoriesFile(host, { project, componentPath, interactionTests, uiFramework, }) {
|
14
15
|
if (!tsModule) {
|
@@ -47,7 +48,7 @@ function createComponentStoriesFile(host, { project, componentPath, interactionT
|
|
47
48
|
}
|
48
49
|
function findPropsAndGenerateFile(host, sourceFile, cmpDeclaration, componentDirectory, name, interactionTests, uiFramework, isPlainJs, fromNodeArray) {
|
49
50
|
const { props, argTypes } = (0, component_props_1.getComponentPropDefaults)(sourceFile, cmpDeclaration);
|
50
|
-
(0, devkit_1.generateFiles)(host, (0,
|
51
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, `./files${isPlainJs ? '/jsx' : '/tsx'}`), (0, devkit_1.normalizePath)(componentDirectory), {
|
51
52
|
tmpl: '',
|
52
53
|
componentFileName: fromNodeArray
|
53
54
|
? `${name}--${cmpDeclaration.name.text}`
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"add-module-federation-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/host/lib/add-module-federation-files.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAML,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;
|
1
|
+
{"version":3,"file":"add-module-federation-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/host/lib/add-module-federation-files.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAML,MAAM,YAAY,CAAC;AAOpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,EACzB,qBAAqB,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,QAuIxD"}
|
@@ -5,6 +5,7 @@ const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
6
6
|
const maybe_js_1 = require("../../../utils/maybe-js");
|
7
7
|
const create_application_files_1 = require("../../application/lib/create-application-files");
|
8
|
+
const path_1 = require("path");
|
8
9
|
function addModuleFederationFiles(host, options, defaultRemoteManifest) {
|
9
10
|
const templateVariables = options.bundler === 'rspack'
|
10
11
|
? {
|
@@ -39,7 +40,7 @@ function addModuleFederationFiles(host, options, defaultRemoteManifest) {
|
|
39
40
|
// Renaming original entry file so we can use `import(./bootstrap)` in
|
40
41
|
// new entry file.
|
41
42
|
host.rename((0, devkit_1.joinPathFragments)(options.appProjectRoot, (0, maybe_js_1.maybeJs)({ js: options.js, useJsx: options.bundler === 'rspack' }, 'src/main.tsx')), (0, devkit_1.joinPathFragments)(options.appProjectRoot, (0, maybe_js_1.maybeJs)({ js: options.js, useJsx: options.bundler === 'rspack' }, 'src/bootstrap.tsx')));
|
42
|
-
(0, devkit_1.generateFiles)(host, (0,
|
43
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, `../files/${options.js
|
43
44
|
? options.bundler === 'rspack'
|
44
45
|
? 'rspack-common'
|
45
46
|
: 'common'
|
@@ -48,7 +49,7 @@ function addModuleFederationFiles(host, options, defaultRemoteManifest) {
|
|
48
49
|
? `${options.bundler === 'rspack' ? 'rspack-' : 'webpack-'}module-federation-ts`
|
49
50
|
: `${options.bundler === 'rspack' ? 'rspack-' : 'webpack-'}module-federation`;
|
50
51
|
// New entry file is created here.
|
51
|
-
(0, devkit_1.generateFiles)(host, (0,
|
52
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, `../files/${pathToModuleFederationFiles}`), options.appProjectRoot, templateVariables);
|
52
53
|
function deleteFileIfExists(host, filePath) {
|
53
54
|
if (host.exists(filePath)) {
|
54
55
|
host.delete(filePath);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/create-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;
|
1
|
+
{"version":3,"file":"create-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/create-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QA6FhE"}
|
@@ -4,6 +4,7 @@ exports.createFiles = createFiles;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const js_1 = require("@nx/js");
|
6
6
|
const create_ts_config_1 = require("../../../utils/create-ts-config");
|
7
|
+
const path_1 = require("path");
|
7
8
|
function createFiles(host, options) {
|
8
9
|
const relativePathToRootTsConfig = (0, js_1.getRelativePathToRootTsConfig)(host, options.projectRoot);
|
9
10
|
const substitutions = {
|
@@ -13,9 +14,9 @@ function createFiles(host, options) {
|
|
13
14
|
offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.projectRoot),
|
14
15
|
fileName: options.fileName,
|
15
16
|
};
|
16
|
-
(0, devkit_1.generateFiles)(host, (0,
|
17
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/common'), options.projectRoot, substitutions);
|
17
18
|
if (options.bundler === 'vite' || options.unitTestRunner === 'vitest') {
|
18
|
-
(0, devkit_1.generateFiles)(host, (0,
|
19
|
+
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/vite'), options.projectRoot, substitutions);
|
19
20
|
}
|
20
21
|
if (options.compiler === 'babel') {
|
21
22
|
(0, devkit_1.writeJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, '.babelrc'), {
|