@nx/node 23.0.0-beta.14 → 23.0.0-beta.16
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.16",
|
|
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.16",
|
|
37
|
+
"@nx/jest": "23.0.0-beta.16",
|
|
38
|
+
"@nx/js": "23.0.0-beta.16",
|
|
39
|
+
"@nx/eslint": "23.0.0-beta.16",
|
|
40
|
+
"@nx/docker": "23.0.0-beta.16",
|
|
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.16"
|
|
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;AAQpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,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;AAQpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAkBlC,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"}
|
|
@@ -10,9 +10,8 @@ const global_eslint_config_1 = require("@nx/eslint/src/generators/init/global-es
|
|
|
10
10
|
const path = tslib_1.__importStar(require("path"));
|
|
11
11
|
const versions_1 = require("../../utils/versions");
|
|
12
12
|
const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const internal_2 = require("@nx/js/internal");
|
|
13
|
+
const internal_2 = require("@nx/jest/internal");
|
|
14
|
+
const internal_3 = require("@nx/js/internal");
|
|
16
15
|
const posix_1 = require("node:path/posix");
|
|
17
16
|
async function e2eProjectGenerator(host, options) {
|
|
18
17
|
return await e2eProjectGeneratorInternal(host, {
|
|
@@ -26,7 +25,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
26
25
|
const options = await normalizeOptions(host, _options);
|
|
27
26
|
const appProject = (0, devkit_1.readProjectConfiguration)(host, options.project);
|
|
28
27
|
// Detect Jest 30+ to use .cts config files (CommonJS TypeScript)
|
|
29
|
-
const jestMajorVersion = (0,
|
|
28
|
+
const jestMajorVersion = (0, internal_2.getInstalledJestMajorVersion)(host);
|
|
30
29
|
const useCommonJsConfig = jestMajorVersion === null || jestMajorVersion >= 30;
|
|
31
30
|
const jestConfigExt = useCommonJsConfig ? 'cts' : 'ts';
|
|
32
31
|
// TODO(@ndcunningham): This is broken.. the outputs are wrong.. and this isn't using the jest generator
|
|
@@ -100,7 +99,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
100
99
|
};
|
|
101
100
|
});
|
|
102
101
|
}
|
|
103
|
-
const jestPreset = (0,
|
|
102
|
+
const jestPreset = (0, internal_2.findRootJestPreset)(host) ?? 'jest.preset.js';
|
|
104
103
|
const tsConfigFile = options.isUsingTsSolutionConfig
|
|
105
104
|
? 'tsconfig.json'
|
|
106
105
|
: 'tsconfig.spec.json';
|
|
@@ -148,7 +147,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
148
147
|
host.rename(jestConfigPath, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'jest.config.cts'));
|
|
149
148
|
}
|
|
150
149
|
if (options.isUsingTsSolutionConfig) {
|
|
151
|
-
(0,
|
|
150
|
+
(0, internal_3.addSwcTestConfig)(host, options.e2eProjectRoot, 'es6');
|
|
152
151
|
(0, devkit_1.generateFiles)(host, path.join(__dirname, 'files/ts-solution'), options.e2eProjectRoot, {
|
|
153
152
|
...options,
|
|
154
153
|
relativeProjectReferencePath: (0, posix_1.relative)(options.e2eProjectRoot, appProject.root),
|
|
@@ -201,7 +200,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
201
200
|
// If we are using the new TS solution
|
|
202
201
|
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
203
202
|
if (options.isUsingTsSolutionConfig) {
|
|
204
|
-
await (0,
|
|
203
|
+
await (0, internal_3.addProjectToTsSolutionWorkspace)(host, options.e2eProjectRoot);
|
|
205
204
|
}
|
|
206
205
|
if (!options.skipFormat) {
|
|
207
206
|
await (0, devkit_1.formatFiles)(host);
|
|
@@ -225,7 +224,7 @@ async function normalizeOptions(tree, options) {
|
|
|
225
224
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
226
225
|
const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
227
226
|
nxJson.useInferencePlugins !== false;
|
|
228
|
-
const isUsingTsSolutionConfig = (0,
|
|
227
|
+
const isUsingTsSolutionConfig = (0, internal_3.isUsingTsSolutionSetup)(tree);
|
|
229
228
|
return {
|
|
230
229
|
addPlugin,
|
|
231
230
|
...options,
|