@nx/react 16.4.0-beta.6 → 16.4.0-beta.8

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
@@ -899,6 +899,40 @@
899
899
  "alwaysAddToPackageJson": false
900
900
  }
901
901
  }
902
+ },
903
+ "16.4.0-beta.7": {
904
+ "version": "16.4.0-beta.7",
905
+ "packages": {
906
+ "@types/react": {
907
+ "version": "18.2.12",
908
+ "alwaysAddToPackageJson": false
909
+ },
910
+ "@types/react-dom": {
911
+ "version": "18.2.5",
912
+ "alwaysAddToPackageJson": false
913
+ },
914
+ "@types/react-is": {
915
+ "version": "18.2.0",
916
+ "alwaysAddToPackageJson": false
917
+ }
918
+ }
919
+ },
920
+ "16.4.0-beta.8": {
921
+ "version": "16.4.0-beta.8",
922
+ "packages": {
923
+ "@emotion/styled": {
924
+ "version": "11.11.0",
925
+ "alwaysAddToPackageJson": false
926
+ },
927
+ "@emotion/react": {
928
+ "version": "11.11.1",
929
+ "alwaysAddToPackageJson": false
930
+ },
931
+ "@emotion/babel-plugin": {
932
+ "version": "11.11.0",
933
+ "alwaysAddToPackageJson": false
934
+ }
935
+ }
902
936
  }
903
937
  }
904
938
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "16.4.0-beta.6",
3
+ "version": "16.4.0-beta.8",
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.6",
35
- "@nx/devkit": "16.4.0-beta.6",
36
- "@nx/js": "16.4.0-beta.6",
37
- "@nx/linter": "16.4.0-beta.6",
38
- "@nx/web": "16.4.0-beta.6",
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",
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": "6eda3ff725a1e5ee973e71cb711b065dcc3f2a16"
49
+ "gitHead": "a6589ab111fc01fd4d2cd215c31bfcff004dfc00"
50
50
  }
@@ -1,4 +1,4 @@
1
1
  import { ProjectConfiguration, Tree } from '@nx/devkit';
2
2
  import type { CypressComponentConfigurationSchema } from '../schema';
3
- import { FoundTarget } from '../../../utils/ct-utils';
3
+ import { FoundTarget } from '@nx/cypress/src/utils/find-target-options';
4
4
  export declare function addFiles(tree: Tree, projectConfig: ProjectConfiguration, options: CypressComponentConfigurationSchema, found: FoundTarget): Promise<void>;
@@ -12,7 +12,10 @@ function addFiles(tree, projectConfig, options, found) {
12
12
  // must dyanmicaly import to prevent packages not using cypress from erroring out
13
13
  // when importing react
14
14
  const { addMountDefinition, addDefaultCTConfig } = yield Promise.resolve().then(() => require('@nx/cypress/src/utils/config'));
15
- const actualBundler = yield (0, ct_utils_1.getBundlerFromTarget)(found, tree);
15
+ // Specifically undefined to allow Remix workaround of passing an empty string
16
+ const actualBundler = options.buildTarget !== undefined && options.bundler
17
+ ? options.bundler
18
+ : yield (0, ct_utils_1.getBundlerFromTarget)(found, tree);
16
19
  if (options.bundler && options.bundler !== actualBundler) {
17
20
  devkit_1.logger.warn(`You have specified ${options.bundler} as the bundler but this project is configured to use ${actualBundler}.
18
21
  This may cause errors. If you are seeing errors, try removing the --bundler option.`);
@@ -50,6 +50,7 @@ function libraryGenerator(host, schema) {
50
50
  includeVitest: options.unitTestRunner === 'vitest',
51
51
  compiler: options.compiler,
52
52
  skipFormat: true,
53
+ testEnvironment: 'jsdom',
53
54
  });
54
55
  tasks.push(viteTask);
55
56
  }
@@ -78,6 +79,7 @@ function libraryGenerator(host, schema) {
78
79
  coverageProvider: 'c8',
79
80
  inSourceTests: options.inSourceTests,
80
81
  skipFormat: true,
82
+ testEnvironment: 'jsdom',
81
83
  });
82
84
  tasks.push(vitestTask);
83
85
  }
@@ -1,8 +1,5 @@
1
- import { TargetConfiguration, Tree } from '@nx/devkit';
2
- export interface FoundTarget {
3
- config?: TargetConfiguration;
4
- target: string;
5
- }
1
+ import { Tree } from '@nx/devkit';
2
+ import { type FoundTarget } from '@nx/cypress/src/utils/find-target-options';
6
3
  export declare function addCTTargetWithBuildTarget(tree: Tree, options: {
7
4
  project: string;
8
5
  buildTarget: string;
@@ -6,17 +6,21 @@ const devkit_1 = require("@nx/devkit");
6
6
  const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
7
7
  const ast_utils_1 = require("./ast-utils");
8
8
  let tsModule;
9
- const allowedFileExt = new RegExp(/\.[jt]sx?/g);
10
- const isSpecFile = new RegExp(/(spec|test)\./g);
9
+ const allowedFileExt = new RegExp(/\.[jt]sx?/);
10
+ const isSpecFile = new RegExp(/(spec|test)\./);
11
11
  function addCTTargetWithBuildTarget(tree, options) {
12
12
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
- const { findBuildConfig } = yield Promise.resolve().then(() => require('@nx/cypress/src/utils/find-target-options'));
14
- const found = yield findBuildConfig(tree, {
15
- project: options.project,
16
- buildTarget: options.buildTarget,
17
- validExecutorNames: options.validExecutorNames,
18
- });
19
- assertValidConfig(found === null || found === void 0 ? void 0 : found.config);
13
+ let found = { target: options.buildTarget, config: undefined };
14
+ // Specifically undefined as a workaround for Remix to pass an empty string as the buildTarget
15
+ if (options.buildTarget === undefined) {
16
+ const { findBuildConfig } = yield Promise.resolve().then(() => require('@nx/cypress/src/utils/find-target-options'));
17
+ found = yield findBuildConfig(tree, {
18
+ project: options.project,
19
+ buildTarget: options.buildTarget,
20
+ validExecutorNames: options.validExecutorNames,
21
+ });
22
+ assertValidConfig(found === null || found === void 0 ? void 0 : found.config);
23
+ }
20
24
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
21
25
  projectConfig.targets['component-test'].options = Object.assign(Object.assign({}, projectConfig.targets['component-test'].options), { devServerTarget: found.target, skipServe: true });
22
26
  (0, devkit_1.updateProjectConfiguration)(tree, options.project, projectConfig);
@@ -5,16 +5,16 @@ 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.0.28";
9
- export declare const typesReactDomVersion = "18.0.11";
10
- export declare const typesReactIsVersion = "17.0.3";
8
+ export declare const typesReactVersion = "18.2.12";
9
+ export declare const typesReactDomVersion = "18.2.5";
10
+ export declare const typesReactIsVersion = "18.2.0";
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";
14
14
  export declare const typesStyledComponentsVersion = "5.1.26";
15
- export declare const emotionStyledVersion = "11.10.6";
16
- export declare const emotionReactVersion = "11.10.6";
17
- export declare const emotionBabelPlugin = "11.10.6";
15
+ export declare const emotionStyledVersion = "11.11.0";
16
+ export declare const emotionReactVersion = "11.11.1";
17
+ export declare const emotionBabelPlugin = "11.11.0";
18
18
  export declare const styledJsxVersion = "5.1.2";
19
19
  export declare const reactRouterDomVersion = "6.11.2";
20
20
  export declare const testingLibraryReactVersion = "14.0.0";
@@ -9,16 +9,16 @@ 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.0.28';
13
- exports.typesReactDomVersion = '18.0.11';
14
- exports.typesReactIsVersion = '17.0.3';
12
+ exports.typesReactVersion = '18.2.12';
13
+ exports.typesReactDomVersion = '18.2.5';
14
+ exports.typesReactIsVersion = '18.2.0';
15
15
  exports.typesNodeVersion = '18.14.2';
16
16
  exports.babelPresetReactVersion = '^7.14.5';
17
17
  exports.styledComponentsVersion = '5.3.6';
18
18
  exports.typesStyledComponentsVersion = '5.1.26';
19
- exports.emotionStyledVersion = '11.10.6';
20
- exports.emotionReactVersion = '11.10.6';
21
- exports.emotionBabelPlugin = '11.10.6';
19
+ exports.emotionStyledVersion = '11.11.0';
20
+ exports.emotionReactVersion = '11.11.1';
21
+ exports.emotionBabelPlugin = '11.11.0';
22
22
  // WARNING: This needs to be in sync with Next.js' dependency or else there might be issues.
23
23
  exports.styledJsxVersion = '5.1.2';
24
24
  exports.reactRouterDomVersion = '6.11.2';