@nx/node 23.0.0-beta.16 → 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.16",
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.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",
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.16"
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;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"}
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,12 +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 global_eslint_config_1 = require("@nx/eslint/src/generators/init/global-eslint-config");
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 eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
13
- const internal_2 = require("@nx/jest/internal");
14
- const internal_3 = require("@nx/js/internal");
12
+ const internal_3 = require("@nx/jest/internal");
13
+ const internal_4 = require("@nx/js/internal");
15
14
  const posix_1 = require("node:path/posix");
16
15
  async function e2eProjectGenerator(host, options) {
17
16
  return await e2eProjectGeneratorInternal(host, {
@@ -25,7 +24,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
25
24
  const options = await normalizeOptions(host, _options);
26
25
  const appProject = (0, devkit_1.readProjectConfiguration)(host, options.project);
27
26
  // Detect Jest 30+ to use .cts config files (CommonJS TypeScript)
28
- const jestMajorVersion = (0, internal_2.getInstalledJestMajorVersion)(host);
27
+ const jestMajorVersion = (0, internal_3.getInstalledJestMajorVersion)(host);
29
28
  const useCommonJsConfig = jestMajorVersion === null || jestMajorVersion >= 30;
30
29
  const jestConfigExt = useCommonJsConfig ? 'cts' : 'ts';
31
30
  // TODO(@ndcunningham): This is broken.. the outputs are wrong.. and this isn't using the jest generator
@@ -99,7 +98,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
99
98
  };
100
99
  });
101
100
  }
102
- const jestPreset = (0, internal_2.findRootJestPreset)(host) ?? 'jest.preset.js';
101
+ const jestPreset = (0, internal_3.findRootJestPreset)(host) ?? 'jest.preset.js';
103
102
  const tsConfigFile = options.isUsingTsSolutionConfig
104
103
  ? 'tsconfig.json'
105
104
  : 'tsconfig.spec.json';
@@ -147,7 +146,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
147
146
  host.rename(jestConfigPath, (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'jest.config.cts'));
148
147
  }
149
148
  if (options.isUsingTsSolutionConfig) {
150
- (0, internal_3.addSwcTestConfig)(host, options.e2eProjectRoot, 'es6');
149
+ (0, internal_4.addSwcTestConfig)(host, options.e2eProjectRoot, 'es6');
151
150
  (0, devkit_1.generateFiles)(host, path.join(__dirname, 'files/ts-solution'), options.e2eProjectRoot, {
152
151
  ...options,
153
152
  relativeProjectReferencePath: (0, posix_1.relative)(options.e2eProjectRoot, appProject.root),
@@ -179,11 +178,11 @@ async function e2eProjectGeneratorInternal(host, _options) {
179
178
  addPlugin: options.addPlugin,
180
179
  });
181
180
  tasks.push(linterTask);
182
- if (options.rootProject && (0, eslint_file_1.isEslintConfigSupported)(host)) {
183
- (0, eslint_file_1.addPluginsToLintConfig)(host, options.e2eProjectRoot, '@nx');
184
- (0, eslint_file_1.replaceOverridesInLintConfig)(host, options.e2eProjectRoot, [
185
- global_eslint_config_1.typeScriptOverride,
186
- global_eslint_config_1.javaScriptOverride,
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,
187
186
  ]);
188
187
  }
189
188
  }
@@ -200,7 +199,7 @@ async function e2eProjectGeneratorInternal(host, _options) {
200
199
  // If we are using the new TS solution
201
200
  // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
202
201
  if (options.isUsingTsSolutionConfig) {
203
- await (0, internal_3.addProjectToTsSolutionWorkspace)(host, options.e2eProjectRoot);
202
+ await (0, internal_4.addProjectToTsSolutionWorkspace)(host, options.e2eProjectRoot);
204
203
  }
205
204
  if (!options.skipFormat) {
206
205
  await (0, devkit_1.formatFiles)(host);
@@ -224,7 +223,7 @@ async function normalizeOptions(tree, options) {
224
223
  const nxJson = (0, devkit_1.readNxJson)(tree);
225
224
  const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
226
225
  nxJson.useInferencePlugins !== false;
227
- const isUsingTsSolutionConfig = (0, internal_3.isUsingTsSolutionSetup)(tree);
226
+ const isUsingTsSolutionConfig = (0, internal_4.isUsingTsSolutionSetup)(tree);
228
227
  return {
229
228
  addPlugin,
230
229
  ...options,