no-mistakes 0.61.10 → 0.62.1

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.
@@ -83,6 +83,10 @@ async function main(
83
83
  }
84
84
  }
85
85
 
86
- if (require.main === module) void main();
86
+ function runIfMain(mainModule, current, start) {
87
+ if (mainModule === current) return start();
88
+ }
89
+
90
+ runIfMain(require.main, module, main);
87
91
 
88
- module.exports = { firstSubcommand, launchNative, main, planningImpactArgs };
92
+ module.exports = { firstSubcommand, launchNative, main, planningImpactArgs, runIfMain };
@@ -7,8 +7,8 @@ export interface InvocationOptions {
7
7
  /** Fail immediately instead of waiting when another invocation holds the lock. */
8
8
  failOnLock?: boolean;
9
9
  /**
10
- * Rayon worker count. Omit to leave the process pool unchanged.
11
- * `0` uses the CPU count, matching CLI `--jobs 0`.
10
+ * Rayon worker count. Omit or `0` uses the CPU count, matching CLI `--jobs 0`.
11
+ * A positive integer pins the process pool on the first N-API call.
12
12
  */
13
13
  jobs?: number | null;
14
14
  /** `ci` sets unbounded command and lock timeouts. CLI `--profile ci` does the same. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "no-mistakes",
3
- "version": "0.61.10",
3
+ "version": "0.62.1",
4
4
  "description": "Deterministic impact maps, test plans, Playwright coverage, and repository checks for coding agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -45,9 +45,9 @@
45
45
  "access": "public"
46
46
  },
47
47
  "optionalDependencies": {
48
- "no-mistakes-darwin-arm64": "0.61.10",
49
- "no-mistakes-linux-arm64-gnu": "0.61.10",
50
- "no-mistakes-linux-x64-gnu": "0.61.10",
51
- "no-mistakes-win32-x64-msvc": "0.61.10"
48
+ "no-mistakes-darwin-arm64": "0.62.1",
49
+ "no-mistakes-linux-arm64-gnu": "0.62.1",
50
+ "no-mistakes-linux-x64-gnu": "0.62.1",
51
+ "no-mistakes-win32-x64-msvc": "0.62.1"
52
52
  }
53
53
  }
@@ -5,8 +5,7 @@ const { basename, dirname, join } = require("node:path");
5
5
  const { randomUUID } = require("node:crypto");
6
6
  const { outputRestorationFailure } = require("./planning-impact-artifacts-errors");
7
7
  const privacy = require("./planning-impact-artifacts-privacy");
8
- const MANIFEST_OPEN_FLAGS =
9
- constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0);
8
+ const MANIFEST_OPEN_FLAGS = constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK;
10
9
 
11
10
  async function validateOutputDirectory(outputDirectory) {
12
11
  const directory = await realpath(outputDirectory);
@@ -89,10 +89,6 @@ async function writePlanningImpactArtifactsUnlocked(options, analyzeProject, ren
89
89
  );
90
90
  return { outputDirectory: output.path, ...artifacts };
91
91
  } catch (error) {
92
- if (manifestHandle) {
93
- await manifestHandle.close().catch(() => {});
94
- manifestHandle = undefined;
95
- }
96
92
  if (mayWriteFailureArtifacts && !artifactErrors.isOutputRestorationFailure(error)) {
97
93
  try {
98
94
  await updateOutputDirectory(