@nx/next 20.2.1 → 20.3.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/next",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.0-beta.0",
|
|
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": "20.
|
|
38
|
+
"@nx/devkit": "20.3.0-beta.0",
|
|
39
39
|
"@babel/plugin-proposal-decorators": "^7.22.7",
|
|
40
40
|
"@svgr/webpack": "^8.0.1",
|
|
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": "20.
|
|
48
|
-
"@nx/eslint": "20.
|
|
49
|
-
"@nx/react": "20.
|
|
50
|
-
"@nx/web": "20.
|
|
51
|
-
"@nx/webpack": "20.
|
|
47
|
+
"@nx/js": "20.3.0-beta.0",
|
|
48
|
+
"@nx/eslint": "20.3.0-beta.0",
|
|
49
|
+
"@nx/react": "20.3.0-beta.0",
|
|
50
|
+
"@nx/web": "20.3.0-beta.0",
|
|
51
|
+
"@nx/webpack": "20.3.0-beta.0",
|
|
52
52
|
"@phenomnomnominal/tsquery": "~5.0.1"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.componentGenerator = componentGenerator;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
5
6
|
const react_1 = require("@nx/react");
|
|
6
7
|
const styles_1 = require("../../utils/styles");
|
|
7
|
-
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
8
8
|
/*
|
|
9
9
|
* This schematic is basically the React one, but for Next we need
|
|
10
10
|
* extra dependencies for css, sass, less style options.
|
|
11
11
|
*/
|
|
12
12
|
async function componentGenerator(host, options) {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// we only need to provide the path to get the project, we let the react
|
|
14
|
+
// generator handle the rest
|
|
15
|
+
const { project: projectName } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(host, {
|
|
15
16
|
path: options.path,
|
|
16
|
-
fileExtension: 'tsx',
|
|
17
17
|
});
|
|
18
18
|
const componentInstall = await (0, react_1.componentGenerator)(host, {
|
|
19
19
|
...options,
|
|
20
|
-
name,
|
|
21
20
|
classComponent: false,
|
|
22
21
|
routing: false,
|
|
23
22
|
skipFormat: true,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"properties": {
|
|
9
9
|
"path": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"description": "The file path to the component
|
|
11
|
+
"description": "The file path to the component. Relative to the current working directory.",
|
|
12
12
|
"$default": {
|
|
13
13
|
"$source": "argv",
|
|
14
14
|
"index": 0
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"js": {
|
|
76
76
|
"type": "boolean",
|
|
77
77
|
"description": "Generate JavaScript files rather than TypeScript files.",
|
|
78
|
-
"
|
|
78
|
+
"x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
|
|
79
79
|
},
|
|
80
80
|
"skipFormat": {
|
|
81
81
|
"description": "Skip formatting files.",
|
|
@@ -61,18 +61,13 @@ async function normalizeOptions(host, options) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
// represents a directory, so we artificially add the symbol name to it
|
|
66
|
-
options.path = (0, devkit_1.joinPathFragments)(options.path, pageSymbolName);
|
|
67
|
-
const { project: projectName, fileName } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(host, {
|
|
64
|
+
const { project: projectName, filePath } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(host, {
|
|
68
65
|
name: pageSymbolName,
|
|
69
|
-
|
|
70
|
-
path: options.path,
|
|
71
|
-
fileExtension: 'tsx',
|
|
66
|
+
path: (0, devkit_1.joinPathFragments)(options.path, isAppRouter ? 'page.tsx' : 'index.tsx'),
|
|
72
67
|
});
|
|
73
68
|
return {
|
|
74
69
|
...options,
|
|
75
|
-
|
|
70
|
+
path: filePath,
|
|
76
71
|
projectName,
|
|
77
72
|
};
|
|
78
73
|
}
|