@nx/next 21.2.3 → 21.3.0-beta.1

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.2.3",
3
+ "version": "21.3.0-beta.1",
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.2.3",
38
+ "@nx/devkit": "21.3.0-beta.1",
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.2.3",
48
- "@nx/eslint": "21.2.3",
49
- "@nx/react": "21.2.3",
50
- "@nx/web": "21.2.3",
51
- "@nx/webpack": "21.2.3",
47
+ "@nx/js": "21.3.0-beta.1",
48
+ "@nx/eslint": "21.3.0-beta.1",
49
+ "@nx/react": "21.3.0-beta.1",
50
+ "@nx/web": "21.3.0-beta.1",
51
+ "@nx/webpack": "21.3.0-beta.1",
52
52
  "@phenomnomnominal/tsquery": "~5.0.1"
53
53
  },
54
54
  "publishConfig": {
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.nxComponentTestingPreset = nxComponentTestingPreset;
4
- const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
5
4
  const ct_helpers_1 = require("@nx/cypress/src/utils/ct-helpers");
5
+ const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
6
6
  const devkit_1 = require("@nx/devkit");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
7
  const react_1 = require("@nx/react");
9
8
  const webpack_1 = require("@nx/webpack");
10
- const configuration_1 = require("nx/src/config/configuration");
11
9
  const path_1 = require("path");
10
+ const configuration_1 = require("nx/src/config/configuration");
12
11
  function nxComponentTestingPreset(pathToConfig, options) {
13
12
  if (global.NX_GRAPH_CREATION) {
14
13
  // this is only used by plugins, so we don't need the component testing
@@ -69,7 +68,7 @@ Able to find CT project, ${!!ctProjectConfig}.`);
69
68
  const webpackOptions = {
70
69
  root: ctExecutorContext.root,
71
70
  projectRoot: ctProjectConfig.root,
72
- sourceRoot: (0, ts_solution_setup_1.getProjectSourceRoot)(ctProjectConfig),
71
+ sourceRoot: ctProjectConfig.sourceRoot,
73
72
  main: '',
74
73
  useTsconfigPaths: undefined,
75
74
  fileReplacements: buildFileReplacements,
@@ -67,10 +67,15 @@ async function buildExecutor(options, context) {
67
67
  (0, devkit_1.writeJsonFile)(`${options.outputPath}/package.json`, builtPackageJson);
68
68
  if (options.generateLockfile) {
69
69
  const packageManager = (0, devkit_1.detectPackageManager)(context.root);
70
- const lockFile = (0, js_1.createLockFile)(builtPackageJson, context.projectGraph, packageManager);
71
- (0, node_fs_1.writeFileSync)(`${options.outputPath}/${(0, js_1.getLockFileName)(packageManager)}`, lockFile, {
72
- encoding: 'utf-8',
73
- });
70
+ if (packageManager === 'bun') {
71
+ devkit_1.logger.warn('Bun lockfile generation is not supported. The generated package.json will not include a lockfile. Run "bun install" in the output directory after deployment if needed.');
72
+ }
73
+ else {
74
+ const lockFile = (0, js_1.createLockFile)(builtPackageJson, context.projectGraph, packageManager);
75
+ (0, node_fs_1.writeFileSync)(`${options.outputPath}/${(0, js_1.getLockFileName)(packageManager)}`, lockFile, {
76
+ encoding: 'utf-8',
77
+ });
78
+ }
74
79
  }
75
80
  // If output path is different from source path, then copy over the config and public files.
76
81
  // This is the default behavior when running `nx build <app>`.
@@ -3,11 +3,10 @@ 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 ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
- const react_1 = require("@nx/react");
8
6
  const ct_utils_1 = require("@nx/react/src/utils/ct-utils");
9
- const path_1 = require("path");
10
7
  const versions_1 = require("../../utils/versions");
8
+ const react_1 = require("@nx/react");
9
+ const path_1 = require("path");
11
10
  function cypressComponentConfiguration(tree, options) {
12
11
  return cypressComponentConfigurationInternal(tree, {
13
12
  addPlugin: false,
@@ -67,8 +66,7 @@ ${isUsingTailwind
67
66
  `);
68
67
  if (opts.generateTests) {
69
68
  const filePaths = [];
70
- const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig, tree);
71
- (0, devkit_1.visitNotIgnoredFiles)(tree, sourceRoot, (filePath) => {
69
+ (0, devkit_1.visitNotIgnoredFiles)(tree, projectConfig.sourceRoot, (filePath) => {
72
70
  const fromProjectRootPath = (0, path_1.relative)(projectConfig.root, filePath);
73
71
  // we don't generate tests for pages/server-side/appDir components
74
72
  if (fromProjectRootPath.includes('pages') ||