@nx/react 17.1.1 → 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 +6 -6
- package/src/generators/application/application.js +1 -1
- package/src/generators/library/library.js +1 -1
- package/src/generators/storybook-configuration/configuration.js +5 -5
- package/src/generators/storybook-configuration/schema.d.ts +1 -1
- package/src/generators/storybook-configuration/schema.json +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "17.1.
|
|
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.
|
|
41
|
-
"@nx/js": "17.1.
|
|
42
|
-
"@nx/eslint": "17.1.
|
|
43
|
-
"@nx/web": "17.1.
|
|
44
|
-
"@nrwl/react": "17.1.
|
|
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: '
|
|
135
|
+
coverageProvider: 'v8',
|
|
136
136
|
project: options.projectName,
|
|
137
137
|
inSourceTests: options.inSourceTests,
|
|
138
138
|
skipFormat: true,
|
|
@@ -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: '
|
|
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.
|
|
12
|
-
const cypressProject = getE2eProjectName(schema.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
34
|
+
project: schema.project,
|
|
35
35
|
configureCypress: schema.configureCypress,
|
|
36
36
|
js: schema.js,
|
|
37
37
|
linter: schema.linter,
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"description": "Set up Storybook for a React app or library.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
|
-
"
|
|
9
|
+
"project": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"aliases": ["
|
|
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": ["
|
|
93
|
+
"required": ["project"],
|
|
94
94
|
"examplesFile": "../../../docs/storybook-configuration-examples.md"
|
|
95
95
|
}
|