@rigour-labs/core 6.6.1 → 6.6.2

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.
@@ -44,8 +44,10 @@ export function setTelemetryEnabled(enabled, home = os.homedir()) {
44
44
  writeJson(file(home, 'telemetry.json'), state);
45
45
  return state;
46
46
  }
47
+ /** CI systems by the variable each always sets; Jenkins, Azure Pipelines and TeamCity do not set CI. */
48
+ const CI_MARKERS = ['CI', 'GITHUB_ACTIONS', 'BUILDKITE', 'GITLAB_CI', 'CIRCLECI', 'JENKINS_URL', 'TF_BUILD', 'TEAMCITY_VERSION'];
47
49
  function isCi(env) {
48
- return !!(env.CI || env.GITHUB_ACTIONS || env.BUILDKITE || env.GITLAB_CI || env.CIRCLECI);
50
+ return CI_MARKERS.some(name => !!env[name]);
49
51
  }
50
52
  /** Opted out by the environment, whatever the stored answer. */
51
53
  function vetoed(env) {
@@ -22,6 +22,11 @@ describe('telemetry consent', () => {
22
22
  it('never asks in CI or without a terminal, and keeps one random install id', () => {
23
23
  expect(shouldAskTelemetry(false, { env, home })).toBe(false);
24
24
  expect(shouldAskTelemetry(true, { env: { ...env, GITHUB_ACTIONS: 'true' }, home })).toBe(false);
25
+ setTelemetryEnabled(true, home);
26
+ for (const ci of ['JENKINS_URL', 'TF_BUILD', 'TEAMCITY_VERSION']) {
27
+ expect(isTelemetryEnabled({ env: { ...env, [ci]: 'x' }, home })).toBe(false); // a build agent's stored yes is not a CI opt-in
28
+ expect(isTelemetryEnabled({ env: { ...env, [ci]: 'x', RIGOUR_TELEMETRY: '1' }, home })).toBe(true);
29
+ }
25
30
  const first = setTelemetryEnabled(false, home).installId;
26
31
  expect(readTelemetryState(home).installId).toBe(first);
27
32
  expect(first).toMatch(/^[0-9a-f-]{36}$/);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigour-labs/core",
3
- "version": "6.6.1",
3
+ "version": "6.6.2",
4
4
  "description": "Rigour's review engine: deterministic gates on changed lines, rules and lessons learned from your team's fixes, and per-check precision from what you fix versus dismiss, across TypeScript, JavaScript, Python, Go, Ruby and C#.",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -70,11 +70,11 @@
70
70
  "pg": "^8.16.3",
71
71
  "sqlite3": "^5.1.7",
72
72
  "openai": "^4.104.0",
73
- "@rigour-labs/brain-darwin-x64": "6.6.1",
74
- "@rigour-labs/brain-linux-arm64": "6.6.1",
75
- "@rigour-labs/brain-darwin-arm64": "6.6.1",
76
- "@rigour-labs/brain-linux-x64": "6.6.1",
77
- "@rigour-labs/brain-win-x64": "6.6.1"
73
+ "@rigour-labs/brain-darwin-x64": "6.6.2",
74
+ "@rigour-labs/brain-linux-x64": "6.6.2",
75
+ "@rigour-labs/brain-linux-arm64": "6.6.2",
76
+ "@rigour-labs/brain-darwin-arm64": "6.6.2",
77
+ "@rigour-labs/brain-win-x64": "6.6.2"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/fs-extra": "^11.0.4",