@nx/next 23.0.0-beta.8 → 23.0.0-beta.9

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": "23.0.0-beta.8",
3
+ "version": "23.0.0-beta.9",
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": {
@@ -36,7 +36,7 @@
36
36
  "next": ">=14.0.0 <17.0.0"
37
37
  },
38
38
  "dependencies": {
39
- "@nx/devkit": "23.0.0-beta.8",
39
+ "@nx/devkit": "23.0.0-beta.9",
40
40
  "@babel/plugin-proposal-decorators": "^7.22.7",
41
41
  "@svgr/webpack": "^8.1.0",
42
42
  "copy-webpack-plugin": "^14.0.0",
@@ -44,17 +44,17 @@
44
44
  "semver": "^7.6.3",
45
45
  "tslib": "^2.3.0",
46
46
  "webpack-merge": "^5.8.0",
47
- "@nx/js": "23.0.0-beta.8",
48
- "@nx/eslint": "23.0.0-beta.8",
49
- "@nx/react": "23.0.0-beta.8",
50
- "@nx/web": "23.0.0-beta.8",
51
- "@nx/webpack": "23.0.0-beta.8",
47
+ "@nx/js": "23.0.0-beta.9",
48
+ "@nx/eslint": "23.0.0-beta.9",
49
+ "@nx/react": "23.0.0-beta.9",
50
+ "@nx/web": "23.0.0-beta.9",
51
+ "@nx/webpack": "23.0.0-beta.9",
52
52
  "@phenomnomnominal/tsquery": "~6.2.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@nx/cypress": "23.0.0-beta.8",
56
- "@nx/playwright": "23.0.0-beta.8",
57
- "nx": "23.0.0-beta.8"
55
+ "@nx/cypress": "23.0.0-beta.9",
56
+ "@nx/playwright": "23.0.0-beta.9",
57
+ "nx": "23.0.0-beta.9"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAQ5D,wBAA8B,aAAa,CACzC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe;;GAoGzB"}
1
+ {"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAKhB,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAS5D,wBAA8B,aAAa,CACzC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe;;GAsGzB"}
@@ -14,8 +14,10 @@ const child_process_1 = require("child_process");
14
14
  const create_cli_options_1 = require("../../utils/create-cli-options");
15
15
  const internal_1 = require("@nx/devkit/internal");
16
16
  const runtime_version_utils_1 = require("../../utils/runtime-version-utils");
17
+ const deprecation_1 = require("../../utils/deprecation");
17
18
  let childProcess;
18
19
  async function buildExecutor(options, context) {
20
+ (0, deprecation_1.warnNextBuildExecutorDeprecation)();
19
21
  // Cast to any to overwrite NODE_ENV
20
22
  process.env.NODE_ENV ||= 'production';
21
23
  const projectRoot = context.projectGraph.nodes[context.projectName].data.root;
@@ -6,6 +6,7 @@
6
6
  "title": "Next Build",
7
7
  "description": "Build a Next.js app.",
8
8
  "type": "object",
9
+ "x-deprecated": "The `@nx/next:build` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` to migrate to the `@nx/next/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
9
10
  "properties": {
10
11
  "outputPath": {
11
12
  "type": "string",
@@ -6,6 +6,7 @@
6
6
  "title": "Next Serve",
7
7
  "description": "Serve a Next.js app.",
8
8
  "type": "object",
9
+ "x-deprecated": "The `@nx/next:server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` to migrate to the `@nx/next/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
9
10
  "properties": {
10
11
  "dev": {
11
12
  "type": "boolean",
@@ -1 +1 @@
1
- {"version":3,"file":"server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/server/server.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAEL,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAO3B,wBAA+B,aAAa,CAC1C,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe;;;cAqHzB"}
1
+ {"version":3,"file":"server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/next/src/executors/server/server.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAEL,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAQ3B,wBAA+B,aAAa,CAC1C,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe;;;cAuHzB"}
@@ -10,7 +10,9 @@ const custom_server_impl_1 = tslib_1.__importDefault(require("./custom-server.im
10
10
  const create_cli_options_1 = require("../../utils/create-cli-options");
11
11
  const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
12
12
  const runtime_version_utils_1 = require("../../utils/runtime-version-utils");
13
+ const deprecation_1 = require("../../utils/deprecation");
13
14
  async function* serveExecutor(options, context) {
15
+ (0, deprecation_1.warnNextServerExecutorDeprecation)();
14
16
  const buildOptions = (0, devkit_1.readTargetOptions)((0, devkit_1.parseTargetString)(options.buildTarget, context), context);
15
17
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
16
18
  // This is required for the default custom server to work. See the @nx/next:app generator.
@@ -1 +1 @@
1
- {"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAKL,IAAI,EAEL,MAAM,YAAY,CAAC;AAMpB,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QA2F/D"}
1
+ {"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/next/src/generators/application/lib/add-project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAKL,IAAI,EAEL,MAAM,YAAY,CAAC;AAOpB,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QA4F/D"}
@@ -4,6 +4,7 @@ exports.addProject = addProject;
4
4
  const internal_1 = require("@nx/devkit/internal");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const versions_1 = require("../../../utils/versions");
7
+ const deprecation_1 = require("../../../utils/deprecation");
7
8
  const react_1 = require("@nx/react");
8
9
  function addProject(host, options) {
9
10
  const targets = {};
@@ -14,6 +15,7 @@ function addProject(host, options) {
14
15
  ? p === '@nx/next/plugin'
15
16
  : p.plugin === '@nx/next/plugin');
16
17
  if (!hasPlugin) {
18
+ (0, deprecation_1.warnNextExecutorGenerating)();
17
19
  (0, internal_1.addBuildTargetDefaults)(host, '@nx/next:build');
18
20
  targets.build = {
19
21
  executor: '@nx/next:build',
@@ -0,0 +1,6 @@
1
+ export declare const NEXT_BUILD_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/next:build` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` to migrate to the `@nx/next/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
2
+ export declare const NEXT_SERVER_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/next:server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` to migrate to the `@nx/next/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
3
+ export declare function warnNextBuildExecutorDeprecation(): void;
4
+ export declare function warnNextServerExecutorDeprecation(): void;
5
+ export declare function warnNextExecutorGenerating(): void;
6
+ //# sourceMappingURL=deprecation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../../../../packages/next/src/utils/deprecation.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uCAAuC,4PACuM,CAAC;AAE5P,eAAO,MAAM,wCAAwC,6PACuM,CAAC;AAE7P,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAED,wBAAgB,iCAAiC,IAAI,IAAI,CAExD;AAMD,wBAAgB,0BAA0B,IAAI,IAAI,CAIjD"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NEXT_SERVER_EXECUTOR_DEPRECATION_MESSAGE = exports.NEXT_BUILD_EXECUTOR_DEPRECATION_MESSAGE = void 0;
4
+ exports.warnNextBuildExecutorDeprecation = warnNextBuildExecutorDeprecation;
5
+ exports.warnNextServerExecutorDeprecation = warnNextServerExecutorDeprecation;
6
+ exports.warnNextExecutorGenerating = warnNextExecutorGenerating;
7
+ const devkit_1 = require("@nx/devkit");
8
+ // TODO(v24): Remove the @nx/next:build and @nx/next:server executors. The
9
+ // inferred plugin (@nx/next/plugin) and the convert-to-inferred generator
10
+ // stay supported.
11
+ exports.NEXT_BUILD_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/next:build` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` to migrate to the `@nx/next/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
12
+ exports.NEXT_SERVER_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/next:server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` to migrate to the `@nx/next/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
13
+ function warnNextBuildExecutorDeprecation() {
14
+ devkit_1.logger.warn(exports.NEXT_BUILD_EXECUTOR_DEPRECATION_MESSAGE);
15
+ }
16
+ function warnNextServerExecutorDeprecation() {
17
+ devkit_1.logger.warn(exports.NEXT_SERVER_EXECUTOR_DEPRECATION_MESSAGE);
18
+ }
19
+ // Fired when the @nx/next:application generator is about to generate targets
20
+ // that use the deprecated executors — i.e. when @nx/next/plugin isn't
21
+ // registered in nx.json. Surfaces the deprecation at generation time rather
22
+ // than only when the user later runs the generated targets.
23
+ function warnNextExecutorGenerating() {
24
+ devkit_1.logger.warn('Generating targets that use the deprecated `@nx/next:build` and `@nx/next:server` executors. These executors will be removed in Nx v24. Run `nx g @nx/next:convert-to-inferred` next to migrate these targets to the `@nx/next/plugin` inferred plugin and prevent future generators from emitting executor targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.');
25
+ }