@nx/react 22.7.0-pr.34971.73bed1f → 22.7.0-pr.35356.e1b62ce

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": "22.7.0-pr.34971.73bed1f",
3
+ "version": "22.7.0-pr.35356.e1b62ce",
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": {
@@ -18,7 +18,8 @@
18
18
  "Front-end"
19
19
  ],
20
20
  "main": "./index.js",
21
- "typings": "./index.d.ts",
21
+ "type": "commonjs",
22
+ "types": "./index.d.ts",
22
23
  "author": "Victor Savkin",
23
24
  "license": "MIT",
24
25
  "bugs": {
@@ -37,28 +38,28 @@
37
38
  "minimatch": "10.2.4",
38
39
  "picocolors": "^1.1.0",
39
40
  "tslib": "^2.3.0",
40
- "@nx/devkit": "22.7.0-pr.34971.73bed1f",
41
- "@nx/js": "22.7.0-pr.34971.73bed1f",
42
- "@nx/eslint": "22.7.0-pr.34971.73bed1f",
43
- "@nx/web": "22.7.0-pr.34971.73bed1f",
44
- "@nx/module-federation": "22.7.0-pr.34971.73bed1f",
45
- "@nx/rollup": "22.7.0-pr.34971.73bed1f",
41
+ "@nx/devkit": "22.7.0-pr.35356.e1b62ce",
42
+ "@nx/js": "22.7.0-pr.35356.e1b62ce",
43
+ "@nx/eslint": "22.7.0-pr.35356.e1b62ce",
44
+ "@nx/web": "22.7.0-pr.35356.e1b62ce",
45
+ "@nx/module-federation": "22.7.0-pr.35356.e1b62ce",
46
+ "@nx/rollup": "22.7.0-pr.35356.e1b62ce",
46
47
  "express": "^4.21.2",
47
48
  "http-proxy-middleware": "^3.0.5",
48
49
  "semver": "^7.6.3"
49
50
  },
50
51
  "devDependencies": {
51
- "@nx/cypress": "22.7.0-pr.34971.73bed1f",
52
- "@nx/playwright": "22.7.0-pr.34971.73bed1f",
53
- "@nx/rsbuild": "22.7.0-pr.34971.73bed1f",
54
- "@nx/vite": "22.7.0-pr.34971.73bed1f",
55
- "@nx/vitest": "22.7.0-pr.34971.73bed1f",
56
- "@nx/webpack": "22.7.0-pr.34971.73bed1f",
57
- "@nx/storybook": "22.7.0-pr.34971.73bed1f",
58
- "nx": "22.7.0-pr.34971.73bed1f"
52
+ "@nx/cypress": "22.7.0-pr.35356.e1b62ce",
53
+ "@nx/playwright": "22.7.0-pr.35356.e1b62ce",
54
+ "@nx/rsbuild": "22.7.0-pr.35356.e1b62ce",
55
+ "@nx/vite": "22.7.0-pr.35356.e1b62ce",
56
+ "@nx/vitest": "22.7.0-pr.35356.e1b62ce",
57
+ "@nx/webpack": "22.7.0-pr.35356.e1b62ce",
58
+ "@nx/storybook": "22.7.0-pr.35356.e1b62ce",
59
+ "nx": "22.7.0-pr.35356.e1b62ce"
59
60
  },
60
61
  "optionalDependencies": {
61
- "@nx/vite": "22.7.0-pr.34971.73bed1f"
62
+ "@nx/vite": "22.7.0-pr.35356.e1b62ce"
62
63
  },
63
64
  "publishConfig": {
64
65
  "access": "public"
@@ -216,7 +217,5 @@
216
217
  "types": "./mf/*.d.ts"
217
218
  },
218
219
  "./typings/*.d.ts": "./typings/*.d.ts"
219
- },
220
- "types": "./index.d.ts",
221
- "type": "commonjs"
220
+ }
222
221
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/plugins/component-testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,EAC1B,MAAM,oCAAoC,CAAC;AAsB5C,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,yBAAyB,GAClC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,aAAa,GAAG,gBAAgB,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAkIA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/plugins/component-testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,EAC1B,MAAM,oCAAoC,CAAC;AAsB5C,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,yBAAyB,GAClC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,aAAa,GAAG,gBAAgB,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAmIA"}
@@ -45,6 +45,9 @@ function nxComponentTestingPreset(pathToConfig, options) {
45
45
  ...{ framework: 'react', bundler: 'vite' },
46
46
  viteConfig: async () => {
47
47
  const viteConfigPath = findViteConfig(normalizedProjectRootPath);
48
+ // TODO(jack): Remove this cast when @nx/react switches to
49
+ // moduleResolution: "nodenext". Vite 8 ships ESM-only type
50
+ // declarations (.d.mts) not resolvable under moduleResolution: "node".
48
51
  const { mergeConfig, loadConfigFromFile, searchForWorkspaceRoot } = await Function('return import("vite")')();
49
52
  const resolved = await loadConfigFromFile({
50
53
  mode: 'watch',
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-fallback.d.ts","sourceRoot":"","sources":["../../../../../packages/react/plugins/component-testing/webpack-fallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,wBAAgB,sBAAsB,CAAC,EACrC,YAAiC,EACjC,QAAkB,GACnB,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,GAAG,OAAO,CAAC;CAC3B,GAAG,aAAa,CAsEhB"}
1
+ {"version":3,"file":"webpack-fallback.d.ts","sourceRoot":"","sources":["../../../../../packages/react/plugins/component-testing/webpack-fallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxC,wBAAgB,sBAAsB,CAAC,EACrC,YAAiC,EACjC,QAAkB,GACnB,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,GAAG,OAAO,CAAC;CAC3B,GAAG,aAAa,CAuEhB"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildBaseWebpackConfig = buildBaseWebpackConfig;
4
4
  const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin");
5
5
  const webpack_1 = require("@nx/webpack");
6
+ const ts_config_1 = require("@nx/js/src/utils/typescript/ts-config");
6
7
  function buildBaseWebpackConfig({ tsConfigPath = 'tsconfig.cy.json', compiler = 'babel', }) {
7
8
  const extensions = ['.ts', '.tsx', '.mjs', '.js', '.jsx'];
8
9
  const config = {
@@ -12,6 +13,7 @@ function buildBaseWebpackConfig({ tsConfigPath = 'tsconfig.cy.json', compiler =
12
13
  plugins: [
13
14
  new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({
14
15
  configFile: tsConfigPath,
16
+ baseUrl: (0, ts_config_1.resolvePathsBaseUrl)(tsConfigPath),
15
17
  extensions,
16
18
  }),
17
19
  ],
@@ -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,iBAyDb;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBA0Cb"}
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,iBA2Db;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBA0Cb"}
@@ -67,6 +67,8 @@ async function setupViteConfiguration(tree, options, tasks) {
67
67
  addPlugin: options.addPlugin,
68
68
  projectType: 'application',
69
69
  port: options.port,
70
+ // React Router does not yet support Vite 8, so force Vite 7.
71
+ ...(options.useReactRouter ? { useViteV7: true } : {}),
70
72
  });
71
73
  tasks.push(viteTask);
72
74
  createOrEditViteConfig(tree, {
@@ -1 +1 @@
1
- {"version":3,"file":"update-module-federation-tsconfig.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/host/lib/update-module-federation-tsconfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,IAAI,EAAc,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,QAyC1B"}
1
+ {"version":3,"file":"update-module-federation-tsconfig.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/host/lib/update-module-federation-tsconfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,IAAI,EAAc,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,QAmC1B"}
@@ -8,12 +8,7 @@ function updateModuleFederationTsconfig(host, options) {
8
8
  const tsconfigRuntimePath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json');
9
9
  if (!host.exists(tsconfigPath) || !host.exists(tsconfigRuntimePath))
10
10
  return;
11
- // Not setting `baseUrl` does not work with MF.
12
11
  if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
13
- (0, devkit_1.updateJson)(host, 'tsconfig.base.json', (json) => {
14
- json.compilerOptions.baseUrl = '.';
15
- return json;
16
- });
17
12
  // Update references to match what `nx sync` does.
18
13
  if (options.remotes?.length) {
19
14
  (0, devkit_1.updateJson)(host, tsconfigPath, (json) => {
package/project.json DELETED
@@ -1,62 +0,0 @@
1
- {
2
- "name": "react",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/react",
5
- "projectType": "library",
6
- "targets": {
7
- "build": {
8
- "command": "node ./scripts/copy-readme.js react",
9
- "outputs": ["{workspaceRoot}/dist/packages/react/README.md"]
10
- },
11
- "legacy-post-build": {
12
- "executor": "@nx/workspace-plugin:legacy-post-build",
13
- "options": {
14
- "tsConfig": "./tsconfig.lib.json",
15
- "assets": [
16
- {
17
- "input": "packages/react",
18
- "glob": "**/files/**",
19
- "output": "/"
20
- },
21
- {
22
- "input": "packages/react",
23
- "glob": "**/files/**/.gitkeep",
24
- "output": "/"
25
- },
26
- {
27
- "input": "packages/react",
28
- "glob": "**/files/**/.babelrc__tmpl__",
29
- "output": "/"
30
- },
31
- {
32
- "input": "packages/react",
33
- "glob": "**/files/**/.browserslistrc__tmpl__",
34
- "output": "/"
35
- },
36
- {
37
- "input": "packages/react",
38
- "glob": "**/*.json",
39
- "ignore": ["**/tsconfig*.json", "project.json", ".eslintrc.json"],
40
- "output": "/"
41
- },
42
- {
43
- "input": "packages/react",
44
- "glob": "**/*.d.ts",
45
- "output": "/"
46
- },
47
- {
48
- "input": "packages/react",
49
- "glob": "**/*.js",
50
- "ignore": ["**/jest.config.js"],
51
- "output": "/"
52
- },
53
- {
54
- "input": "",
55
- "glob": "LICENSE",
56
- "output": "/"
57
- }
58
- ]
59
- }
60
- }
61
- }
62
- }