@nx/nest 24.0.0-canary.20261020-e7ffd79 → 24.0.0-rc.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/dist/src/generators/application/lib/normalize-options.js +4 -5
- package/dist/src/generators/application/schema.d.ts +0 -4
- package/dist/src/generators/application/schema.json +0 -6
- package/dist/src/generators/library/lib/normalize-options.js +5 -6
- package/dist/src/generators/library/schema.d.ts +0 -4
- package/dist/src/generators/library/schema.json +0 -6
- package/package.json +4 -5
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
exports.toNodeApplicationGeneratorOptions = toNodeApplicationGeneratorOptions;
|
|
5
5
|
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
-
const internal_2 = require("@nx/
|
|
7
|
-
const internal_3 = require("@nx/js/internal");
|
|
6
|
+
const internal_2 = require("@nx/js/internal");
|
|
8
7
|
async function normalizeOptions(tree, options) {
|
|
9
8
|
await (0, internal_1.ensureRootProjectName)(options, 'application');
|
|
10
9
|
const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
|
|
@@ -19,10 +18,10 @@ async function normalizeOptions(tree, options) {
|
|
|
19
18
|
strict: options.strict ?? false,
|
|
20
19
|
appProjectName,
|
|
21
20
|
appProjectRoot,
|
|
22
|
-
linter: await (0,
|
|
21
|
+
linter: await (0, internal_2.normalizeLinterOption)(tree, options.linter),
|
|
23
22
|
unitTestRunner: options.unitTestRunner ?? 'jest',
|
|
24
23
|
e2eTestRunner: options.e2eTestRunner ?? 'jest',
|
|
25
|
-
useProjectJson: options.useProjectJson ?? !(0,
|
|
24
|
+
useProjectJson: options.useProjectJson ?? !(0, internal_2.isUsingTsSolutionSetup)(tree),
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
27
|
function toNodeApplicationGeneratorOptions(options) {
|
|
@@ -37,7 +36,7 @@ function toNodeApplicationGeneratorOptions(options) {
|
|
|
37
36
|
tags: options.tags,
|
|
38
37
|
unitTestRunner: options.unitTestRunner,
|
|
39
38
|
e2eTestRunner: options.e2eTestRunner,
|
|
40
|
-
enableTypedLinting:
|
|
39
|
+
enableTypedLinting: options.enableTypedLinting,
|
|
41
40
|
rootProject: options.rootProject,
|
|
42
41
|
bundler: 'webpack', // Some features require webpack plugins such as TS transformers
|
|
43
42
|
isNest: true,
|
|
@@ -12,10 +12,6 @@ export interface ApplicationGeneratorOptions {
|
|
|
12
12
|
unitTestRunner?: 'jest' | 'vitest' | 'none';
|
|
13
13
|
e2eTestRunner?: 'jest' | 'none';
|
|
14
14
|
enableTypedLinting?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
17
|
-
*/
|
|
18
|
-
setParserOptionsProject?: boolean;
|
|
19
15
|
rootProject?: boolean;
|
|
20
16
|
strict?: boolean;
|
|
21
17
|
useTsSolution?: boolean;
|
|
@@ -71,12 +71,6 @@
|
|
|
71
71
|
"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.",
|
|
72
72
|
"default": false
|
|
73
73
|
},
|
|
74
|
-
"setParserOptionsProject": {
|
|
75
|
-
"type": "boolean",
|
|
76
|
-
"description": "Deprecated alias for `enableTypedLinting`.",
|
|
77
|
-
"default": false,
|
|
78
|
-
"x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
|
|
79
|
-
},
|
|
80
74
|
"strict": {
|
|
81
75
|
"type": "boolean",
|
|
82
76
|
"description": "Adds strictNullChecks, noImplicitAny, strictBindCallApply, forceConsistentCasingInFileNames and noFallthroughCasesInSwitch to tsconfig.",
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
exports.toJsLibraryGeneratorOptions = toJsLibraryGeneratorOptions;
|
|
5
5
|
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
-
const internal_2 = require("@nx/
|
|
7
|
-
const internal_3 = require("@nx/js/internal");
|
|
6
|
+
const internal_2 = require("@nx/js/internal");
|
|
8
7
|
async function normalizeOptions(tree, options) {
|
|
9
8
|
await (0, internal_1.ensureRootProjectName)(options, 'library');
|
|
10
9
|
const { projectName, names: projectNames, projectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(tree, {
|
|
@@ -20,16 +19,16 @@ async function normalizeOptions(tree, options) {
|
|
|
20
19
|
// this helper is called before the jsLibraryGenerator is called, so, if the
|
|
21
20
|
// TS solution setup is not configured, we additionally check if the TS
|
|
22
21
|
// solution setup will be configured by the jsLibraryGenerator
|
|
23
|
-
const isUsingTsSolutionsConfig = (0,
|
|
22
|
+
const isUsingTsSolutionsConfig = (0, internal_2.isUsingTsSolutionSetup)(tree) || (0, internal_2.shouldConfigureTsSolutionSetup)(tree);
|
|
24
23
|
const normalized = {
|
|
25
24
|
...options,
|
|
26
25
|
strict: options.strict ?? true,
|
|
27
26
|
controller: options.controller ?? false,
|
|
28
27
|
fileName,
|
|
29
28
|
global: options.global ?? false,
|
|
30
|
-
linter: await (0,
|
|
29
|
+
linter: await (0, internal_2.normalizeLinterOption)(tree, options.linter),
|
|
31
30
|
parsedTags,
|
|
32
|
-
prefix: (0,
|
|
31
|
+
prefix: (0, internal_2.getNpmScope)(tree), // we could also allow customizing this
|
|
33
32
|
projectName: isUsingTsSolutionsConfig && !options.name ? importPath : projectName,
|
|
34
33
|
projectRoot,
|
|
35
34
|
importPath,
|
|
@@ -60,7 +59,7 @@ function toJsLibraryGeneratorOptions(options) {
|
|
|
60
59
|
// `deleteFiles` drops the generated spec, and a library without a
|
|
61
60
|
// controller or service is left with none at all.
|
|
62
61
|
passWithNoTests: true,
|
|
63
|
-
enableTypedLinting:
|
|
62
|
+
enableTypedLinting: options.enableTypedLinting,
|
|
64
63
|
useProjectJson: options.useProjectJson,
|
|
65
64
|
};
|
|
66
65
|
}
|
|
@@ -29,10 +29,6 @@ export interface LibraryGeneratorOptions {
|
|
|
29
29
|
testEnvironment?: 'jsdom' | 'node';
|
|
30
30
|
unitTestRunner?: UnitTestRunner;
|
|
31
31
|
enableTypedLinting?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
34
|
-
*/
|
|
35
|
-
setParserOptionsProject?: boolean;
|
|
36
32
|
skipPackageJson?: boolean;
|
|
37
33
|
isUsingTsSolutionsConfig?: boolean;
|
|
38
34
|
useProjectJson?: boolean;
|
|
@@ -121,12 +121,6 @@
|
|
|
121
121
|
"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.",
|
|
122
122
|
"default": false
|
|
123
123
|
},
|
|
124
|
-
"setParserOptionsProject": {
|
|
125
|
-
"type": "boolean",
|
|
126
|
-
"description": "Deprecated alias for `enableTypedLinting`.",
|
|
127
|
-
"default": false,
|
|
128
|
-
"x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
|
|
129
|
-
},
|
|
130
124
|
"skipPackageJson": {
|
|
131
125
|
"description": "Do not add dependencies to `package.json`.",
|
|
132
126
|
"type": "boolean",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nest",
|
|
3
|
-
"version": "24.0.0-
|
|
3
|
+
"version": "24.0.0-rc.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -60,10 +60,9 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@nestjs/schematics": "^11.0.0",
|
|
63
|
-
"@nx/devkit": "24.0.0-
|
|
64
|
-
"@nx/js": "24.0.0-
|
|
65
|
-
"@nx/
|
|
66
|
-
"@nx/node": "24.0.0-canary.20261020-e7ffd79",
|
|
63
|
+
"@nx/devkit": "24.0.0-rc.0",
|
|
64
|
+
"@nx/js": "24.0.0-rc.0",
|
|
65
|
+
"@nx/node": "24.0.0-rc.0",
|
|
67
66
|
"semver": "^7.6.3",
|
|
68
67
|
"tslib": "^2.3.0"
|
|
69
68
|
},
|