@nx/node 23.0.0-beta.15 → 23.0.0-beta.17
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/node",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.17",
|
|
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": {
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"tslib": "^2.3.0",
|
|
36
|
-
"@nx/devkit": "23.0.0-beta.
|
|
37
|
-
"@nx/jest": "23.0.0-beta.
|
|
38
|
-
"@nx/js": "23.0.0-beta.
|
|
39
|
-
"@nx/eslint": "23.0.0-beta.
|
|
40
|
-
"@nx/docker": "23.0.0-beta.
|
|
36
|
+
"@nx/devkit": "23.0.0-beta.17",
|
|
37
|
+
"@nx/jest": "23.0.0-beta.17",
|
|
38
|
+
"@nx/js": "23.0.0-beta.17",
|
|
39
|
+
"@nx/eslint": "23.0.0-beta.17",
|
|
40
|
+
"@nx/docker": "23.0.0-beta.17",
|
|
41
41
|
"tcp-port-used": "^1.0.2",
|
|
42
42
|
"kill-port": "^1.6.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"nx": "23.0.0-beta.
|
|
45
|
+
"nx": "23.0.0-beta.17"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e-project.d.ts","sourceRoot":"","sources":["../../../../../../packages/node/src/generators/e2e-project/e2e-project.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"e2e-project.d.ts","sourceRoot":"","sources":["../../../../../../packages/node/src/generators/e2e-project/e2e-project.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAWpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAalC,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAMpE;AAED,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,8BAyPjB;AAgDD,eAAe,mBAAmB,CAAC"}
|
|
@@ -6,13 +6,11 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
const internal_1 = require("@nx/devkit/internal");
|
|
7
7
|
const devkit_1 = require("@nx/devkit");
|
|
8
8
|
const eslint_1 = require("@nx/eslint");
|
|
9
|
-
const
|
|
9
|
+
const internal_2 = require("@nx/eslint/internal");
|
|
10
10
|
const path = tslib_1.__importStar(require("path"));
|
|
11
11
|
const versions_1 = require("../../utils/versions");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const versions_2 = require("@nx/jest/src/utils/versions");
|
|
15
|
-
const internal_2 = require("@nx/js/internal");
|
|
12
|
+
const internal_3 = require("@nx/jest/internal");
|
|
13
|
+
const internal_4 = require("@nx/js/internal");
|
|
16
14
|
const posix_1 = require("node:path/posix");
|
|
17
15
|
async function e2eProjectGenerator(host, options) {
|
|
18
16
|
return await e2eProjectGeneratorInternal(host, {
|
|
@@ -26,7 +24,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
26
24
|
const options = await normalizeOptions(host, _options);
|
|
27
25
|
const appProject = (0, devkit_1.readProjectConfiguration)(host, options.project);
|
|
28
26
|
// Detect Jest 30+ to use .cts config files (CommonJS TypeScript)
|
|
29
|
-
const jestMajorVersion = (0,
|
|
27
|
+
const jestMajorVersion = (0, internal_3.getInstalledJestMajorVersion)(host);
|
|
30
28
|
const useCommonJsConfig = jestMajorVersion === null || jestMajorVersion >= 30;
|
|
31
29
|
const jestConfigExt = useCommonJsConfig ? 'cts' : 'ts';
|
|
32
30
|
// TODO(@ndcunningham): This is broken.. the outputs are wrong.. and this isn't using the jest generator
|
|
@@ -100,7 +98,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
100
98
|
};
|
|
101
99
|
});
|
|
102
100
|
}
|
|
103
|
-
const jestPreset = (0,
|
|
101
|
+
const jestPreset = (0, internal_3.findRootJestPreset)(host) ?? 'jest.preset.js';
|
|
104
102
|
const tsConfigFile = options.isUsingTsSolutionConfig
|
|
105
103
|
? 'tsconfig.json'
|
|
106
104
|
: 'tsconfig.spec.json';
|
|
@@ -148,7 +146,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
148
146
|
host.rename(jestConfigPath, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'jest.config.cts'));
|
|
149
147
|
}
|
|
150
148
|
if (options.isUsingTsSolutionConfig) {
|
|
151
|
-
(0,
|
|
149
|
+
(0, internal_4.addSwcTestConfig)(host, options.e2eProjectRoot, 'es6');
|
|
152
150
|
(0, devkit_1.generateFiles)(host, path.join(__dirname, 'files/ts-solution'), options.e2eProjectRoot, {
|
|
153
151
|
...options,
|
|
154
152
|
relativeProjectReferencePath: (0, posix_1.relative)(options.e2eProjectRoot, appProject.root),
|
|
@@ -180,11 +178,11 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
180
178
|
addPlugin: options.addPlugin,
|
|
181
179
|
});
|
|
182
180
|
tasks.push(linterTask);
|
|
183
|
-
if (options.rootProject && (0,
|
|
184
|
-
(0,
|
|
185
|
-
(0,
|
|
186
|
-
|
|
187
|
-
|
|
181
|
+
if (options.rootProject && (0, internal_2.isEslintConfigSupported)(host)) {
|
|
182
|
+
(0, internal_2.addPluginsToLintConfig)(host, options.e2eProjectRoot, '@nx');
|
|
183
|
+
(0, internal_2.replaceOverridesInLintConfig)(host, options.e2eProjectRoot, [
|
|
184
|
+
internal_2.typeScriptOverride,
|
|
185
|
+
internal_2.javaScriptOverride,
|
|
188
186
|
]);
|
|
189
187
|
}
|
|
190
188
|
}
|
|
@@ -201,7 +199,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
201
199
|
// If we are using the new TS solution
|
|
202
200
|
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
203
201
|
if (options.isUsingTsSolutionConfig) {
|
|
204
|
-
await (0,
|
|
202
|
+
await (0, internal_4.addProjectToTsSolutionWorkspace)(host, options.e2eProjectRoot);
|
|
205
203
|
}
|
|
206
204
|
if (!options.skipFormat) {
|
|
207
205
|
await (0, devkit_1.formatFiles)(host);
|
|
@@ -225,7 +223,7 @@ async function normalizeOptions(tree, options) {
|
|
|
225
223
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
226
224
|
const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
227
225
|
nxJson.useInferencePlugins !== false;
|
|
228
|
-
const isUsingTsSolutionConfig = (0,
|
|
226
|
+
const isUsingTsSolutionConfig = (0, internal_4.isUsingTsSolutionSetup)(tree);
|
|
229
227
|
return {
|
|
230
228
|
addPlugin,
|
|
231
229
|
...options,
|