@joshmossas/nx-cargo 0.6.6 → 0.6.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/dist/index.cjs CHANGED
@@ -31,9 +31,9 @@ function createDependencies(_, ctx) {
31
31
  const depth = filepath.split(path__namespace.sep).length;
32
32
  return { filepath, depth };
33
33
  }).filter((manifest) => {
34
- console.log("CHECKING FOR Cargo.toml", manifest.filepath);
35
34
  return fs__namespace.existsSync(manifest.filepath);
36
35
  }).sort((a, b) => a.depth - b.depth);
36
+ fs__namespace.writeFileSync("__cargo-manifests.json", JSON.stringify(sortedManifests));
37
37
  for (const { filepath } of sortedManifests) {
38
38
  if (seenManifestPaths.has(filepath)) {
39
39
  continue;
@@ -89,13 +89,13 @@ function mapCargoProjects(ctx, packages) {
89
89
  });
90
90
  }
91
91
  }
92
+ fs__namespace.writeFileSync("__cargo-projects.json", JSON.stringify(result));
92
93
  return result;
93
94
  }
94
95
  function getCargoMetadata(cwd) {
95
96
  const availableMemory = os__namespace.freemem();
96
- const cmd = "cargo metadata --format-version=1 --no-deps";
97
- console.info(`[nx-json] Executing: "${cmd}"`);
98
- const metadata = cp__namespace.execSync("cargo metadata --format-version=1 --no-deps", {
97
+ const cmd = "cargo metadata --format-version=1";
98
+ const metadata = cp__namespace.execSync(cmd, {
99
99
  encoding: "utf8",
100
100
  maxBuffer: availableMemory,
101
101
  cwd,
package/dist/index.mjs CHANGED
@@ -12,9 +12,9 @@ function createDependencies(_, ctx) {
12
12
  const depth = filepath.split(path.sep).length;
13
13
  return { filepath, depth };
14
14
  }).filter((manifest) => {
15
- console.log("CHECKING FOR Cargo.toml", manifest.filepath);
16
15
  return fs.existsSync(manifest.filepath);
17
16
  }).sort((a, b) => a.depth - b.depth);
17
+ fs.writeFileSync("__cargo-manifests.json", JSON.stringify(sortedManifests));
18
18
  for (const { filepath } of sortedManifests) {
19
19
  if (seenManifestPaths.has(filepath)) {
20
20
  continue;
@@ -70,13 +70,13 @@ function mapCargoProjects(ctx, packages) {
70
70
  });
71
71
  }
72
72
  }
73
+ fs.writeFileSync("__cargo-projects.json", JSON.stringify(result));
73
74
  return result;
74
75
  }
75
76
  function getCargoMetadata(cwd) {
76
77
  const availableMemory = os.freemem();
77
- const cmd = "cargo metadata --format-version=1 --no-deps";
78
- console.info(`[nx-json] Executing: "${cmd}"`);
79
- const metadata = cp.execSync("cargo metadata --format-version=1 --no-deps", {
78
+ const cmd = "cargo metadata --format-version=1";
79
+ const metadata = cp.execSync(cmd, {
80
80
  encoding: "utf8",
81
81
  maxBuffer: availableMemory,
82
82
  cwd,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@joshmossas/nx-cargo",
3
3
  "private": false,
4
- "version": "0.6.6",
4
+ "version": "0.6.8",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.mjs",
@@ -60,11 +60,10 @@ export function createDependencies(_: unknown, ctx: Context): GraphDependency[]
60
60
  return { filepath, depth };
61
61
  })
62
62
  .filter(manifest => {
63
- console.log("CHECKING FOR Cargo.toml", manifest.filepath);
64
63
  return fs.existsSync(manifest.filepath);
65
64
  })
66
65
  .sort((a, b) => a.depth - b.depth);
67
-
66
+ fs.writeFileSync("__cargo-manifests.json", JSON.stringify(sortedManifests));
68
67
  for (const { filepath } of sortedManifests) {
69
68
  if (seenManifestPaths.has(filepath)) {
70
69
  continue;
@@ -151,18 +150,18 @@ function mapCargoProjects(ctx: Context, packages: Map<CargoId, CargoPackage>) {
151
150
  }
152
151
  }
153
152
 
153
+ fs.writeFileSync("__cargo-projects.json", JSON.stringify(result));
154
+
154
155
  return result;
155
156
  }
156
157
 
157
158
  /**
158
159
  * Executes 'cargo metadata'.
159
- * Uses --no-deps because we only care about internal workspace dependencies.
160
160
  */
161
161
  function getCargoMetadata(cwd: string): CargoMetadata {
162
162
  const availableMemory = os.freemem();
163
- const cmd = "cargo metadata --format-version=1 --no-deps";
164
- console.info(`[nx-json] Executing: "${cmd}"`);
165
- const metadata = cp.execSync("cargo metadata --format-version=1 --no-deps", {
163
+ const cmd = "cargo metadata --format-version=1";
164
+ const metadata = cp.execSync(cmd, {
166
165
  encoding: "utf8",
167
166
  maxBuffer: availableMemory,
168
167
  cwd: cwd,