@nx/next 21.3.0-beta.2 → 21.3.0-beta.4

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/next",
3
- "version": "21.3.0-beta.2",
3
+ "version": "21.3.0-beta.4",
4
4
  "private": false,
5
5
  "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
6
6
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "next": ">=14.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@nx/devkit": "21.3.0-beta.2",
38
+ "@nx/devkit": "21.3.0-beta.4",
39
39
  "@babel/plugin-proposal-decorators": "^7.22.7",
40
40
  "@svgr/webpack": "^8.1.0",
41
41
  "copy-webpack-plugin": "^10.2.4",
@@ -44,11 +44,11 @@
44
44
  "semver": "^7.5.3",
45
45
  "tslib": "^2.3.0",
46
46
  "webpack-merge": "^5.8.0",
47
- "@nx/js": "21.3.0-beta.2",
48
- "@nx/eslint": "21.3.0-beta.2",
49
- "@nx/react": "21.3.0-beta.2",
50
- "@nx/web": "21.3.0-beta.2",
51
- "@nx/webpack": "21.3.0-beta.2",
47
+ "@nx/js": "21.3.0-beta.4",
48
+ "@nx/eslint": "21.3.0-beta.4",
49
+ "@nx/react": "21.3.0-beta.4",
50
+ "@nx/web": "21.3.0-beta.4",
51
+ "@nx/webpack": "21.3.0-beta.4",
52
52
  "@phenomnomnominal/tsquery": "~5.0.1"
53
53
  },
54
54
  "publishConfig": {
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.nxComponentTestingPreset = nxComponentTestingPreset;
4
- const ct_helpers_1 = require("@nx/cypress/src/utils/ct-helpers");
5
4
  const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
5
+ const ct_helpers_1 = require("@nx/cypress/src/utils/ct-helpers");
6
6
  const devkit_1 = require("@nx/devkit");
7
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
8
  const react_1 = require("@nx/react");
8
9
  const webpack_1 = require("@nx/webpack");
9
- const path_1 = require("path");
10
10
  const configuration_1 = require("nx/src/config/configuration");
11
+ const path_1 = require("path");
11
12
  function nxComponentTestingPreset(pathToConfig, options) {
12
13
  if (global.NX_GRAPH_CREATION) {
13
14
  // this is only used by plugins, so we don't need the component testing
@@ -68,7 +69,7 @@ Able to find CT project, ${!!ctProjectConfig}.`);
68
69
  const webpackOptions = {
69
70
  root: ctExecutorContext.root,
70
71
  projectRoot: ctProjectConfig.root,
71
- sourceRoot: ctProjectConfig.sourceRoot,
72
+ sourceRoot: (0, ts_solution_setup_1.getProjectSourceRoot)(ctProjectConfig),
72
73
  main: '',
73
74
  useTsconfigPaths: undefined,
74
75
  fileReplacements: buildFileReplacements,
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cypressComponentConfiguration = cypressComponentConfiguration;
4
4
  exports.cypressComponentConfigurationInternal = cypressComponentConfigurationInternal;
5
5
  const devkit_1 = require("@nx/devkit");
6
- const ct_utils_1 = require("@nx/react/src/utils/ct-utils");
7
- const versions_1 = require("../../utils/versions");
6
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
7
  const react_1 = require("@nx/react");
8
+ const ct_utils_1 = require("@nx/react/src/utils/ct-utils");
9
9
  const path_1 = require("path");
10
+ const versions_1 = require("../../utils/versions");
10
11
  function cypressComponentConfiguration(tree, options) {
11
12
  return cypressComponentConfigurationInternal(tree, {
12
13
  addPlugin: false,
@@ -66,7 +67,8 @@ ${isUsingTailwind
66
67
  `);
67
68
  if (opts.generateTests) {
68
69
  const filePaths = [];
69
- (0, devkit_1.visitNotIgnoredFiles)(tree, projectConfig.sourceRoot, (filePath) => {
70
+ const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig, tree);
71
+ (0, devkit_1.visitNotIgnoredFiles)(tree, sourceRoot, (filePath) => {
70
72
  const fromProjectRootPath = (0, path_1.relative)(projectConfig.root, filePath);
71
73
  // we don't generate tests for pages/server-side/appDir components
72
74
  if (fromProjectRootPath.includes('pages') ||