@nx/next 23.1.0 → 23.1.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/dist/src/generators/application/lib/add-e2e.js +3 -1
- package/dist/src/generators/application/lib/add-jest.js +3 -2
- package/dist/src/generators/application/lib/add-linting.js +1 -1
- package/dist/src/generators/application/schema.d.ts +4 -0
- package/dist/src/generators/application/schema.json +8 -2
- package/dist/src/generators/library/schema.d.ts +4 -0
- package/dist/src/generators/library/schema.json +8 -2
- package/package.json +10 -10
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addE2e = addE2e;
|
|
4
4
|
const internal_1 = require("@nx/devkit/internal");
|
|
5
|
+
const internal_2 = require("@nx/eslint/internal");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
const web_1 = require("@nx/web");
|
|
7
8
|
const versions_1 = require("../../../utils/versions");
|
|
@@ -53,6 +54,7 @@ async function addE2e(host, options) {
|
|
|
53
54
|
devServerTarget: e2eWebServerInfo.e2eDevServerTarget,
|
|
54
55
|
baseUrl: e2eWebServerInfo.e2eWebServerAddress,
|
|
55
56
|
jsx: true,
|
|
57
|
+
enableTypedLinting: (0, internal_2.isTypedLintingEnabled)(options),
|
|
56
58
|
webServerCommands: {
|
|
57
59
|
default: e2eWebServerInfo.e2eWebServerCommand,
|
|
58
60
|
},
|
|
@@ -94,7 +96,7 @@ async function addE2e(host, options) {
|
|
|
94
96
|
directory: 'src',
|
|
95
97
|
js: false,
|
|
96
98
|
linter: options.linter,
|
|
97
|
-
|
|
99
|
+
enableTypedLinting: (0, internal_2.isTypedLintingEnabled)(options),
|
|
98
100
|
webServerAddress: e2eWebServerInfo.e2eCiBaseUrl,
|
|
99
101
|
webServerCommand: e2eWebServerInfo.e2eWebServerCommand,
|
|
100
102
|
addPlugin: options.addPlugin,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addJest = addJest;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const internal_1 = require("@nx/eslint/internal");
|
|
5
6
|
const versions_1 = require("../../../utils/versions");
|
|
6
7
|
async function addJest(host, options) {
|
|
7
8
|
if (options.unitTestRunner !== 'jest') {
|
|
@@ -27,8 +28,8 @@ async function addJest(host, options) {
|
|
|
27
28
|
});
|
|
28
29
|
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.spec.json'), (json) => {
|
|
29
30
|
json.compilerOptions.jsx = 'react';
|
|
30
|
-
//
|
|
31
|
-
if (
|
|
31
|
+
// Override exclude so typed linting doesn't fail on jest.config.ts and jest.config.cts.
|
|
32
|
+
if ((0, internal_1.isTypedLintingEnabled)(options)) {
|
|
32
33
|
const tsConfig = (0, devkit_1.readJson)(host, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.json'));
|
|
33
34
|
json.exclude = tsConfig.exclude.filter((e) => e !== 'jest.config.ts' && e !== 'jest.config.cts');
|
|
34
35
|
}
|
|
@@ -19,7 +19,7 @@ async function addLinting(host, options) {
|
|
|
19
19
|
unitTestRunner: options.unitTestRunner,
|
|
20
20
|
skipFormat: true,
|
|
21
21
|
rootProject: options.rootProject,
|
|
22
|
-
|
|
22
|
+
enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
|
|
23
23
|
addPlugin: options.addPlugin,
|
|
24
24
|
}));
|
|
25
25
|
if (options.linter === 'eslint' && (0, internal_1.isEslintConfigSupported)(host)) {
|
|
@@ -11,6 +11,10 @@ export interface Schema {
|
|
|
11
11
|
e2eTestRunner?: 'cypress' | 'playwright' | 'none';
|
|
12
12
|
linter?: Linter | LinterType;
|
|
13
13
|
js?: boolean;
|
|
14
|
+
enableTypedLinting?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
17
|
+
*/
|
|
14
18
|
setParserOptionsProject?: boolean;
|
|
15
19
|
swc?: boolean;
|
|
16
20
|
customServer?: boolean;
|
|
@@ -86,11 +86,17 @@
|
|
|
86
86
|
"description": "Generate JavaScript files rather than TypeScript files.",
|
|
87
87
|
"default": false
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"enableTypedLinting": {
|
|
90
90
|
"type": "boolean",
|
|
91
|
-
"description": "Whether
|
|
91
|
+
"description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
|
|
92
92
|
"default": false
|
|
93
93
|
},
|
|
94
|
+
"setParserOptionsProject": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"description": "Deprecated alias for `enableTypedLinting`.",
|
|
97
|
+
"default": false,
|
|
98
|
+
"x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
|
|
99
|
+
},
|
|
94
100
|
"swc": {
|
|
95
101
|
"description": "Enable the Rust-based compiler SWC to compile JS/TS files.",
|
|
96
102
|
"type": "boolean",
|
|
@@ -21,6 +21,10 @@ export interface Schema {
|
|
|
21
21
|
js?: boolean;
|
|
22
22
|
globalCss?: boolean;
|
|
23
23
|
strict?: boolean;
|
|
24
|
+
enableTypedLinting?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
27
|
+
*/
|
|
24
28
|
setParserOptionsProject?: boolean;
|
|
25
29
|
skipPackageJson?: boolean;
|
|
26
30
|
addPlugin?: boolean;
|
|
@@ -129,11 +129,17 @@
|
|
|
129
129
|
"description": "Whether to enable tsconfig strict mode or not.",
|
|
130
130
|
"default": true
|
|
131
131
|
},
|
|
132
|
-
"
|
|
132
|
+
"enableTypedLinting": {
|
|
133
133
|
"type": "boolean",
|
|
134
|
-
"description": "Whether
|
|
134
|
+
"description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
|
|
135
135
|
"default": false
|
|
136
136
|
},
|
|
137
|
+
"setParserOptionsProject": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"description": "Deprecated alias for `enableTypedLinting`.",
|
|
140
|
+
"default": false,
|
|
141
|
+
"x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
|
|
142
|
+
},
|
|
137
143
|
"skipPackageJson": {
|
|
138
144
|
"type": "boolean",
|
|
139
145
|
"default": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/next",
|
|
3
|
-
"version": "23.1.
|
|
3
|
+
"version": "23.1.1",
|
|
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": {
|
|
@@ -78,17 +78,17 @@
|
|
|
78
78
|
"tslib": "^2.3.0",
|
|
79
79
|
"webpack-merge": "^5.8.0",
|
|
80
80
|
"@phenomnomnominal/tsquery": "~6.2.0",
|
|
81
|
-
"@nx/devkit": "23.1.
|
|
82
|
-
"@nx/js": "23.1.
|
|
83
|
-
"@nx/eslint": "23.1.
|
|
84
|
-
"@nx/react": "23.1.
|
|
85
|
-
"@nx/web": "23.1.
|
|
86
|
-
"@nx/webpack": "23.1.
|
|
81
|
+
"@nx/devkit": "23.1.1",
|
|
82
|
+
"@nx/js": "23.1.1",
|
|
83
|
+
"@nx/eslint": "23.1.1",
|
|
84
|
+
"@nx/react": "23.1.1",
|
|
85
|
+
"@nx/web": "23.1.1",
|
|
86
|
+
"@nx/webpack": "23.1.1"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@nx/cypress": "23.1.
|
|
90
|
-
"@nx/playwright": "23.1.
|
|
91
|
-
"nx": "23.1.
|
|
89
|
+
"@nx/cypress": "23.1.1",
|
|
90
|
+
"@nx/playwright": "23.1.1",
|
|
91
|
+
"nx": "23.1.1"
|
|
92
92
|
},
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|