@nx/react 17.3.0 → 17.3.1
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/plugins/component-testing/index.js +1 -1
- package/src/generators/application/schema.json +3 -3
- package/src/generators/component/schema.d.ts +4 -4
- package/src/generators/component/schema.json +7 -7
- package/src/generators/component-cypress-spec/schema.json +1 -1
- package/src/generators/component-story/schema.json +1 -1
- package/src/generators/component-test/schema.json +1 -1
- package/src/generators/federate-module/schema.json +1 -1
- package/src/generators/hook/schema.d.ts +4 -4
- package/src/generators/hook/schema.json +5 -5
- package/src/generators/host/schema.d.ts +1 -1
- package/src/generators/host/schema.json +3 -3
- package/src/generators/init/schema.json +1 -1
- package/src/generators/library/schema.json +3 -3
- package/src/generators/redux/schema.d.ts +1 -1
- package/src/generators/redux/schema.json +2 -2
- package/src/generators/remote/schema.d.ts +1 -1
- package/src/generators/remote/schema.json +3 -3
- package/src/generators/setup-ssr/schema.json +1 -1
- package/src/generators/setup-tailwind/schema.json +1 -1
- package/src/generators/stories/schema.json +1 -1
- package/src/generators/storybook-configuration/configuration.js +1 -1
- package/src/generators/storybook-configuration/schema.json +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "17.3.
|
|
3
|
+
"version": "17.3.1",
|
|
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": "9.0.3",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/devkit": "17.3.
|
|
41
|
-
"@nx/js": "17.3.
|
|
42
|
-
"@nx/eslint": "17.3.
|
|
43
|
-
"@nx/web": "17.3.
|
|
44
|
-
"@nrwl/react": "17.3.
|
|
40
|
+
"@nx/devkit": "17.3.1",
|
|
41
|
+
"@nx/js": "17.3.1",
|
|
42
|
+
"@nx/eslint": "17.3.1",
|
|
43
|
+
"@nx/web": "17.3.1",
|
|
44
|
+
"@nrwl/react": "17.3.1"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
@@ -152,7 +152,7 @@ function buildTargetWebpack(ctx, buildTarget, componentTestingProjectName) {
|
|
|
152
152
|
}
|
|
153
153
|
return async () => {
|
|
154
154
|
customWebpack = await customWebpack;
|
|
155
|
-
// TODO(
|
|
155
|
+
// TODO(v19): Once webpackConfig is always set in @nx/webpack:webpack and isolatedConfig is removed, we no longer need this default.
|
|
156
156
|
const configure = composePluginsSync(withNx(), withWeb());
|
|
157
157
|
const defaultWebpack = configure({}, {
|
|
158
158
|
options: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxReactApp",
|
|
5
5
|
"title": "Create a React Application",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"value": "scss",
|
|
59
|
-
"label": "SASS(.scss) [
|
|
59
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"value": "less",
|
|
63
|
-
"label": "LESS [
|
|
63
|
+
"label": "LESS [ https://lesscss.org ]"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"value": "styled-components",
|
|
@@ -3,7 +3,7 @@ import { SupportedStyles } from '../../../typings/style';
|
|
|
3
3
|
export interface Schema {
|
|
4
4
|
name: string;
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx
|
|
6
|
+
* @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19.
|
|
7
7
|
*/
|
|
8
8
|
project?: string;
|
|
9
9
|
style: SupportedStyles;
|
|
@@ -11,18 +11,18 @@ export interface Schema {
|
|
|
11
11
|
directory?: string;
|
|
12
12
|
export?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
* @deprecated Provide the `name` in pascal-case and use the `as-provided` format. This option will be removed in Nx
|
|
14
|
+
* @deprecated Provide the `name` in pascal-case and use the `as-provided` format. This option will be removed in Nx v19.
|
|
15
15
|
*/
|
|
16
16
|
pascalCaseFiles?: boolean;
|
|
17
17
|
/**
|
|
18
|
-
* @deprecated Provide the `directory` in pascal-case and use the `as-provided` format. This option will be removed in Nx
|
|
18
|
+
* @deprecated Provide the `directory` in pascal-case and use the `as-provided` format. This option will be removed in Nx v19.
|
|
19
19
|
*/
|
|
20
20
|
pascalCaseDirectory?: boolean;
|
|
21
21
|
classComponent?: boolean;
|
|
22
22
|
routing?: boolean;
|
|
23
23
|
js?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. This option will be removed in Nx
|
|
25
|
+
* @deprecated Provide the `directory` option instead and use the `as-provided` format. This option will be removed in Nx v19.
|
|
26
26
|
*/
|
|
27
27
|
flat?: boolean;
|
|
28
28
|
globalCss?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxReactComponent",
|
|
5
5
|
"title": "Create a React Component",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"$default": {
|
|
14
14
|
"$source": "projectName"
|
|
15
15
|
},
|
|
16
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx
|
|
16
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19."
|
|
17
17
|
},
|
|
18
18
|
"name": {
|
|
19
19
|
"type": "string",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"value": "scss",
|
|
43
|
-
"label": "SASS(.scss) [
|
|
43
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"value": "less",
|
|
47
|
-
"label": "LESS [
|
|
47
|
+
"label": "LESS [ https://lesscss.org ]"
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"value": "styled-components",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"type": "boolean",
|
|
92
92
|
"description": "Create component at the source root rather than its own directory.",
|
|
93
93
|
"default": false,
|
|
94
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. This option will be removed in Nx
|
|
94
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. This option will be removed in Nx v19."
|
|
95
95
|
},
|
|
96
96
|
"export": {
|
|
97
97
|
"type": "boolean",
|
|
@@ -105,14 +105,14 @@
|
|
|
105
105
|
"description": "Use pascal case component file name (e.g. `App.tsx`).",
|
|
106
106
|
"alias": "P",
|
|
107
107
|
"default": false,
|
|
108
|
-
"x-deprecated": "Provide the `name` in pascal-case and use the `as-provided` format. This option will be removed in Nx
|
|
108
|
+
"x-deprecated": "Provide the `name` in pascal-case and use the `as-provided` format. This option will be removed in Nx v19."
|
|
109
109
|
},
|
|
110
110
|
"pascalCaseDirectory": {
|
|
111
111
|
"type": "boolean",
|
|
112
112
|
"description": "Use pascal case directory name (e.g. `App/App.tsx`).",
|
|
113
113
|
"alias": "R",
|
|
114
114
|
"default": false,
|
|
115
|
-
"x-deprecated": "Provide the `directory` in pascal-case and use the `as-provided` format. This option will be removed in Nx
|
|
115
|
+
"x-deprecated": "Provide the `directory` in pascal-case and use the `as-provided` format. This option will be removed in Nx v19."
|
|
116
116
|
},
|
|
117
117
|
"classComponent": {
|
|
118
118
|
"type": "boolean",
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export interface Schema {
|
|
2
2
|
name: string;
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx
|
|
4
|
+
* @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19.
|
|
5
5
|
*/
|
|
6
6
|
project: string;
|
|
7
7
|
skipTests?: boolean;
|
|
8
8
|
directory?: string;
|
|
9
9
|
export?: boolean;
|
|
10
10
|
/**
|
|
11
|
-
* @deprecated Provide the `name` option instead and use the `as-provided` format. This option will be removed in Nx
|
|
11
|
+
* @deprecated Provide the `name` option instead and use the `as-provided` format. This option will be removed in Nx v19.
|
|
12
12
|
*/
|
|
13
13
|
pascalCaseFiles?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. This option will be removed in Nx
|
|
15
|
+
* @deprecated Provide the `directory` option instead and use the `as-provided` format. This option will be removed in Nx v19.
|
|
16
16
|
*/
|
|
17
17
|
pascalCaseDirectory?: boolean;
|
|
18
18
|
/**
|
|
19
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. This option will be removed in Nx
|
|
19
|
+
* @deprecated Provide the `directory` option instead and use the `as-provided` format. This option will be removed in Nx v19.
|
|
20
20
|
*/
|
|
21
21
|
flat?: boolean;
|
|
22
22
|
js?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxReactHook",
|
|
5
5
|
"title": "Create a React Hook for Nx",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"$default": {
|
|
20
20
|
"$source": "projectName"
|
|
21
21
|
},
|
|
22
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx
|
|
22
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19."
|
|
23
23
|
},
|
|
24
24
|
"name": {
|
|
25
25
|
"type": "string",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"type": "boolean",
|
|
57
57
|
"description": "Create hook at the source root rather than its own directory.",
|
|
58
58
|
"default": false,
|
|
59
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx
|
|
59
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19."
|
|
60
60
|
},
|
|
61
61
|
"export": {
|
|
62
62
|
"type": "boolean",
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
"description": "Use pascal case hook file name (e.g. `useHook.ts`).",
|
|
71
71
|
"alias": "P",
|
|
72
72
|
"default": false,
|
|
73
|
-
"x-deprecated": "Provide the `name` in pascal-case and use the `as-provided` format. This option will be removed in Nx
|
|
73
|
+
"x-deprecated": "Provide the `name` in pascal-case and use the `as-provided` format. This option will be removed in Nx v19."
|
|
74
74
|
},
|
|
75
75
|
"pascalCaseDirectory": {
|
|
76
76
|
"type": "boolean",
|
|
77
77
|
"description": "Use pascal case directory name (e.g. `useHook/useHook.ts`).",
|
|
78
78
|
"alias": "R",
|
|
79
79
|
"default": false,
|
|
80
|
-
"x-deprecated": "Provide the `directory` in pascal-case and use the `as-provided` format. This option will be removed in Nx
|
|
80
|
+
"x-deprecated": "Provide the `directory` in pascal-case and use the `as-provided` format. This option will be removed in Nx v19."
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"required": ["name"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
2
|
import type { Linter } from '@nx/eslint';
|
|
3
|
-
import type { SupportedStyles } from '../../../typings';
|
|
3
|
+
import type { SupportedStyles } from '../../../typings/style';
|
|
4
4
|
|
|
5
5
|
export interface Schema {
|
|
6
6
|
classComponent?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"$id": "GeneratorReactHost",
|
|
4
4
|
"cli": "nx",
|
|
5
5
|
"title": "Generate Module Federation Setup for React Host App",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"value": "scss",
|
|
46
|
-
"label": "SASS(.scss) [
|
|
46
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"value": "less",
|
|
50
|
-
"label": "LESS [
|
|
50
|
+
"label": "LESS [ https://lesscss.org ]"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"value": "styled-components",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxReactLibrary",
|
|
5
5
|
"title": "Create a React Library",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
{ "value": "css", "label": "CSS" },
|
|
51
51
|
{
|
|
52
52
|
"value": "scss",
|
|
53
|
-
"label": "SASS(.scss) [
|
|
53
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"value": "less",
|
|
57
|
-
"label": "LESS [
|
|
57
|
+
"label": "LESS [ https://lesscss.org ]"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"value": "styled-components",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface Schema {
|
|
2
2
|
name: string;
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx
|
|
4
|
+
* @deprecated Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19.
|
|
5
5
|
*/
|
|
6
6
|
project?: string;
|
|
7
7
|
directory?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "redux",
|
|
5
5
|
"title": "Create Redux state",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"$default": {
|
|
23
23
|
"$source": "projectName"
|
|
24
24
|
},
|
|
25
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx
|
|
25
|
+
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19."
|
|
26
26
|
},
|
|
27
27
|
"directory": {
|
|
28
28
|
"type": "string",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
2
|
import type { Linter } from '@nx/eslint';
|
|
3
|
-
import type { SupportedStyles } from '../../../typings';
|
|
3
|
+
import type { SupportedStyles } from '../../../typings/style';
|
|
4
4
|
import type { NormalizedSchema as ApplicationNormalizedSchema } from '../application/schema';
|
|
5
5
|
|
|
6
6
|
export interface Schema {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"$id": "GeneratorReactRemote",
|
|
4
4
|
"cli": "nx",
|
|
5
5
|
"title": "Generate Module Federation Setup for React Remote App",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"value": "scss",
|
|
52
|
-
"label": "SASS(.scss) [
|
|
52
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"value": "less",
|
|
56
|
-
"label": "LESS [
|
|
56
|
+
"label": "LESS [ https://lesscss.org ]"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"value": "styled-components",
|
|
@@ -5,7 +5,7 @@ const stories_1 = require("../stories/stories");
|
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const versions_1 = require("../../utils/versions");
|
|
7
7
|
async function generateStories(host, schema) {
|
|
8
|
-
// TODO(katerina): Nx
|
|
8
|
+
// TODO(katerina): Nx 19 -> 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
11
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.project);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxReactStorybookConfigure",
|
|
5
5
|
"title": "React Storybook Configure",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"configureCypress": {
|
|
30
30
|
"type": "boolean",
|
|
31
31
|
"description": "Run the cypress-configure generator.",
|
|
32
|
-
"x-deprecated": "Use interactionTests instead. This option will be removed in
|
|
32
|
+
"x-deprecated": "Use interactionTests instead. This option will be removed in v19."
|
|
33
33
|
},
|
|
34
34
|
"generateStories": {
|
|
35
35
|
"type": "boolean",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"generateCypressSpecs": {
|
|
42
42
|
"type": "boolean",
|
|
43
43
|
"description": "Automatically generate test files in the Cypress E2E app generated by the `cypress-configure` generator.",
|
|
44
|
-
"x-deprecated": "Use interactionTests instead. This option will be removed in
|
|
44
|
+
"x-deprecated": "Use interactionTests instead. This option will be removed in v19."
|
|
45
45
|
},
|
|
46
46
|
"configureStaticServe": {
|
|
47
47
|
"type": "boolean",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"cypressDirectory": {
|
|
54
54
|
"type": "string",
|
|
55
55
|
"description": "A directory where the Cypress project will be placed. Placed at the root by default.",
|
|
56
|
-
"x-deprecated": "Use interactionTests instead. This option will be removed in
|
|
56
|
+
"x-deprecated": "Use interactionTests instead. This option will be removed in v19."
|
|
57
57
|
},
|
|
58
58
|
"js": {
|
|
59
59
|
"type": "boolean",
|