@nx/node 18.0.0-canary.20240202-ea5befb → 18.0.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 +6 -6
- package/src/generators/application/application.js +6 -1
- package/src/generators/application/schema.d.ts +1 -0
- package/src/generators/e2e-project/e2e-project.js +4 -0
- package/src/generators/e2e-project/schema.d.ts +1 -0
- package/src/generators/library/library.js +3 -1
- package/src/generators/library/schema.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/node",
|
|
3
|
-
"version": "18.0.0
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Node Plugin for Nx contains generators to manage Node applications within an Nx workspace.",
|
|
6
6
|
"repository": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"tslib": "^2.3.0",
|
|
34
|
-
"@nx/devkit": "18.0.0
|
|
35
|
-
"@nx/jest": "18.0.0
|
|
36
|
-
"@nx/js": "18.0.0
|
|
37
|
-
"@nx/eslint": "18.0.0
|
|
38
|
-
"@nrwl/node": "18.0.0
|
|
34
|
+
"@nx/devkit": "18.0.0",
|
|
35
|
+
"@nx/jest": "18.0.0",
|
|
36
|
+
"@nx/js": "18.0.0",
|
|
37
|
+
"@nx/eslint": "18.0.0",
|
|
38
|
+
"@nrwl/node": "18.0.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -123,7 +123,7 @@ function addAppFiles(tree, options) {
|
|
|
123
123
|
outputPath: (0, devkit_1.joinPathFragments)('dist', options.rootProject ? options.name : options.appProjectRoot),
|
|
124
124
|
main: './src/main' + (options.js ? '.js' : '.ts'),
|
|
125
125
|
tsConfig: './tsconfig.app.json',
|
|
126
|
-
assets: ['./assets'],
|
|
126
|
+
assets: ['./src/assets'],
|
|
127
127
|
}
|
|
128
128
|
: null,
|
|
129
129
|
});
|
|
@@ -189,6 +189,7 @@ async function addLintingToApplication(tree, options) {
|
|
|
189
189
|
skipFormat: true,
|
|
190
190
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
191
191
|
rootProject: options.rootProject,
|
|
192
|
+
addPlugin: options.addPlugin,
|
|
192
193
|
});
|
|
193
194
|
return lintTask;
|
|
194
195
|
}
|
|
@@ -262,6 +263,7 @@ function updateTsConfigOptions(tree, options) {
|
|
|
262
263
|
}
|
|
263
264
|
async function applicationGenerator(tree, schema) {
|
|
264
265
|
return await applicationGeneratorInternal(tree, {
|
|
266
|
+
addPlugin: false,
|
|
265
267
|
projectNameAndRootFormat: 'derived',
|
|
266
268
|
...schema,
|
|
267
269
|
});
|
|
@@ -271,6 +273,7 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
271
273
|
const options = await normalizeOptions(tree, schema);
|
|
272
274
|
const tasks = [];
|
|
273
275
|
if (options.framework === 'nest') {
|
|
276
|
+
// nx-ignore-next-line
|
|
274
277
|
const { applicationGenerator } = (0, devkit_1.ensurePackage)('@nx/nest', versions_2.nxVersion);
|
|
275
278
|
const nestTasks = await applicationGenerator(tree, {
|
|
276
279
|
...options,
|
|
@@ -301,6 +304,7 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
301
304
|
const webpackInitTask = await webpackInitGenerator(tree, {
|
|
302
305
|
skipPackageJson: options.skipPackageJson,
|
|
303
306
|
skipFormat: true,
|
|
307
|
+
addPlugin: options.addPlugin,
|
|
304
308
|
});
|
|
305
309
|
tasks.push(webpackInitTask);
|
|
306
310
|
if (!options.skipPackageJson) {
|
|
@@ -388,6 +392,7 @@ async function normalizeOptions(host, options) {
|
|
|
388
392
|
? options.tags.split(',').map((s) => s.trim())
|
|
389
393
|
: [];
|
|
390
394
|
return {
|
|
395
|
+
addPlugin: process.env.NX_ADD_PLUGINS !== 'false',
|
|
391
396
|
...options,
|
|
392
397
|
name: appProjectName,
|
|
393
398
|
frontendProject: options.frontendProject
|
|
@@ -11,6 +11,7 @@ const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
|
11
11
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
12
12
|
async function e2eProjectGenerator(host, options) {
|
|
13
13
|
return await e2eProjectGeneratorInternal(host, {
|
|
14
|
+
addPlugin: false,
|
|
14
15
|
projectNameAndRootFormat: 'derived',
|
|
15
16
|
...options,
|
|
16
17
|
});
|
|
@@ -20,6 +21,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
20
21
|
const tasks = [];
|
|
21
22
|
const options = await normalizeOptions(host, _options);
|
|
22
23
|
const appProject = (0, devkit_1.readProjectConfiguration)(host, options.project);
|
|
24
|
+
// TODO(@ndcunningham): This is broken.. the outputs are wrong.. and this isn't using the jest generator
|
|
23
25
|
(0, devkit_1.addProjectConfiguration)(host, options.e2eProjectName, {
|
|
24
26
|
root: options.e2eProjectRoot,
|
|
25
27
|
implicitDependencies: [options.project],
|
|
@@ -75,6 +77,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
75
77
|
setParserOptionsProject: false,
|
|
76
78
|
skipPackageJson: false,
|
|
77
79
|
rootProject: options.rootProject,
|
|
80
|
+
addPlugin: options.addPlugin,
|
|
78
81
|
});
|
|
79
82
|
tasks.push(linterTask);
|
|
80
83
|
if (options.rootProject && (0, eslint_file_1.isEslintConfigSupported)(host)) {
|
|
@@ -106,6 +109,7 @@ async function normalizeOptions(tree, options) {
|
|
|
106
109
|
callingGenerator: null,
|
|
107
110
|
});
|
|
108
111
|
return {
|
|
112
|
+
addPlugin: process.env.NX_ADD_PLUGINS !== 'false',
|
|
109
113
|
...options,
|
|
110
114
|
e2eProjectRoot,
|
|
111
115
|
e2eProjectName,
|
|
@@ -12,6 +12,7 @@ const init_1 = require("../init/init");
|
|
|
12
12
|
const add_build_target_defaults_1 = require("@nx/devkit/src/generators/add-build-target-defaults");
|
|
13
13
|
async function libraryGenerator(tree, schema) {
|
|
14
14
|
return await libraryGeneratorInternal(tree, {
|
|
15
|
+
addPlugin: false,
|
|
15
16
|
projectNameAndRootFormat: 'derived',
|
|
16
17
|
...schema,
|
|
17
18
|
});
|
|
@@ -29,7 +30,7 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
29
30
|
throw new Error(`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`);
|
|
30
31
|
}
|
|
31
32
|
const libraryInstall = await (0, js_1.libraryGenerator)(tree, {
|
|
32
|
-
...
|
|
33
|
+
...options,
|
|
33
34
|
bundler: schema.buildable ? 'tsc' : 'none',
|
|
34
35
|
includeBabelRc: schema.babelJest,
|
|
35
36
|
importPath: options.importPath,
|
|
@@ -61,6 +62,7 @@ async function normalizeOptions(tree, options) {
|
|
|
61
62
|
callingGenerator: '@nx/node:library',
|
|
62
63
|
});
|
|
63
64
|
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
65
|
+
options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
|
|
64
66
|
const fileName = getCaseAwareFileName({
|
|
65
67
|
fileName: options.simpleModuleName
|
|
66
68
|
? projectNames.projectSimpleName
|