@nx/remix 19.5.6 → 19.6.0-beta.0
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/remix",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.6.0-beta.0",
|
|
4
4
|
"description": "The Remix plugin for Nx contains executors and generators for managing Remix applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Jest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, routes, loaders, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"migrations": "./migrations.json"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nx/devkit": "19.
|
|
33
|
-
"@nx/js": "19.
|
|
34
|
-
"@nx/react": "19.
|
|
32
|
+
"@nx/devkit": "19.6.0-beta.0",
|
|
33
|
+
"@nx/js": "19.6.0-beta.0",
|
|
34
|
+
"@nx/react": "19.6.0-beta.0",
|
|
35
35
|
"tslib": "^2.3.1",
|
|
36
36
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
37
|
-
"@nrwl/remix": "19.
|
|
37
|
+
"@nrwl/remix": "19.6.0-beta.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {},
|
|
40
40
|
"publishConfig": {
|
|
@@ -9,7 +9,7 @@ const lib_1 = require("./lib");
|
|
|
9
9
|
const update_dependencies_1 = require("../utils/update-dependencies");
|
|
10
10
|
const init_1 = require("../init/init");
|
|
11
11
|
const js_1 = require("@nx/js");
|
|
12
|
-
const
|
|
12
|
+
const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
|
|
13
13
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
14
14
|
const testing_config_utils_1 = require("../../utils/testing-config-utils");
|
|
15
15
|
function remixApplicationGenerator(tree, options) {
|
|
@@ -27,7 +27,7 @@ async function remixApplicationGeneratorInternal(tree, _options) {
|
|
|
27
27
|
}),
|
|
28
28
|
await (0, js_1.initGenerator)(tree, { skipFormat: true }),
|
|
29
29
|
];
|
|
30
|
-
(0,
|
|
30
|
+
(0, target_defaults_utils_1.addBuildTargetDefaults)(tree, '@nx/remix:build');
|
|
31
31
|
(0, devkit_1.addProjectConfiguration)(tree, options.projectName, {
|
|
32
32
|
root: options.projectRoot,
|
|
33
33
|
sourceRoot: `${options.projectRoot}`,
|
|
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addE2E = addE2E;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("../../../utils/versions");
|
|
6
|
+
const find_plugin_for_config_file_1 = require("@nx/devkit/src/utils/find-plugin-for-config-file");
|
|
7
|
+
const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
|
|
6
8
|
async function addE2E(tree, options) {
|
|
9
|
+
const hasRemixPlugin = (0, devkit_1.readNxJson)(tree).plugins?.find((p) => typeof p === 'string'
|
|
10
|
+
? p === '@nx/remix/plugin'
|
|
11
|
+
: p.plugin === '@nx/remix/plugin');
|
|
7
12
|
if (options.e2eTestRunner === 'cypress') {
|
|
8
13
|
const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/cypress', (0, versions_1.getPackageVersion)(tree, 'nx'));
|
|
9
14
|
(0, devkit_1.addProjectConfiguration)(tree, options.e2eProjectName, {
|
|
@@ -14,7 +19,7 @@ async function addE2E(tree, options) {
|
|
|
14
19
|
tags: [],
|
|
15
20
|
implicitDependencies: [options.projectName],
|
|
16
21
|
});
|
|
17
|
-
|
|
22
|
+
const e2eTask = await configurationGenerator(tree, {
|
|
18
23
|
project: options.e2eProjectName,
|
|
19
24
|
directory: 'src',
|
|
20
25
|
skipFormat: true,
|
|
@@ -22,6 +27,20 @@ async function addE2E(tree, options) {
|
|
|
22
27
|
baseUrl: options.e2eWebServerAddress,
|
|
23
28
|
addPlugin: options.addPlugin,
|
|
24
29
|
});
|
|
30
|
+
if (options.addPlugin ||
|
|
31
|
+
(0, devkit_1.readNxJson)(tree).plugins?.find((p) => typeof p === 'string'
|
|
32
|
+
? p === '@nx/cypress/plugin'
|
|
33
|
+
: p.plugin === '@nx/cypress/plugin')) {
|
|
34
|
+
let buildTarget = '^build';
|
|
35
|
+
if (hasRemixPlugin) {
|
|
36
|
+
const matchingPlugin = await (0, find_plugin_for_config_file_1.findPluginForConfigFile)(tree, `@nx/remix/plugin`, (0, devkit_1.joinPathFragments)(options.projectRoot, 'remix.config.js'));
|
|
37
|
+
if (matchingPlugin && typeof matchingPlugin !== 'string') {
|
|
38
|
+
buildTarget = `^${matchingPlugin.options?.buildTargetName ?? 'build'}`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
await (0, target_defaults_utils_1.addE2eCiTargetDefaults)(tree, '@nx/cypress/plugin', buildTarget, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, `cypress.config.${options.js ? 'js' : 'ts'}`));
|
|
42
|
+
}
|
|
43
|
+
return e2eTask;
|
|
25
44
|
}
|
|
26
45
|
else if (options.e2eTestRunner === 'playwright') {
|
|
27
46
|
const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/playwright', (0, versions_1.getPackageVersion)(tree, 'nx'));
|
|
@@ -33,7 +52,7 @@ async function addE2E(tree, options) {
|
|
|
33
52
|
tags: [],
|
|
34
53
|
implicitDependencies: [options.projectName],
|
|
35
54
|
});
|
|
36
|
-
|
|
55
|
+
const e2eTask = await configurationGenerator(tree, {
|
|
37
56
|
project: options.e2eProjectName,
|
|
38
57
|
skipFormat: true,
|
|
39
58
|
skipPackageJson: false,
|
|
@@ -46,6 +65,20 @@ async function addE2E(tree, options) {
|
|
|
46
65
|
rootProject: options.rootProject,
|
|
47
66
|
addPlugin: options.addPlugin,
|
|
48
67
|
});
|
|
68
|
+
if (options.addPlugin ||
|
|
69
|
+
(0, devkit_1.readNxJson)(tree).plugins?.find((p) => typeof p === 'string'
|
|
70
|
+
? p === '@nx/playwright/plugin'
|
|
71
|
+
: p.plugin === '@nx/playwright/plugin')) {
|
|
72
|
+
let buildTarget = '^build';
|
|
73
|
+
if (hasRemixPlugin) {
|
|
74
|
+
const matchingPlugin = await (0, find_plugin_for_config_file_1.findPluginForConfigFile)(tree, `@nx/remix/plugin`, (0, devkit_1.joinPathFragments)(options.projectRoot, 'remix.config.js'));
|
|
75
|
+
if (matchingPlugin && typeof matchingPlugin !== 'string') {
|
|
76
|
+
buildTarget = `^${matchingPlugin.options?.buildTargetName ?? 'build'}`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
await (0, target_defaults_utils_1.addE2eCiTargetDefaults)(tree, '@nx/playwright/plugin', buildTarget, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, `playwright.config.ts`));
|
|
80
|
+
}
|
|
81
|
+
return e2eTask;
|
|
49
82
|
}
|
|
50
83
|
else {
|
|
51
84
|
return () => { };
|