@nx/next 21.0.0-beta.4 → 21.0.0-beta.5
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/next",
|
|
3
|
-
"version": "21.0.0-beta.
|
|
3
|
+
"version": "21.0.0-beta.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"next": ">=14.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nx/devkit": "21.0.0-beta.
|
|
38
|
+
"@nx/devkit": "21.0.0-beta.5",
|
|
39
39
|
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
40
40
|
"@svgr/webpack": "^8.1.0",
|
|
41
41
|
"copy-webpack-plugin": "^10.2.4",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"semver": "^7.5.3",
|
|
45
45
|
"tslib": "^2.3.0",
|
|
46
46
|
"webpack-merge": "^5.8.0",
|
|
47
|
-
"@nx/js": "21.0.0-beta.
|
|
48
|
-
"@nx/eslint": "21.0.0-beta.
|
|
49
|
-
"@nx/react": "21.0.0-beta.
|
|
50
|
-
"@nx/web": "21.0.0-beta.
|
|
51
|
-
"@nx/webpack": "21.0.0-beta.
|
|
47
|
+
"@nx/js": "21.0.0-beta.5",
|
|
48
|
+
"@nx/eslint": "21.0.0-beta.5",
|
|
49
|
+
"@nx/react": "21.0.0-beta.5",
|
|
50
|
+
"@nx/web": "21.0.0-beta.5",
|
|
51
|
+
"@nx/webpack": "21.0.0-beta.5",
|
|
52
52
|
"@phenomnomnominal/tsquery": "~5.0.1"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addE2e = addE2e;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const e2e_web_server_info_utils_1 = require("@nx/devkit/src/generators/e2e-web-server-info-utils");
|
|
6
|
-
const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
|
|
7
|
-
const find_plugin_for_config_file_1 = require("@nx/devkit/src/utils/find-plugin-for-config-file");
|
|
8
6
|
const eslint_1 = require("@nx/eslint");
|
|
9
7
|
const web_1 = require("@nx/web");
|
|
10
8
|
const versions_1 = require("../../../utils/versions");
|
|
@@ -56,27 +54,12 @@ async function addE2e(host, options) {
|
|
|
56
54
|
devServerTarget: e2eWebServerInfo.e2eDevServerTarget,
|
|
57
55
|
baseUrl: e2eWebServerInfo.e2eWebServerAddress,
|
|
58
56
|
jsx: true,
|
|
59
|
-
webServerCommands:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
: undefined,
|
|
57
|
+
webServerCommands: {
|
|
58
|
+
default: e2eWebServerInfo.e2eWebServerCommand,
|
|
59
|
+
},
|
|
64
60
|
ciWebServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
|
|
65
61
|
ciBaseUrl: e2eWebServerInfo.e2eCiBaseUrl,
|
|
66
62
|
});
|
|
67
|
-
if (options.addPlugin ||
|
|
68
|
-
(0, devkit_1.readNxJson)(host).plugins?.find((p) => typeof p === 'string'
|
|
69
|
-
? p === '@nx/cypress/plugin'
|
|
70
|
-
: p.plugin === '@nx/cypress/plugin')) {
|
|
71
|
-
let buildTarget = '^build';
|
|
72
|
-
if (hasPlugin) {
|
|
73
|
-
const matchingPlugin = await (0, find_plugin_for_config_file_1.findPluginForConfigFile)(host, '@nx/next/plugin', (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'next.config.js'));
|
|
74
|
-
if (matchingPlugin && typeof matchingPlugin !== 'string') {
|
|
75
|
-
buildTarget = `^${matchingPlugin.options?.buildTargetName ?? 'build'}`;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
await (0, target_defaults_utils_1.addE2eCiTargetDefaults)(host, '@nx/cypress/plugin', buildTarget, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, `cypress.config.${options.js ? 'js' : 'ts'}`));
|
|
79
|
-
}
|
|
80
63
|
return e2eTask;
|
|
81
64
|
}
|
|
82
65
|
else if (options.e2eTestRunner === 'playwright') {
|
|
@@ -117,19 +100,6 @@ async function addE2e(host, options) {
|
|
|
117
100
|
webServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
|
|
118
101
|
addPlugin: options.addPlugin,
|
|
119
102
|
});
|
|
120
|
-
if (options.addPlugin ||
|
|
121
|
-
(0, devkit_1.readNxJson)(host).plugins?.find((p) => typeof p === 'string'
|
|
122
|
-
? p === '@nx/playwright/plugin'
|
|
123
|
-
: p.plugin === '@nx/playwright/plugin')) {
|
|
124
|
-
let buildTarget = '^build';
|
|
125
|
-
if (hasPlugin) {
|
|
126
|
-
const matchingPlugin = await (0, find_plugin_for_config_file_1.findPluginForConfigFile)(host, '@nx/next/plugin', (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'next.config.js'));
|
|
127
|
-
if (matchingPlugin && typeof matchingPlugin !== 'string') {
|
|
128
|
-
buildTarget = `^${matchingPlugin.options?.buildTargetName ?? 'build'}`;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
await (0, target_defaults_utils_1.addE2eCiTargetDefaults)(host, '@nx/playwright/plugin', buildTarget, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, `playwright.config.ts`));
|
|
132
|
-
}
|
|
133
103
|
return e2eTask;
|
|
134
104
|
}
|
|
135
105
|
return () => { };
|