@nx/node 22.1.0-canary.20251030-b283663 → 22.1.0-canary.20251106-e9146c7
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": "22.1.0-canary.
|
|
3
|
+
"version": "22.1.0-canary.20251106-e9146c7",
|
|
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": {
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"tslib": "^2.3.0",
|
|
35
|
-
"@nx/devkit": "22.1.0-canary.
|
|
36
|
-
"@nx/jest": "22.1.0-canary.
|
|
37
|
-
"@nx/js": "22.1.0-canary.
|
|
38
|
-
"@nx/eslint": "22.1.0-canary.
|
|
39
|
-
"@nx/docker": "22.1.0-canary.
|
|
35
|
+
"@nx/devkit": "22.1.0-canary.20251106-e9146c7",
|
|
36
|
+
"@nx/jest": "22.1.0-canary.20251106-e9146c7",
|
|
37
|
+
"@nx/js": "22.1.0-canary.20251106-e9146c7",
|
|
38
|
+
"@nx/eslint": "22.1.0-canary.20251106-e9146c7",
|
|
39
|
+
"@nx/docker": "22.1.0-canary.20251106-e9146c7",
|
|
40
40
|
"tcp-port-used": "^1.0.2",
|
|
41
41
|
"kill-port": "^1.6.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"nx": "22.1.0-canary.
|
|
44
|
+
"nx": "22.1.0-canary.20251106-e9146c7"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"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":"AAAA,OAAO,EAKL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AASpB,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":"AAAA,OAAO,EAKL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AASpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAiBlC,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"}
|
|
@@ -11,6 +11,7 @@ const versions_1 = require("../../utils/versions");
|
|
|
11
11
|
const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
12
12
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
13
13
|
const config_file_1 = require("@nx/jest/src/utils/config/config-file");
|
|
14
|
+
const versions_2 = require("@nx/jest/src/utils/versions");
|
|
14
15
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
15
16
|
const posix_1 = require("node:path/posix");
|
|
16
17
|
const add_swc_config_1 = require("@nx/js/src/utils/swc/add-swc-config");
|
|
@@ -25,6 +26,10 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
25
26
|
const tasks = [];
|
|
26
27
|
const options = await normalizeOptions(host, _options);
|
|
27
28
|
const appProject = (0, devkit_1.readProjectConfiguration)(host, options.project);
|
|
29
|
+
// Detect Jest 30+ to use .cts config files (CommonJS TypeScript)
|
|
30
|
+
const jestMajorVersion = (0, versions_2.getInstalledJestMajorVersion)(host);
|
|
31
|
+
const useCommonJsConfig = jestMajorVersion === null || jestMajorVersion >= 30;
|
|
32
|
+
const jestConfigExt = useCommonJsConfig ? 'cts' : 'ts';
|
|
28
33
|
// TODO(@ndcunningham): This is broken.. the outputs are wrong.. and this isn't using the jest generator
|
|
29
34
|
const packageJson = {
|
|
30
35
|
name: options.importPath,
|
|
@@ -42,7 +47,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
42
47
|
executor: '@nx/jest:jest',
|
|
43
48
|
outputs: ['{projectRoot}/test-output/jest/coverage'],
|
|
44
49
|
options: {
|
|
45
|
-
jestConfig: `${options.e2eProjectRoot}/jest.config
|
|
50
|
+
jestConfig: `${options.e2eProjectRoot}/jest.config.${jestConfigExt}`,
|
|
46
51
|
passWithNoTests: true,
|
|
47
52
|
},
|
|
48
53
|
dependsOn: [`${options.project}:build`, `${options.project}:serve`],
|
|
@@ -60,7 +65,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
60
65
|
executor: '@nx/jest:jest',
|
|
61
66
|
outputs: ['{workspaceRoot}/coverage/{e2eProjectRoot}'],
|
|
62
67
|
options: {
|
|
63
|
-
jestConfig: `${options.e2eProjectRoot}/jest.config
|
|
68
|
+
jestConfig: `${options.e2eProjectRoot}/jest.config.${jestConfigExt}`,
|
|
64
69
|
passWithNoTests: true,
|
|
65
70
|
},
|
|
66
71
|
dependsOn: [`${options.project}:build`, `${options.project}:serve`],
|
|
@@ -138,6 +143,11 @@ async function e2eProjectGeneratorInternal(host, _options) {
|
|
|
138
143
|
tmpl: '',
|
|
139
144
|
});
|
|
140
145
|
}
|
|
146
|
+
// Rename jest.config.ts to jest.config.cts for Jest 30+
|
|
147
|
+
const jestConfigPath = (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'jest.config.ts');
|
|
148
|
+
if (host.exists(jestConfigPath) && useCommonJsConfig) {
|
|
149
|
+
host.rename(jestConfigPath, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'jest.config.cts'));
|
|
150
|
+
}
|
|
141
151
|
if (options.isUsingTsSolutionConfig) {
|
|
142
152
|
(0, add_swc_config_1.addSwcTestConfig)(host, options.e2eProjectRoot, 'es6');
|
|
143
153
|
(0, devkit_1.generateFiles)(host, path.join(__dirname, 'files/ts-solution'), options.e2eProjectRoot, {
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
"declaration": true,
|
|
7
7
|
"types": ["node"]
|
|
8
8
|
},
|
|
9
|
-
"exclude": [
|
|
9
|
+
"exclude": [
|
|
10
|
+
"jest.config.ts",
|
|
11
|
+
"jest.config.cts",
|
|
12
|
+
"src/**/*.spec.ts",
|
|
13
|
+
"src/**/*.test.ts"
|
|
14
|
+
],
|
|
10
15
|
"include": ["src/**/*.ts"]
|
|
11
16
|
}
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"emitDeclarationOnly": false,
|
|
11
11
|
"types": ["node"]
|
|
12
12
|
},
|
|
13
|
-
"exclude": [
|
|
13
|
+
"exclude": [
|
|
14
|
+
"jest.config.ts",
|
|
15
|
+
"jest.config.cts",
|
|
16
|
+
"src/**/*.spec.ts",
|
|
17
|
+
"src/**/*.test.ts"
|
|
18
|
+
],
|
|
14
19
|
"include": ["src/**/*.ts"]
|
|
15
20
|
}
|