@diffci.com/diffci 0.3.57 → 0.3.58

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.
@@ -16,7 +16,11 @@ export declare const TELEMETRY_DOCS = "https://github.com/DiffCI/core/blob/main/
16
16
  export declare function preferencePath(env: NodeJS.ProcessEnv): string;
17
17
  export declare function readTelemetryPreference(env: NodeJS.ProcessEnv): Preference;
18
18
  export declare function configureTelemetry(mode: string, internal: boolean, env: NodeJS.ProcessEnv): Preference;
19
- /** True when the environment turns usage counting off entirely. Flags cannot: only the environment can. */
19
+ /**
20
+ * True when the environment turns usage counting off entirely. Flags cannot: only the environment can.
21
+ * A run under Node's test runner (NODE_TEST_CONTEXT, inherited by the CLIs a test starts) is a test, not usage:
22
+ * contributors' local test runs otherwise counted as anonymous external runs.
23
+ */
20
24
  export declare function usageCountingDisabled(env: NodeJS.ProcessEnv): boolean;
21
25
  /** host/owner/repo from a Git remote URL, without credentials, scheme or .git; undefined if unrecognised. */
22
26
  export declare function normaliseRemote(remote: string): string | undefined;
@@ -46,10 +46,14 @@ export function configureTelemetry(mode, internal, env) {
46
46
  writePreference(value, env);
47
47
  return value;
48
48
  }
49
- /** True when the environment turns usage counting off entirely. Flags cannot: only the environment can. */
49
+ /**
50
+ * True when the environment turns usage counting off entirely. Flags cannot: only the environment can.
51
+ * A run under Node's test runner (NODE_TEST_CONTEXT, inherited by the CLIs a test starts) is a test, not usage:
52
+ * contributors' local test runs otherwise counted as anonymous external runs.
53
+ */
50
54
  export function usageCountingDisabled(env) {
51
55
  const on = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
52
- return on(env.DO_NOT_TRACK) || env.DIFFCI_NO_SEND === "1" || env.DIFFCI_SHARE_USAGE === "0";
56
+ return on(env.DO_NOT_TRACK) || env.DIFFCI_NO_SEND === "1" || env.DIFFCI_SHARE_USAGE === "0" || Boolean(env.NODE_TEST_CONTEXT);
53
57
  }
54
58
  /** host/owner/repo from a Git remote URL, without credentials, scheme or .git; undefined if unrecognised. */
55
59
  export function normaliseRemote(remote) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diffci.com/diffci",
3
- "version": "0.3.57",
3
+ "version": "0.3.58",
4
4
  "description": "Verification for AI coding agents: runs the tests and checks a change affects, with full fallback and a receipt",
5
5
  "keywords": [
6
6
  "ci",