@nx/rspack 24.0.5 → 24.0.7

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.
@@ -12,6 +12,5 @@ export declare class GeneratePackageJsonPlugin implements RspackPluginInstance {
12
12
  projectGraph: ProjectGraph;
13
13
  runtimeDependencies?: string[];
14
14
  });
15
- private resolveRuntimeDependencies;
16
15
  apply(compiler: Compiler): void;
17
16
  }
@@ -1,28 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GeneratePackageJsonPlugin = void 0;
4
- const tslib_1 = require("tslib");
5
- const fs = tslib_1.__importStar(require("fs"));
6
4
  const js_1 = require("@nx/js");
7
5
  const devkit_1 = require("@nx/devkit");
6
+ const internal_1 = require("@nx/js/internal");
8
7
  const pluginName = 'GeneratePackageJsonPlugin';
9
8
  class GeneratePackageJsonPlugin {
10
9
  constructor(options) {
11
10
  this.options = options;
12
11
  }
13
- resolveRuntimeDependencies() {
14
- const runtimeDependencies = {};
15
- if (this.options.runtimeDependencies) {
16
- for (const dep of this.options.runtimeDependencies) {
17
- const depPkgJson = require.resolve(`${dep}/package.json`);
18
- if (!fs.existsSync(depPkgJson))
19
- continue;
20
- const { name, version } = (0, devkit_1.readJsonFile)(depPkgJson);
21
- runtimeDependencies[name] = version;
22
- }
23
- }
24
- return runtimeDependencies;
25
- }
26
12
  apply(compiler) {
27
13
  compiler.hooks.thisCompilation.tap(pluginName, (compilation) => {
28
14
  compilation.hooks.processAssets.tapPromise({
@@ -42,7 +28,7 @@ class GeneratePackageJsonPlugin {
42
28
  target: js_1.HelperDependency.tsc,
43
29
  });
44
30
  }
45
- const runtimeDependencies = this.resolveRuntimeDependencies();
31
+ const runtimeDependencies = (0, internal_1.readRuntimeDependencies)(this.options.runtimeDependencies ?? [], [__dirname, this.options.root]);
46
32
  const packageJson = (0, js_1.createPackageJson)(this.options.projectName, this.options.projectGraph, {
47
33
  target: this.options.targetName,
48
34
  root: this.options.root,
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": "24.0.5",
4
+ "version": "24.0.7",
5
5
  "type": "commonjs",
6
6
  "files": [
7
7
  "dist",
@@ -159,9 +159,9 @@
159
159
  }
160
160
  },
161
161
  "dependencies": {
162
- "@nx/devkit": "24.0.5",
163
- "@nx/js": "24.0.5",
164
- "@nx/web": "24.0.5",
162
+ "@nx/devkit": "24.0.7",
163
+ "@nx/js": "24.0.7",
164
+ "@nx/web": "24.0.7",
165
165
  "@phenomnomnominal/tsquery": "~6.2.0",
166
166
  "autoprefixer": "^10.4.9",
167
167
  "browserslist": "^4.26.0",
@@ -186,8 +186,8 @@
186
186
  "webpack-node-externals": "^3.0.0"
187
187
  },
188
188
  "devDependencies": {
189
- "nx": "24.0.5",
190
- "@nx/nest": "24.0.5",
189
+ "nx": "24.0.7",
190
+ "@nx/nest": "24.0.7",
191
191
  "@rspack/cli": "^2.0.4"
192
192
  },
193
193
  "peerDependencies": {