@nx/react 23.0.0-beta.18 → 23.0.0-beta.19
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 +16 -16
- package/plugins/component-testing/index.js +7 -7
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts +1 -1
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts.map +1 -1
- package/src/generators/cypress-component-configuration/lib/add-files.js +2 -2
- package/src/utils/ct-utils.d.ts +1 -1
- package/src/utils/ct-utils.d.ts.map +1 -1
- package/src/utils/ct-utils.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.19",
|
|
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, Vitest, Playwright, 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,28 +37,28 @@
|
|
|
37
37
|
"@svgr/webpack": "^8.0.1",
|
|
38
38
|
"minimatch": "10.2.5",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/devkit": "23.0.0-beta.
|
|
41
|
-
"@nx/js": "23.0.0-beta.
|
|
42
|
-
"@nx/eslint": "23.0.0-beta.
|
|
43
|
-
"@nx/web": "23.0.0-beta.
|
|
44
|
-
"@nx/module-federation": "23.0.0-beta.
|
|
45
|
-
"@nx/rollup": "23.0.0-beta.
|
|
40
|
+
"@nx/devkit": "23.0.0-beta.19",
|
|
41
|
+
"@nx/js": "23.0.0-beta.19",
|
|
42
|
+
"@nx/eslint": "23.0.0-beta.19",
|
|
43
|
+
"@nx/web": "23.0.0-beta.19",
|
|
44
|
+
"@nx/module-federation": "23.0.0-beta.19",
|
|
45
|
+
"@nx/rollup": "23.0.0-beta.19",
|
|
46
46
|
"express": "^4.21.2",
|
|
47
47
|
"http-proxy-middleware": "^3.0.5",
|
|
48
48
|
"semver": "^7.6.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@nx/cypress": "23.0.0-beta.
|
|
52
|
-
"@nx/playwright": "23.0.0-beta.
|
|
53
|
-
"@nx/rsbuild": "23.0.0-beta.
|
|
54
|
-
"@nx/vite": "23.0.0-beta.
|
|
55
|
-
"@nx/vitest": "23.0.0-beta.
|
|
56
|
-
"@nx/webpack": "23.0.0-beta.
|
|
57
|
-
"@nx/storybook": "23.0.0-beta.
|
|
58
|
-
"nx": "23.0.0-beta.
|
|
51
|
+
"@nx/cypress": "23.0.0-beta.19",
|
|
52
|
+
"@nx/playwright": "23.0.0-beta.19",
|
|
53
|
+
"@nx/rsbuild": "23.0.0-beta.19",
|
|
54
|
+
"@nx/vite": "23.0.0-beta.19",
|
|
55
|
+
"@nx/vitest": "23.0.0-beta.19",
|
|
56
|
+
"@nx/webpack": "23.0.0-beta.19",
|
|
57
|
+
"@nx/storybook": "23.0.0-beta.19",
|
|
58
|
+
"nx": "23.0.0-beta.19"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@nx/vite": "23.0.0-beta.
|
|
61
|
+
"@nx/vite": "23.0.0-beta.19"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.nxComponentTestingPreset = nxComponentTestingPreset;
|
|
4
4
|
const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/cypress/internal");
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const
|
|
7
|
+
const internal_2 = require("@nx/js/internal");
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
9
|
const path_1 = require("path");
|
|
10
10
|
/**
|
|
@@ -71,10 +71,10 @@ function nxComponentTestingPreset(pathToConfig, options) {
|
|
|
71
71
|
let webpackConfig = null;
|
|
72
72
|
try {
|
|
73
73
|
const graph = (0, devkit_1.readCachedProjectGraph)();
|
|
74
|
-
const { targets: ctTargets, name: ctProjectName } = (0,
|
|
74
|
+
const { targets: ctTargets, name: ctProjectName } = (0, internal_1.getProjectConfigByPath)(graph, pathToConfig);
|
|
75
75
|
const ctTargetName = options?.ctTargetName || 'component-test';
|
|
76
76
|
const ctConfigurationName = process.env.NX_CYPRESS_TARGET_CONFIGURATION;
|
|
77
|
-
const ctExecutorContext = (0,
|
|
77
|
+
const ctExecutorContext = (0, internal_1.createExecutorContext)(graph, ctTargets, ctProjectName, ctTargetName, ctConfigurationName);
|
|
78
78
|
let buildTarget = options?.buildTarget;
|
|
79
79
|
if (!buildTarget) {
|
|
80
80
|
const ctExecutorOptions = (0, devkit_1.readTargetOptions)({
|
|
@@ -161,13 +161,13 @@ function buildTargetWebpack(ctx, buildTarget, componentTestingProjectName) {
|
|
|
161
161
|
throw new InvalidExecutorError(`The '${parsed.target}' target of the '${parsed.project}' project is not using the '@nx/webpack:webpack' or '@nx/rspack:rspack' executor. ` +
|
|
162
162
|
`Please make sure to use '@nx/webpack:webpack' or '@nx/rspack:rspack' executor in that target to use Cypress Component Testing.`);
|
|
163
163
|
}
|
|
164
|
-
const context = (0,
|
|
164
|
+
const context = (0, internal_1.createExecutorContext)(graph, buildableProjectConfig.targets, parsed.project, parsed.target, parsed.target);
|
|
165
165
|
const { normalizeOptions, } = require('@nx/webpack/src/executors/webpack/lib/normalize-options');
|
|
166
166
|
const { resolveUserDefinedWebpackConfig, } = require('@nx/webpack/src/utils/webpack/resolve-user-defined-webpack-config');
|
|
167
167
|
const { composePluginsSync } = require('@nx/webpack/src/utils/config');
|
|
168
168
|
const { withNx } = require('@nx/webpack/src/utils/with-nx');
|
|
169
169
|
const { withWeb } = require('@nx/webpack/src/utils/with-web');
|
|
170
|
-
const options = normalizeOptions(withSchemaDefaults(parsed, context), devkit_1.workspaceRoot, buildableProjectConfig.root, (0,
|
|
170
|
+
const options = normalizeOptions(withSchemaDefaults(parsed, context), devkit_1.workspaceRoot, buildableProjectConfig.root, (0, internal_2.getProjectSourceRoot)(buildableProjectConfig));
|
|
171
171
|
let customWebpack;
|
|
172
172
|
if (options.webpackConfig) {
|
|
173
173
|
customWebpack = resolveUserDefinedWebpackConfig(options.webpackConfig, options.tsConfig.startsWith(context.root)
|
|
@@ -189,7 +189,7 @@ function buildTargetWebpack(ctx, buildTarget, componentTestingProjectName) {
|
|
|
189
189
|
extractLicenses: false,
|
|
190
190
|
root: devkit_1.workspaceRoot,
|
|
191
191
|
projectRoot: ctProjectConfig.root,
|
|
192
|
-
sourceRoot: (0,
|
|
192
|
+
sourceRoot: (0, internal_2.getProjectSourceRoot)(ctProjectConfig),
|
|
193
193
|
},
|
|
194
194
|
context,
|
|
195
195
|
configuration: parsed.configuration,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FoundTarget } from '@nx/cypress/
|
|
1
|
+
import type { FoundTarget } from '@nx/cypress/internal';
|
|
2
2
|
import { ProjectConfiguration, Tree } from '@nx/devkit';
|
|
3
3
|
import type { CypressComponentConfigurationSchema } from '../schema';
|
|
4
4
|
export declare function addFiles(tree: Tree, projectConfig: ProjectConfiguration, options: CypressComponentConfigurationSchema, found: FoundTarget): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/cypress-component-configuration/lib/add-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"add-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/cypress-component-configuration/lib/add-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAIL,oBAAoB,EACpB,IAAI,EAEL,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,WAAW,CAAC;AAErE,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,oBAAoB,EACnC,OAAO,EAAE,mCAAmC,EAC5C,KAAK,EAAE,WAAW,iBAqEnB"}
|
|
@@ -42,8 +42,8 @@ const component_test_1 = require("../../component-test/component-test");
|
|
|
42
42
|
async function addFiles(tree, projectConfig, options, found) {
|
|
43
43
|
// must dynamicaly import to prevent packages not using cypress from erroring out
|
|
44
44
|
// when importing react
|
|
45
|
-
const { addMountDefinition } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/
|
|
46
|
-
const { getInstalledCypressMajorVersion } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/
|
|
45
|
+
const { addMountDefinition } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/internal')));
|
|
46
|
+
const { getInstalledCypressMajorVersion } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/internal')));
|
|
47
47
|
const installedCypressMajorVersion = getInstalledCypressMajorVersion(tree);
|
|
48
48
|
// Specifically undefined to allow Remix workaround of passing an empty string
|
|
49
49
|
const actualBundler = await (0, ct_utils_1.getActualBundler)(tree, options, found);
|
package/src/utils/ct-utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { type FoundTarget } from '@nx/cypress/
|
|
2
|
+
import { type FoundTarget } from '@nx/cypress/internal';
|
|
3
3
|
export declare function configureCypressCT(tree: Tree, options: {
|
|
4
4
|
project: string;
|
|
5
5
|
buildTarget: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/utils/ct-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ct-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/utils/ct-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAQxD,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IACP,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACjC,GACA,OAAO,CAAC,WAAW,CAAC,CAiEtB;AAUD,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAY7B;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAC/D,KAAK,EAAE,WAAW,+BASnB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAmBjE"}
|
package/src/utils/ct-utils.js
CHANGED
|
@@ -48,7 +48,7 @@ async function configureCypressCT(tree, options) {
|
|
|
48
48
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
49
49
|
// Specifically undefined as a workaround for Remix to pass an empty string as the buildTarget
|
|
50
50
|
if (options.buildTarget === undefined) {
|
|
51
|
-
const { findBuildConfig } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/
|
|
51
|
+
const { findBuildConfig } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/internal')));
|
|
52
52
|
found = await findBuildConfig(tree, {
|
|
53
53
|
project: options.project,
|
|
54
54
|
buildTarget: options.buildTarget,
|
|
@@ -65,7 +65,7 @@ async function configureCypressCT(tree, options) {
|
|
|
65
65
|
throw new Error(`Cypress Component Testing is not currently supported for this project. Either 'executer' is not defined in '${target} target' of '${project} project.json' or executer present is not valid one. Valid ones are ${JSON.stringify([...options.validExecutorNames])}. Please check https://github.com/nrwl/nx/issues/21546 for more information.`);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
const { addDefaultCTConfig, getProjectCypressConfigPath } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/
|
|
68
|
+
const { addDefaultCTConfig, getProjectCypressConfigPath } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/internal')));
|
|
69
69
|
const ctConfigOptions = {
|
|
70
70
|
bundler: options.bundler ?? (await getActualBundler(tree, options, found)),
|
|
71
71
|
};
|