@nx/rspack 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,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "23.0.0-beta.8",
4
+ "version": "23.0.0-beta.9",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/devkit": "23.0.0-beta.8",
28
- "@nx/js": "23.0.0-beta.8",
29
- "@nx/module-federation": "23.0.0-beta.8",
30
- "@nx/web": "23.0.0-beta.8",
27
+ "@nx/devkit": "23.0.0-beta.9",
28
+ "@nx/js": "23.0.0-beta.9",
29
+ "@nx/module-federation": "23.0.0-beta.9",
30
+ "@nx/web": "23.0.0-beta.9",
31
31
  "@phenomnomnominal/tsquery": "~6.2.0",
32
32
  "@rspack/core": "1.6.8",
33
33
  "@rspack/dev-server": "^1.1.4",
@@ -57,8 +57,8 @@
57
57
  "webpack-node-externals": "^3.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "nx": "23.0.0-beta.8",
61
- "@nx/nest": "23.0.0-beta.8"
60
+ "nx": "23.0.0-beta.9",
61
+ "@nx/nest": "23.0.0-beta.9"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@module-federation/enhanced": "^2.3.3",
@@ -1 +1 @@
1
- {"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAQpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAGnD,wBAA+B,WAAW,CACxC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe,GACvB,qBAAqB,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA0E/D"}
1
+ {"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAQpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAInD,wBAA+B,WAAW,CACxC,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe,GACvB,qBAAqB,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA4E/D"}
@@ -9,7 +9,9 @@ const create_compiler_1 = require("../../utils/create-compiler");
9
9
  const mode_utils_1 = require("../../utils/mode-utils");
10
10
  const normalize_options_1 = require("../rspack/lib/normalize-options");
11
11
  const get_dev_server_config_1 = require("./lib/get-dev-server-config");
12
+ const deprecation_1 = require("../../utils/deprecation");
12
13
  async function* runExecutor(options, context) {
14
+ (0, deprecation_1.warnRspackDevServerExecutorDeprecation)();
13
15
  process.env.NODE_ENV ??= options.mode ?? 'development';
14
16
  if ((0, mode_utils_1.isMode)(process.env.NODE_ENV)) {
15
17
  options.mode = process.env.NODE_ENV;
@@ -5,6 +5,7 @@
5
5
  "description": "Run @rspack/dev-server to serve a project.",
6
6
  "continuous": true,
7
7
  "type": "object",
8
+ "x-deprecated": "The `@nx/rspack:dev-server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` to migrate to the `@nx/rspack/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
8
9
  "properties": {
9
10
  "buildTarget": {
10
11
  "type": "string",
@@ -1 +1 @@
1
- {"version":3,"file":"rspack.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/rspack/rspack.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAiBrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,wBAA+B,WAAW,CACxC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,eAAe;aA0Bb,OAAO;cACN,MAAM;cA+EnB"}
1
+ {"version":3,"file":"rspack.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/executors/rspack/rspack.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAU,MAAM,YAAY,CAAC;AAiBrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGhD,wBAA+B,WAAW,CACxC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,eAAe;aA4Bb,OAAO;cACN,MAAM;cA+EnB"}
@@ -10,7 +10,9 @@ const path_1 = require("path");
10
10
  const create_compiler_1 = require("../../utils/create-compiler");
11
11
  const mode_utils_1 = require("../../utils/mode-utils");
12
12
  const normalize_options_1 = require("./lib/normalize-options");
13
+ const deprecation_1 = require("../../utils/deprecation");
13
14
  async function* runExecutor(options, context) {
15
+ (0, deprecation_1.warnRspackExecutorDeprecation)();
14
16
  process.env.NODE_ENV ??= options.mode ?? 'production';
15
17
  options.target ??= 'web';
16
18
  const metadata = context.projectsConfigurations.projects[context.projectName];
@@ -4,6 +4,7 @@
4
4
  "title": "Rspack build executor",
5
5
  "description": "Run Rspack via an executor for a project.",
6
6
  "type": "object",
7
+ "x-deprecated": "The `@nx/rspack:rspack` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` to migrate to the `@nx/rspack/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
7
8
  "properties": {
8
9
  "target": {
9
10
  "type": "string",
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EAGL,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAwD/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,mDA0H7B;AAED,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/rspack/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EAGL,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAyD/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mBAAmB,mDAmI7B;AAED,eAAe,sBAAsB,CAAC"}
@@ -7,6 +7,7 @@ const path_1 = require("path");
7
7
  const generator_utils_1 = require("../../utils/generator-utils");
8
8
  const init_1 = tslib_1.__importDefault(require("../init/init"));
9
9
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
10
+ const deprecation_1 = require("../../utils/deprecation");
10
11
  function projectIsRootProjectInStandaloneWorkspace(projectRoot) {
11
12
  return (0, path_1.relative)(devkit_1.workspaceRoot, projectRoot).length === 0;
12
13
  }
@@ -106,6 +107,13 @@ async function configurationGenerator(tree, options) {
106
107
  (0, generator_utils_1.deleteWebpackConfig)(tree, root, targets?.[buildTargetName]?.options?.webpackConfig);
107
108
  editTsConfig(tree, root, options.framework, (0, devkit_1.joinPathFragments)((0, devkit_1.offsetFromRoot)(root), 'tsconfig.base.json'));
108
109
  }
110
+ const willScaffoldExecutorTargets = !projectAlreadyHasRspackTargets.build ||
111
+ ((options.framework !== 'none' || options.devServer) &&
112
+ options.framework !== 'nest' &&
113
+ !projectAlreadyHasRspackTargets.serve);
114
+ if (willScaffoldExecutorTargets) {
115
+ (0, deprecation_1.warnRspackExecutorGenerating)();
116
+ }
109
117
  if (!projectAlreadyHasRspackTargets.build) {
110
118
  (0, generator_utils_1.addOrChangeBuildTarget)(tree, options, buildTargetName);
111
119
  }
@@ -0,0 +1,6 @@
1
+ export declare const RSPACK_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/rspack:rspack` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` to migrate to the `@nx/rspack/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
2
+ export declare const RSPACK_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = "The `@nx/rspack:dev-server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` to migrate to the `@nx/rspack/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.";
3
+ export declare function warnRspackExecutorDeprecation(): void;
4
+ export declare function warnRspackDevServerExecutorDeprecation(): void;
5
+ export declare function warnRspackExecutorGenerating(): void;
6
+ //# sourceMappingURL=deprecation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../../../../packages/rspack/src/utils/deprecation.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mCAAmC,mQACkN,CAAC;AAEnQ,eAAO,MAAM,8CAA8C,uQAC2M,CAAC;AAEvQ,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD;AAED,wBAAgB,sCAAsC,IAAI,IAAI,CAE7D;AAED,wBAAgB,4BAA4B,IAAI,IAAI,CAInD"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RSPACK_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = exports.RSPACK_EXECUTOR_DEPRECATION_MESSAGE = void 0;
4
+ exports.warnRspackExecutorDeprecation = warnRspackExecutorDeprecation;
5
+ exports.warnRspackDevServerExecutorDeprecation = warnRspackDevServerExecutorDeprecation;
6
+ exports.warnRspackExecutorGenerating = warnRspackExecutorGenerating;
7
+ const devkit_1 = require("@nx/devkit");
8
+ // TODO(v24): Remove the @nx/rspack:rspack and @nx/rspack:dev-server
9
+ // executors. The inferred plugin (@nx/rspack/plugin) and the
10
+ // convert-to-inferred generator stay supported.
11
+ exports.RSPACK_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/rspack:rspack` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` to migrate to the `@nx/rspack/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
12
+ exports.RSPACK_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE = 'The `@nx/rspack:dev-server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` to migrate to the `@nx/rspack/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.';
13
+ function warnRspackExecutorDeprecation() {
14
+ devkit_1.logger.warn(exports.RSPACK_EXECUTOR_DEPRECATION_MESSAGE);
15
+ }
16
+ function warnRspackDevServerExecutorDeprecation() {
17
+ devkit_1.logger.warn(exports.RSPACK_DEV_SERVER_EXECUTOR_DEPRECATION_MESSAGE);
18
+ }
19
+ function warnRspackExecutorGenerating() {
20
+ devkit_1.logger.warn('Generating targets that use the deprecated `@nx/rspack:rspack` and `@nx/rspack:dev-server` executors. These executors will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` next to migrate these targets to the `@nx/rspack/plugin` inferred plugin and prevent future generators from emitting executor targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.');
21
+ }