@nx/next 20.0.0-beta.6 → 20.0.0-beta.8

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": "20.0.0-beta.6",
3
+ "version": "20.0.0-beta.8",
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": "20.0.0-beta.6",
38
+ "@nx/devkit": "20.0.0-beta.8",
39
39
  "@babel/plugin-proposal-decorators": "^7.22.7",
40
40
  "@svgr/webpack": "^8.0.1",
41
41
  "copy-webpack-plugin": "^10.2.4",
@@ -45,11 +45,11 @@
45
45
  "semver": "^7.5.3",
46
46
  "tslib": "^2.3.0",
47
47
  "webpack-merge": "^5.8.0",
48
- "@nx/js": "20.0.0-beta.6",
49
- "@nx/eslint": "20.0.0-beta.6",
50
- "@nx/react": "20.0.0-beta.6",
51
- "@nx/web": "20.0.0-beta.6",
52
- "@nx/webpack": "20.0.0-beta.6",
48
+ "@nx/js": "20.0.0-beta.8",
49
+ "@nx/eslint": "20.0.0-beta.8",
50
+ "@nx/react": "20.0.0-beta.8",
51
+ "@nx/web": "20.0.0-beta.8",
52
+ "@nx/webpack": "20.0.0-beta.8",
53
53
  "@phenomnomnominal/tsquery": "~5.0.1"
54
54
  },
55
55
  "publishConfig": {
@@ -7,6 +7,7 @@ const devkit_1 = require("@nx/devkit");
7
7
  const react_1 = require("@nx/react");
8
8
  const webpack_1 = require("@nx/webpack");
9
9
  const path_1 = require("path");
10
+ const configuration_1 = require("nx/src/config/configuration");
10
11
  function nxComponentTestingPreset(pathToConfig, options) {
11
12
  if (global.NX_GRAPH_CREATION) {
12
13
  // this is only used by plugins, so we don't need the component testing
@@ -34,6 +35,8 @@ function nxComponentTestingPreset(pathToConfig, options) {
34
35
  const parsedBuildTarget = (0, devkit_1.parseTargetString)(buildTarget, {
35
36
  cwd: process.cwd(),
36
37
  root: devkit_1.workspaceRoot,
38
+ projectsConfigurations: (0, devkit_1.readProjectsConfigurationFromProjectGraph)(graph),
39
+ nxJsonConfiguration: (0, configuration_1.readNxJson)(devkit_1.workspaceRoot),
37
40
  isVerbose: false,
38
41
  projectName: ctProjectName,
39
42
  projectGraph: graph,
@@ -237,7 +237,7 @@ function getNextConfig(nextConfig = {}, context = getWithNxContext()) {
237
237
  ref: true,
238
238
  };
239
239
  const svgrOptions = typeof nx?.svgr === 'object' ? nx.svgr : defaultSvgrOptions;
240
- // TODO(v20): Remove file-loader and use `?react` querystring to differentiate between asset and SVGR.
240
+ // TODO(v21): Remove file-loader and use `?react` querystring to differentiate between asset and SVGR.
241
241
  // It should be:
242
242
  // use: [{
243
243
  // test: /\.svg$/i,
@@ -10,7 +10,7 @@ const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
10
10
  const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
11
11
  async function* serveExecutor(options, context) {
12
12
  const buildOptions = (0, devkit_1.readTargetOptions)((0, devkit_1.parseTargetString)(options.buildTarget, context), context);
13
- const projectRoot = context.workspace.projects[context.projectName].root;
13
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
14
14
  // This is required for the default custom server to work. See the @nx/next:app generator.
15
15
  const nextDir = !options.dev && (0, path_1.resolve)(context.root, buildOptions.outputPath);
16
16
  process.env.NX_NEXT_DIR ??= options.dev ? projectRoot : nextDir;
@@ -1,3 +0,0 @@
1
- import { NextConfigFn } from '../src/utils/config';
2
- import { WithNxOptions } from './with-nx';
3
- export declare function withStylus(configOrFn: WithNxOptions | NextConfigFn): NextConfigFn;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withStylus = withStylus;
4
- // TODO(v20): Remove file, it is here until users migrate over to SASS manually.
5
- function withStylus(configOrFn) {
6
- return async (phase) => {
7
- throw new Error(`Stylus support has been removed and you should use the built-in SASS support. Remove the "withStylus" plugin from your Next.js config, and rename your files from .styl to .scss.`);
8
- };
9
- }
10
- module.exports = withStylus;
11
- module.exports.withStylus = withStylus;