@nx/react 22.1.0-canary.20251030-b283663 → 22.1.0-canary.20251110-73ecb30

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
@@ -98,6 +98,27 @@
98
98
  "alwaysAddToPackageJson": false
99
99
  }
100
100
  }
101
+ },
102
+ "22.2.0": {
103
+ "version": "22.2.0-beta.0",
104
+ "packages": {
105
+ "@module-federation/enhanced": {
106
+ "version": "^0.21.2",
107
+ "alwaysAddToPackageJson": false
108
+ },
109
+ "@module-federation/runtime": {
110
+ "version": "^0.21.2",
111
+ "alwaysAddToPackageJson": false
112
+ },
113
+ "@module-federation/sdk": {
114
+ "version": "^0.21.2",
115
+ "alwaysAddToPackageJson": false
116
+ },
117
+ "@module-federation/node": {
118
+ "version": "^2.7.21",
119
+ "alwaysAddToPackageJson": false
120
+ }
121
+ }
101
122
  }
102
123
  }
103
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "22.1.0-canary.20251030-b283663",
3
+ "version": "22.1.0-canary.20251110-73ecb30",
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,30 +38,185 @@
38
38
  "minimatch": "9.0.3",
39
39
  "picocolors": "^1.1.0",
40
40
  "tslib": "^2.3.0",
41
- "@nx/devkit": "22.1.0-canary.20251030-b283663",
42
- "@nx/js": "22.1.0-canary.20251030-b283663",
43
- "@nx/eslint": "22.1.0-canary.20251030-b283663",
44
- "@nx/web": "22.1.0-canary.20251030-b283663",
45
- "@nx/module-federation": "22.1.0-canary.20251030-b283663",
46
- "@nx/rollup": "22.1.0-canary.20251030-b283663",
41
+ "@nx/devkit": "22.1.0-canary.20251110-73ecb30",
42
+ "@nx/js": "22.1.0-canary.20251110-73ecb30",
43
+ "@nx/eslint": "22.1.0-canary.20251110-73ecb30",
44
+ "@nx/web": "22.1.0-canary.20251110-73ecb30",
45
+ "@nx/module-federation": "22.1.0-canary.20251110-73ecb30",
46
+ "@nx/rollup": "22.1.0-canary.20251110-73ecb30",
47
47
  "express": "^4.21.2",
48
48
  "http-proxy-middleware": "^3.0.5",
49
49
  "semver": "^7.6.3"
50
50
  },
51
51
  "devDependencies": {
52
- "@nx/cypress": "22.1.0-canary.20251030-b283663",
53
- "@nx/playwright": "22.1.0-canary.20251030-b283663",
54
- "@nx/rsbuild": "22.1.0-canary.20251030-b283663",
55
- "@nx/vite": "22.1.0-canary.20251030-b283663",
56
- "@nx/webpack": "22.1.0-canary.20251030-b283663",
57
- "nx": "22.1.0-canary.20251030-b283663"
52
+ "@nx/cypress": "22.1.0-canary.20251110-73ecb30",
53
+ "@nx/playwright": "22.1.0-canary.20251110-73ecb30",
54
+ "@nx/rsbuild": "22.1.0-canary.20251110-73ecb30",
55
+ "@nx/vite": "22.1.0-canary.20251110-73ecb30",
56
+ "@nx/vitest": "22.1.0-canary.20251110-73ecb30",
57
+ "@nx/webpack": "22.1.0-canary.20251110-73ecb30",
58
+ "nx": "22.1.0-canary.20251110-73ecb30"
58
59
  },
59
60
  "optionalDependencies": {
60
- "@nx/vite": "22.1.0-canary.20251030-b283663"
61
+ "@nx/vite": "22.1.0-canary.20251110-73ecb30"
61
62
  },
62
63
  "publishConfig": {
63
64
  "access": "public"
64
65
  },
66
+ "exports": {
67
+ ".": {
68
+ "import": "./index.js",
69
+ "require": "./index.js",
70
+ "types": "./index.d.ts"
71
+ },
72
+ "./package.json": "./package.json",
73
+ "./migrations.json": "./migrations.json",
74
+ "./generators.json": "./generators.json",
75
+ "./executors.json": "./executors.json",
76
+ "./mf": {
77
+ "import": "./mf/index.js",
78
+ "require": "./mf/index.js",
79
+ "types": "./mf/index.d.ts"
80
+ },
81
+ "./babel": {
82
+ "import": "./babel.js",
83
+ "require": "./babel.js",
84
+ "types": "./babel.d.ts"
85
+ },
86
+ "./tailwind": {
87
+ "import": "./tailwind.js",
88
+ "require": "./tailwind.js",
89
+ "types": "./tailwind.d.ts"
90
+ },
91
+ "./module-federation": {
92
+ "import": "./module-federation.js",
93
+ "require": "./module-federation.js",
94
+ "types": "./module-federation.d.ts"
95
+ },
96
+ "./webpack-plugin": {
97
+ "import": "./webpack-plugin.js",
98
+ "require": "./webpack-plugin.js",
99
+ "types": "./webpack-plugin.d.ts"
100
+ },
101
+ "./router-plugin": {
102
+ "import": "./router-plugin.js",
103
+ "require": "./router-plugin.js",
104
+ "types": "./router-plugin.d.ts"
105
+ },
106
+ "./ast-utils": {
107
+ "import": "./ast-utils.js",
108
+ "require": "./ast-utils.js",
109
+ "types": "./ast-utils.d.ts"
110
+ },
111
+ "./plugins/storybook": {
112
+ "import": "./plugins/storybook/index.js",
113
+ "require": "./plugins/storybook/index.js",
114
+ "types": "./plugins/storybook/index.d.ts"
115
+ },
116
+ "./plugins/component-testing": {
117
+ "import": "./plugins/component-testing/index.js",
118
+ "require": "./plugins/component-testing/index.js",
119
+ "types": "./plugins/component-testing/index.d.ts"
120
+ },
121
+ "./plugins/webpack": {
122
+ "import": "./plugins/webpack.js",
123
+ "require": "./plugins/webpack.js",
124
+ "types": "./plugins/webpack.d.ts"
125
+ },
126
+ "./plugins/bundle-rollup": {
127
+ "import": "./plugins/bundle-rollup.js",
128
+ "require": "./plugins/bundle-rollup.js",
129
+ "types": "./plugins/bundle-rollup.d.ts"
130
+ },
131
+ "./plugins/jest": {
132
+ "import": "./plugins/jest.js",
133
+ "require": "./plugins/jest.js",
134
+ "types": "./plugins/jest.d.ts"
135
+ },
136
+ "./plugins/with-react": {
137
+ "import": "./plugins/with-react.js",
138
+ "require": "./plugins/with-react.js",
139
+ "types": "./plugins/with-react.d.ts"
140
+ },
141
+ "./src/utils": {
142
+ "import": "./src/utils/index.js",
143
+ "require": "./src/utils/index.js",
144
+ "types": "./src/utils/index.d.ts"
145
+ },
146
+ "./src/utils/*": {
147
+ "import": "./src/utils/*.js",
148
+ "require": "./src/utils/*.js",
149
+ "types": "./src/utils/*.d.ts"
150
+ },
151
+ "./src/generators/utils": {
152
+ "import": "./src/generators/utils/index.js",
153
+ "require": "./src/generators/utils/index.js",
154
+ "types": "./src/generators/utils/index.d.ts"
155
+ },
156
+ "./src/generators/*": {
157
+ "import": "./src/generators/*.js",
158
+ "require": "./src/generators/*.js",
159
+ "types": "./src/generators/*.d.ts"
160
+ },
161
+ "./src/generators/*/lib/*": {
162
+ "import": "./src/generators/*/lib/*.js",
163
+ "require": "./src/generators/*/lib/*.js",
164
+ "types": "./src/generators/*/lib/*.d.ts"
165
+ },
166
+ "./src/generators/*/*": {
167
+ "import": "./src/generators/*/*.js",
168
+ "require": "./src/generators/*/*.js",
169
+ "types": "./src/generators/*/*.d.ts"
170
+ },
171
+ "./src/generators/*/schema.json": "./src/generators/*/schema.json",
172
+ "./src/executors/*/schema.json": "./src/executors/*/schema.json",
173
+ "./src/executors/*.impl": {
174
+ "import": "./src/executors/*.impl.js",
175
+ "require": "./src/executors/*.impl.js",
176
+ "types": "./src/executors/*.impl.d.ts"
177
+ },
178
+ "./src/executors/*": {
179
+ "import": "./src/executors/*.js",
180
+ "require": "./src/executors/*.js",
181
+ "types": "./src/executors/*.d.ts"
182
+ },
183
+ "./src/executors/*/lib/*": {
184
+ "import": "./src/executors/*/lib/*.js",
185
+ "require": "./src/executors/*/lib/*.js",
186
+ "types": "./src/executors/*/lib/*.d.ts"
187
+ },
188
+ "./src/module-federation/*": {
189
+ "import": "./src/module-federation/*.js",
190
+ "require": "./src/module-federation/*.js",
191
+ "types": "./src/module-federation/*.d.ts"
192
+ },
193
+ "./src/plugins/*": {
194
+ "import": "./src/plugins/*.js",
195
+ "require": "./src/plugins/*.js",
196
+ "types": "./src/plugins/*.d.ts"
197
+ },
198
+ "./src/rules/*": {
199
+ "import": "./src/rules/*.js",
200
+ "require": "./src/rules/*.js",
201
+ "types": "./src/rules/*.d.ts"
202
+ },
203
+ "./src/*": {
204
+ "import": "./src/*.js",
205
+ "require": "./src/*.js",
206
+ "types": "./src/*.d.ts"
207
+ },
208
+ "./plugins/*": {
209
+ "import": "./plugins/*.js",
210
+ "require": "./plugins/*.js",
211
+ "types": "./plugins/*.d.ts"
212
+ },
213
+ "./mf/*": {
214
+ "import": "./mf/*.js",
215
+ "require": "./mf/*.js",
216
+ "types": "./mf/*.d.ts"
217
+ },
218
+ "./typings/*.d.ts": "./typings/*.d.ts"
219
+ },
65
220
  "types": "./index.d.ts",
66
221
  "type": "commonjs"
67
222
  }
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAIjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAoCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAoM5B;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAIjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAoCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAqM5B;AAED,eAAe,oBAAoB,CAAC"}
@@ -152,6 +152,7 @@ async function applicationGeneratorInternal(tree, schema) {
152
152
  (0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.json'), (json) => {
153
153
  const types = new Set(json.compilerOptions?.types || []);
154
154
  types.add('@react-router/node');
155
+ types.add('node');
155
156
  return {
156
157
  ...json,
157
158
  compilerOptions: {
@@ -2,7 +2,7 @@
2
2
  "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "lib": ["DOM", "DOM.Iterable", "ES2019"],
5
- "types": ["@react-router/node", "vite/client"],
5
+ "types": ["@react-router/node", "vite/client", "node"],
6
6
  "isolatedModules": true,
7
7
  "esModuleInterop": true,
8
8
  "jsx": "react-jsx",
@@ -1 +1 @@
1
- {"version":3,"file":"add-vite.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react/src/generators/application/lib/bundlers/add-vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAoC,MAAM,YAAY,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBAwDb;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBAsCb"}
1
+ {"version":3,"file":"add-vite.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react/src/generators/application/lib/bundlers/add-vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAoC,MAAM,YAAY,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBAwDb;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBAyCb"}
@@ -50,8 +50,10 @@ async function setupViteConfiguration(tree, options, tasks) {
50
50
  }, false);
51
51
  }
52
52
  async function setupVitestConfiguration(tree, options, tasks) {
53
- const { createOrEditViteConfig, vitestGenerator } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
54
- const vitestTask = await vitestGenerator(tree, {
53
+ const { createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
54
+ (0, devkit_1.ensurePackage)('@nx/vitest', versions_1.nxVersion);
55
+ const { configurationGenerator } = await Promise.resolve().then(() => require('@nx/vitest/generators'));
56
+ const vitestTask = await configurationGenerator(tree, {
55
57
  uiFramework: 'react',
56
58
  coverageProvider: 'v8',
57
59
  project: options.projectName,
@@ -1 +1 @@
1
- {"version":3,"file":"update-jest-config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/application/lib/update-jest-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAE9C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAoCrE"}
1
+ {"version":3,"file":"update-jest-config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/application/lib/update-jest-config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAE9C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAoCrE"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateSpecConfig = updateSpecConfig;
4
- const maybe_js_1 = require("../../../utils/maybe-js");
5
4
  const jest_utils_1 = require("../../../utils/jest-utils");
6
5
  const devkit_1 = require("@nx/devkit");
7
6
  function updateSpecConfig(host, options) {
@@ -27,7 +26,10 @@ function updateSpecConfig(host, options) {
27
26
  if (options.unitTestRunner !== 'jest') {
28
27
  return;
29
28
  }
30
- const configPath = (0, maybe_js_1.maybeJs)(options, `${options.appProjectRoot}/jest.config.ts`);
29
+ const configPath = (0, jest_utils_1.findProjectJestConfig)(host, options.appProjectRoot);
30
+ if (!configPath) {
31
+ return;
32
+ }
31
33
  const originalContent = host.read(configPath, 'utf-8');
32
34
  const content = (0, jest_utils_1.updateJestConfigContent)(originalContent);
33
35
  host.write(configPath, content);
@@ -1 +1 @@
1
- {"version":3,"file":"component-test.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/component-test/component-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,iBAsB7B;AAqED,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"component-test.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/component-test/component-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,iBAkB7B;AAqED,eAAe,sBAAsB,CAAC"}
@@ -11,8 +11,6 @@ const versions_1 = require("../../utils/versions");
11
11
  let tsModule;
12
12
  async function componentTestGenerator(tree, options) {
13
13
  (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
14
- const { assertMinimumCypressVersion } = await Promise.resolve().then(() => require('@nx/cypress/src/utils/versions'));
15
- assertMinimumCypressVersion(10);
16
14
  // normalize any windows paths
17
15
  options.componentPath = options.componentPath.replace(/\\/g, '/');
18
16
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
@@ -9,6 +9,6 @@
9
9
  "@nx/react/typings/image.d.ts"
10
10
  ]
11
11
  },
12
- "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/**/*.spec.tsx", "src/**/*.test.tsx", "src/**/*.spec.js", "src/**/*.test.js", "src/**/*.spec.jsx", "src/**/*.test.jsx"],
12
+ "exclude": ["jest.config.ts", "jest.config.cts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/**/*.spec.tsx", "src/**/*.test.tsx", "src/**/*.spec.js", "src/**/*.test.js", "src/**/*.spec.jsx", "src/**/*.test.jsx"],
13
13
  "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAgCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMhE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAqRxE;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAgCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMhE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAwRxE;AAED,eAAe,gBAAgB,CAAC"}
@@ -139,7 +139,7 @@ async function libraryGeneratorInternal(host, schema) {
139
139
  skipFormat: true,
140
140
  });
141
141
  tasks.push(jestTask);
142
- const jestConfigPath = (0, devkit_1.joinPathFragments)(options.projectRoot, options.js ? 'jest.config.js' : 'jest.config.ts');
142
+ const jestConfigPath = (0, devkit_1.joinPathFragments)(options.projectRoot, options.js ? 'jest.config.js' : 'jest.config.cts');
143
143
  if (options.compiler === 'babel' && host.exists(jestConfigPath)) {
144
144
  const updatedContent = (0, jest_utils_1.updateJestConfigContent)(host.read(jestConfigPath, 'utf-8'));
145
145
  host.write(jestConfigPath, updatedContent);
@@ -148,8 +148,10 @@ async function libraryGeneratorInternal(host, schema) {
148
148
  else if (options.unitTestRunner === 'vitest' &&
149
149
  options.bundler !== 'vite' // tests are already configured if bundler is vite
150
150
  ) {
151
- const { vitestGenerator, createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
152
- const vitestTask = await vitestGenerator(host, {
151
+ const { createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
152
+ (0, devkit_1.ensurePackage)('@nx/vitest', versions_1.nxVersion);
153
+ const { configurationGenerator } = await Promise.resolve().then(() => require('@nx/vitest/generators'));
154
+ const vitestTask = await configurationGenerator(host, {
153
155
  uiFramework: 'react',
154
156
  project: options.name,
155
157
  coverageProvider: 'v8',
@@ -1,2 +1,4 @@
1
+ import { type Tree } from '@nx/devkit';
1
2
  export declare function updateJestConfigContent(content: string): string;
3
+ export declare function findProjectJestConfig(tree: Tree, projectRoot: string): string | null;
2
4
  //# sourceMappingURL=jest-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jest-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/utils/jest-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,UAUtD"}
1
+ {"version":3,"file":"jest-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/utils/jest-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAE1D,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,UAUtD;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CAWf"}
@@ -1,8 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateJestConfigContent = updateJestConfigContent;
4
+ exports.findProjectJestConfig = findProjectJestConfig;
5
+ const devkit_1 = require("@nx/devkit");
4
6
  function updateJestConfigContent(content) {
5
7
  return content
6
8
  .replace('transform: {', "transform: {\n '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',")
7
9
  .replace(`'babel-jest'`, `['babel-jest', { presets: ['@nx/react/babel'] }]`);
8
10
  }
11
+ function findProjectJestConfig(tree, projectRoot) {
12
+ const extensions = ['js', 'ts', 'cts'];
13
+ for (const ext of extensions) {
14
+ const configPath = (0, devkit_1.joinPathFragments)(projectRoot, `jest.config.${ext}`);
15
+ if (tree.exists(configPath)) {
16
+ return configPath;
17
+ }
18
+ }
19
+ return null;
20
+ }
@@ -44,8 +44,8 @@ export declare const typesExpressVersion = "^4.17.21";
44
44
  export declare const isbotVersion = "^3.6.5";
45
45
  export declare const corsVersion = "~2.8.5";
46
46
  export declare const typesCorsVersion = "~2.8.12";
47
- export declare const moduleFederationNodeVersion = "^2.7.11";
48
- export declare const moduleFederationEnhancedVersion = "^0.18.0";
47
+ export declare const moduleFederationNodeVersion = "^2.7.21";
48
+ export declare const moduleFederationEnhancedVersion = "^0.21.2";
49
49
  export declare const lessVersion = "3.12.2";
50
50
  export declare const sassVersion = "^1.55.0";
51
51
  export declare const rollupPluginUrlVersion = "^8.0.2";
@@ -51,8 +51,8 @@ exports.typesExpressVersion = '^4.17.21';
51
51
  exports.isbotVersion = '^3.6.5';
52
52
  exports.corsVersion = '~2.8.5';
53
53
  exports.typesCorsVersion = '~2.8.12';
54
- exports.moduleFederationNodeVersion = '^2.7.11';
55
- exports.moduleFederationEnhancedVersion = '^0.18.0';
54
+ exports.moduleFederationNodeVersion = '^2.7.21';
55
+ exports.moduleFederationEnhancedVersion = '^0.21.2';
56
56
  // style preprocessors
57
57
  exports.lessVersion = '3.12.2';
58
58
  exports.sassVersion = '^1.55.0';