@nx/react 17.1.0-rc.0 → 17.1.2

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": "17.1.0-rc.0",
3
+ "version": "17.1.2",
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": {
@@ -37,11 +37,11 @@
37
37
  "file-loader": "^6.2.0",
38
38
  "minimatch": "3.0.5",
39
39
  "tslib": "^2.3.0",
40
- "@nx/devkit": "17.1.0-rc.0",
41
- "@nx/js": "17.1.0-rc.0",
42
- "@nx/eslint": "17.1.0-rc.0",
43
- "@nx/web": "17.1.0-rc.0",
44
- "@nrwl/react": "17.1.0-rc.0"
40
+ "@nx/devkit": "17.1.2",
41
+ "@nx/js": "17.1.2",
42
+ "@nx/eslint": "17.1.2",
43
+ "@nx/web": "17.1.2",
44
+ "@nrwl/react": "17.1.2"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
@@ -132,7 +132,7 @@ async function applicationGeneratorInternal(host, schema) {
132
132
  const { createOrEditViteConfig, vitestGenerator } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
133
133
  const vitestTask = await vitestGenerator(host, {
134
134
  uiFramework: 'react',
135
- coverageProvider: 'c8',
135
+ coverageProvider: 'v8',
136
136
  project: options.projectName,
137
137
  inSourceTests: options.inSourceTests,
138
138
  skipFormat: true,
@@ -792,7 +792,7 @@ export function NxWelcome({ title }: { title: string }) {
792
792
  <span># Generate UI lib</span>
793
793
  nx g @nx/react:lib ui
794
794
  <span># Add a component</span>
795
- nx g @nx/react:component button --project ui
795
+ nx g @nx/react:component ui/src/lib/button
796
796
  </pre>
797
797
  </details>
798
798
  <details>
@@ -113,7 +113,7 @@ async function libraryGeneratorInternal(host, schema) {
113
113
  const vitestTask = await vitestGenerator(host, {
114
114
  uiFramework: 'react',
115
115
  project: options.name,
116
- coverageProvider: 'c8',
116
+ coverageProvider: 'v8',
117
117
  inSourceTests: options.inSourceTests,
118
118
  skipFormat: true,
119
119
  testEnvironment: 'jsdom',
@@ -8,10 +8,10 @@ async function generateStories(host, schema) {
8
8
  // TODO(katerina): Nx 18 -> remove Cypress
9
9
  (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
10
10
  const { getE2eProjectName } = await Promise.resolve().then(() => require('@nx/cypress/src/utils/project-name'));
11
- const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.name);
12
- const cypressProject = getE2eProjectName(schema.name, projectConfig.root, schema.cypressDirectory);
11
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.project);
12
+ const cypressProject = getE2eProjectName(schema.project, projectConfig.root, schema.cypressDirectory);
13
13
  await (0, stories_1.default)(host, {
14
- project: schema.name,
14
+ project: schema.project,
15
15
  generateCypressSpecs: schema.configureCypress && schema.generateCypressSpecs,
16
16
  js: schema.js,
17
17
  cypressProject,
@@ -23,7 +23,7 @@ async function generateStories(host, schema) {
23
23
  async function storybookConfigurationGenerator(host, schema) {
24
24
  const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/storybook', versions_1.nxVersion);
25
25
  let uiFramework = '@storybook/react-vite';
26
- const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.name);
26
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.project);
27
27
  if (projectConfig.targets['build']?.executor === '@nx/webpack:webpack' ||
28
28
  projectConfig.targets['build']?.executor === '@nrwl/webpack:webpack' ||
29
29
  projectConfig.targets['build']?.executor === '@nx/rollup:rollup' ||
@@ -31,7 +31,7 @@ async function storybookConfigurationGenerator(host, schema) {
31
31
  uiFramework = '@storybook/react-webpack5';
32
32
  }
33
33
  const installTask = await configurationGenerator(host, {
34
- name: schema.name,
34
+ project: schema.project,
35
35
  configureCypress: schema.configureCypress,
36
36
  js: schema.js,
37
37
  linter: schema.linter,
@@ -1,7 +1,7 @@
1
1
  import { Linter } from '@nx/eslint';
2
2
 
3
3
  export interface StorybookConfigureSchema {
4
- name: string;
4
+ project: string;
5
5
  interactionTests?: boolean;
6
6
  generateStories?: boolean;
7
7
  js?: boolean;
@@ -6,9 +6,9 @@
6
6
  "description": "Set up Storybook for a React app or library.",
7
7
  "type": "object",
8
8
  "properties": {
9
- "name": {
9
+ "project": {
10
10
  "type": "string",
11
- "aliases": ["project", "projectName"],
11
+ "aliases": ["name", "projectName"],
12
12
  "description": "Project for which to generate Storybook configuration.",
13
13
  "$default": {
14
14
  "$source": "argv",
@@ -90,6 +90,6 @@
90
90
  ]
91
91
  }
92
92
  },
93
- "required": ["name"],
93
+ "required": ["project"],
94
94
  "examplesFile": "../../../docs/storybook-configuration-examples.md"
95
95
  }