@nx/react 16.4.0-beta.8 → 16.4.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
@@ -933,6 +933,23 @@
933
933
  "alwaysAddToPackageJson": false
934
934
  }
935
935
  }
936
+ },
937
+ "16.4.0-beta.11": {
938
+ "version": "16.4.0-beta.11",
939
+ "packages": {
940
+ "@types/react": {
941
+ "version": "18.2.13",
942
+ "alwaysAddToPackageJson": false
943
+ },
944
+ "@types/react-dom": {
945
+ "version": "18.2.6",
946
+ "alwaysAddToPackageJson": false
947
+ },
948
+ "@types/react-is": {
949
+ "version": "18.2.1",
950
+ "alwaysAddToPackageJson": false
951
+ }
952
+ }
936
953
  }
937
954
  }
938
955
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "16.4.0-beta.8",
3
+ "version": "16.4.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.4.0-beta.8",
35
- "@nx/devkit": "16.4.0-beta.8",
36
- "@nx/js": "16.4.0-beta.8",
37
- "@nx/linter": "16.4.0-beta.8",
38
- "@nx/web": "16.4.0-beta.8",
34
+ "@nrwl/react": "16.4.0",
35
+ "@nx/devkit": "16.4.0",
36
+ "@nx/js": "16.4.0",
37
+ "@nx/linter": "16.4.0",
38
+ "@nx/web": "16.4.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": "a6589ab111fc01fd4d2cd215c31bfcff004dfc00"
49
+ "gitHead": "ae698a72748d9f33aa5395aeeaa7b7af436a1dc5"
50
50
  }
@@ -29,10 +29,13 @@ function nxComponentTestingPreset(pathToConfig, options) {
29
29
  const normalizedProjectRootPath = ['.ts', '.js'].some((ext) => pathToConfig.endsWith(ext))
30
30
  ? pathToConfig
31
31
  : (0, path_1.dirname)(pathToConfig);
32
+ const basePresetSettings = (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig, {
33
+ testingType: 'component',
34
+ });
32
35
  if ((options === null || options === void 0 ? void 0 : options.bundler) === 'vite') {
33
- return Object.assign(Object.assign({}, (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig)), { specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', devServer: Object.assign(Object.assign({}, { framework: 'react', bundler: 'vite' }), { viteConfig: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
36
+ return Object.assign(Object.assign({}, basePresetSettings), { specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', devServer: Object.assign(Object.assign({}, { framework: 'react', bundler: 'vite' }), { viteConfig: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
34
37
  const viteConfigPath = findViteConfig(normalizedProjectRootPath);
35
- const { mergeConfig, loadConfigFromFile, searchForWorkspaceRoot } = (yield Promise.resolve().then(() => require('vite')));
38
+ const { mergeConfig, loadConfigFromFile, searchForWorkspaceRoot } = yield Promise.resolve().then(() => require('vite'));
36
39
  const resolved = yield loadConfigFromFile({
37
40
  mode: 'watch',
38
41
  command: 'serve',
@@ -78,7 +81,7 @@ function nxComponentTestingPreset(pathToConfig, options) {
78
81
  compiler: 'babel',
79
82
  });
80
83
  }
81
- return Object.assign(Object.assign({}, (0, cypress_preset_1.nxBaseCypressPreset)(pathToConfig)), { specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', devServer: Object.assign(Object.assign({}, { framework: 'react', bundler: 'webpack' }), { webpackConfig }) });
84
+ return Object.assign(Object.assign({}, basePresetSettings), { specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', devServer: Object.assign(Object.assign({}, { framework: 'react', bundler: 'webpack' }), { webpackConfig }) });
82
85
  }
83
86
  exports.nxComponentTestingPreset = nxComponentTestingPreset;
84
87
  /**
@@ -131,7 +134,11 @@ function buildTargetWebpack(graph, buildTarget, componentTestingProjectName) {
131
134
  return () => tslib_1.__awaiter(this, void 0, void 0, function* () {
132
135
  customWebpack = yield customWebpack;
133
136
  // TODO(jack): Once webpackConfig is always set in @nx/webpack:webpack, we no longer need this default.
134
- const defaultWebpack = getWebpackConfig(context, Object.assign(Object.assign({}, options), { root: devkit_1.workspaceRoot, projectRoot: ctProjectConfig.root, sourceRoot: ctProjectConfig.sourceRoot }));
137
+ const defaultWebpack = getWebpackConfig(context, Object.assign(Object.assign({}, options), {
138
+ // cypress will generate its own index.html from component-index.html
139
+ generateIndexHtml: false,
140
+ // causes issues with buildable libraries with ENOENT: no such file or directory, scandir error
141
+ extractLicenses: false, root: devkit_1.workspaceRoot, projectRoot: ctProjectConfig.root, sourceRoot: ctProjectConfig.sourceRoot }));
135
142
  if (customWebpack) {
136
143
  return yield customWebpack(defaultWebpack, {
137
144
  options,
@@ -24,7 +24,7 @@ function remoteGenerator(host, schema) {
24
24
  bundler: 'webpack', skipFormat: true }));
25
25
  tasks.push(initAppTask);
26
26
  if (schema.host) {
27
- (0, update_host_with_remote_1.updateHostWithRemote)(host, schema.host, options.name);
27
+ (0, update_host_with_remote_1.updateHostWithRemote)(host, schema.host, options.projectName);
28
28
  }
29
29
  // Module federation requires bootstrap code to be dynamically imported.
30
30
  // Renaming original entry file so we can use `import(./bootstrap)` in
@@ -60,6 +60,7 @@ function setupSsrGenerator(tree, options) {
60
60
  target: 'node',
61
61
  main: `${projectRoot}/server.ts`,
62
62
  outputPath: (0, devkit_1.joinPathFragments)(originalOutputPath, 'server'),
63
+ outputFileName: 'server.js',
63
64
  tsConfig: `${projectRoot}/tsconfig.server.json`,
64
65
  compiler: 'babel',
65
66
  externalDependencies: 'all',
@@ -16,7 +16,7 @@ function getFunctionDeterminateRemoteUrl(isServer = false) {
16
16
  throw new Error(`Cannot automatically determine URL of remote (${remote}). Looked for property "host" in the project's "${serveTarget}" target.\n
17
17
  You can also use the tuple syntax in your webpack config to configure your remotes. e.g. \`remotes: [['remote1', 'http://localhost:4201']]\``);
18
18
  }
19
- const host = (_c = (_b = serveTarget.options) === null || _b === void 0 ? void 0 : _b.host) !== null && _c !== void 0 ? _c : 'http://localhost';
19
+ const host = (_c = (_b = serveTarget.options) === null || _b === void 0 ? void 0 : _b.host) !== null && _c !== void 0 ? _c : `http${serveTarget.options.ssl ? 's' : ''}://localhost`;
20
20
  const port = (_e = (_d = serveTarget.options) === null || _d === void 0 ? void 0 : _d.port) !== null && _e !== void 0 ? _e : 4201;
21
21
  return `${host.endsWith('/') ? host.slice(0, -1) : host}:${port}/${remoteEntry}`;
22
22
  };
@@ -9,7 +9,7 @@ export declare function findDefaultExportIdentifier(source: ts.SourceFile): ts.I
9
9
  export declare function findDefaultClassOrFunction(source: ts.SourceFile | null): ts.FunctionDeclaration | ts.ClassDeclaration | null;
10
10
  export declare function findComponentImportPath(componentName: string, source: ts.SourceFile): string;
11
11
  export declare function findElements(source: ts.SourceFile, tagName: string): ts.Node[];
12
- export declare function findClosestOpening(tagName: string, node: ts.Node): any;
12
+ export declare function findClosestOpening(tagName: string, node: ts.Node): ts.Node;
13
13
  export declare function isTag(tagName: string, node: ts.Node): boolean;
14
14
  export declare function addInitialRoutes(sourcePath: string, source: ts.SourceFile): StringChange[];
15
15
  export declare function addRoute(sourcePath: string, source: ts.SourceFile, options: {
@@ -5,9 +5,9 @@ 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.12";
9
- export declare const typesReactDomVersion = "18.2.5";
10
- export declare const typesReactIsVersion = "18.2.0";
8
+ export declare const typesReactVersion = "18.2.13";
9
+ export declare const typesReactDomVersion = "18.2.6";
10
+ export declare const typesReactIsVersion = "18.2.1";
11
11
  export declare const typesNodeVersion = "18.14.2";
12
12
  export declare const babelPresetReactVersion = "^7.14.5";
13
13
  export declare const styledComponentsVersion = "5.3.6";
@@ -9,9 +9,9 @@ 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';
13
- exports.typesReactDomVersion = '18.2.5';
14
- exports.typesReactIsVersion = '18.2.0';
12
+ exports.typesReactVersion = '18.2.13';
13
+ exports.typesReactDomVersion = '18.2.6';
14
+ exports.typesReactIsVersion = '18.2.1';
15
15
  exports.typesNodeVersion = '18.14.2';
16
16
  exports.babelPresetReactVersion = '^7.14.5';
17
17
  exports.styledComponentsVersion = '5.3.6';