@nx/react 17.3.0-beta.1 → 17.3.0-beta.3
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 +9 -0
- package/package.json +6 -6
- package/src/generators/application/files/nx-welcome/src/app/nx-welcome.tsx +1 -1
- package/src/generators/storybook-configuration/configuration.d.ts +1 -0
- package/src/generators/storybook-configuration/configuration.js +12 -3
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/migrations.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "17.3.0-beta.
|
|
3
|
+
"version": "17.3.0-beta.3",
|
|
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.3.0-beta.
|
|
41
|
-
"@nx/js": "17.3.0-beta.
|
|
42
|
-
"@nx/eslint": "17.3.0-beta.
|
|
43
|
-
"@nx/web": "17.3.0-beta.
|
|
44
|
-
"@nrwl/react": "17.3.0-beta.
|
|
40
|
+
"@nx/devkit": "17.3.0-beta.3",
|
|
41
|
+
"@nx/js": "17.3.0-beta.3",
|
|
42
|
+
"@nx/eslint": "17.3.0-beta.3",
|
|
43
|
+
"@nx/web": "17.3.0-beta.3",
|
|
44
|
+
"@nrwl/react": "17.3.0-beta.3"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
@@ -2,3 +2,4 @@ import { StorybookConfigureSchema } from './schema';
|
|
|
2
2
|
import { Tree } from '@nx/devkit';
|
|
3
3
|
export declare function storybookConfigurationGenerator(host: Tree, schema: StorybookConfigureSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
4
4
|
export default storybookConfigurationGenerator;
|
|
5
|
+
export declare function findWebpackConfig(tree: Tree, projectRoot: string): string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storybookConfigurationGenerator = void 0;
|
|
3
|
+
exports.findWebpackConfig = exports.storybookConfigurationGenerator = void 0;
|
|
4
4
|
const stories_1 = require("../stories/stories");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const versions_1 = require("../../utils/versions");
|
|
@@ -24,8 +24,7 @@ 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
26
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.project);
|
|
27
|
-
if (projectConfig.
|
|
28
|
-
projectConfig.targets['build']?.executor === '@nrwl/webpack:webpack' ||
|
|
27
|
+
if (findWebpackConfig(host, projectConfig.root) ||
|
|
29
28
|
projectConfig.targets['build']?.executor === '@nx/rollup:rollup' ||
|
|
30
29
|
projectConfig.targets['build']?.executor === '@nrwl/rollup:rollup') {
|
|
31
30
|
uiFramework = '@storybook/react-webpack5';
|
|
@@ -50,3 +49,13 @@ async function storybookConfigurationGenerator(host, schema) {
|
|
|
50
49
|
}
|
|
51
50
|
exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
|
|
52
51
|
exports.default = storybookConfigurationGenerator;
|
|
52
|
+
function findWebpackConfig(tree, projectRoot) {
|
|
53
|
+
const allowsExt = ['js', 'mjs', 'ts', 'cjs', 'mts', 'cts'];
|
|
54
|
+
for (const ext of allowsExt) {
|
|
55
|
+
const webpackConfigPath = (0, devkit_1.joinPathFragments)(projectRoot, `webpack.config.${ext}`);
|
|
56
|
+
if (tree.exists(webpackConfigPath)) {
|
|
57
|
+
return webpackConfigPath;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.findWebpackConfig = findWebpackConfig;
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const babelLoaderVersion = "^9.1.2";
|
|
|
8
8
|
export declare const typesReactVersion = "18.2.33";
|
|
9
9
|
export declare const typesReactDomVersion = "18.2.14";
|
|
10
10
|
export declare const typesReactIsVersion = "18.2.2";
|
|
11
|
-
export declare const typesNodeVersion = "18.
|
|
11
|
+
export declare const typesNodeVersion = "18.16.9";
|
|
12
12
|
export declare const babelPresetReactVersion = "^7.14.5";
|
|
13
13
|
export declare const babelCoreVersion = "^7.14.5";
|
|
14
14
|
export declare const styledComponentsVersion = "5.3.6";
|
package/src/utils/versions.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.babelLoaderVersion = '^9.1.2';
|
|
|
12
12
|
exports.typesReactVersion = '18.2.33';
|
|
13
13
|
exports.typesReactDomVersion = '18.2.14';
|
|
14
14
|
exports.typesReactIsVersion = '18.2.2';
|
|
15
|
-
exports.typesNodeVersion = '18.
|
|
15
|
+
exports.typesNodeVersion = '18.16.9';
|
|
16
16
|
exports.babelPresetReactVersion = '^7.14.5';
|
|
17
17
|
exports.babelCoreVersion = '^7.14.5';
|
|
18
18
|
exports.styledComponentsVersion = '5.3.6';
|