@forsakringskassan/vitest-config 2.4.0 → 2.5.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.
Files changed (2) hide show
  1. package/dist/index.js +21 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -139,11 +139,12 @@ import { fileURLToPath } from "node:url";
139
139
  var e = globalThis.process?.env || /* @__PURE__ */ Object.create(null);
140
140
  var t = globalThis.process || { env: e };
141
141
  var n = t !== void 0 && t.env && t.env.NODE_ENV || void 0;
142
- var r = [[`claude`, [`CLAUDECODE`, `CLAUDE_CODE`]], [`replit`, [`REPL_ID`]], [`gemini`, [`GEMINI_CLI`]], [`codex`, [`CODEX_SANDBOX`, `CODEX_THREAD_ID`]], [`opencode`, [`OPENCODE`]], [`pi`, [i(`PATH`, /\.pi[\\/]agent/)]], [`auggie`, [`AUGMENT_AGENT`]], [`goose`, [`GOOSE_PROVIDER`]], [`devin`, [i(`EDITOR`, /devin/)]], [`cursor`, [`CURSOR_AGENT`]], [`kiro`, [i(`TERM_PROGRAM`, /kiro/)]]];
143
- function i(t2, n2) {
142
+ var r = [[`claude`, [`CLAUDECODE`, `CLAUDE_CODE`]], [`replit`, [`REPL_ID`]], [`gemini`, [`GEMINI_CLI`]], [`codex`, [`CODEX_SANDBOX`, `CODEX_THREAD_ID`]], [`opencode`, [`OPENCODE`]], [`pi`, [i(`PATH`, /\.pi[\\/]agent/)]], [`auggie`, [`AUGMENT_AGENT`]], [`goose`, [`GOOSE_PROVIDER`]], [`junie`, [`JUNIE_DATA`, `JUNIE_SHIM_PATH`]], [`devin`, [i(`EDITOR`, /devin/)]], [`cursor`, [`CURSOR_AGENT`]], [`kiro`, [i(`TERM_PROGRAM`, /kiro/, { noTTY: true })]]];
143
+ function i(n2, r2, i2) {
144
144
  return () => {
145
- let r2 = e[t2];
146
- return r2 ? n2.test(r2) : false;
145
+ if (i2?.noTTY && t.stdout?.isTTY) return false;
146
+ let a2 = e[n2];
147
+ return a2 ? r2.test(a2) : false;
147
148
  };
148
149
  }
149
150
  function a() {
@@ -380,14 +381,28 @@ function defineTestConfig(userConfig = {}) {
380
381
  provider: mod,
381
382
  reporter: ["text", "text-summary", "lcov"],
382
383
  include: ["src/**/*.[jt]s"],
383
- exclude: ["**/index.[jt]s"]
384
+ exclude: [
385
+ "**/*.cy.ts",
386
+ "**/*.d.ts",
387
+ "**/__fixtures__/**",
388
+ "**/generated/**",
389
+ "**/index.[jt]s",
390
+ "**/temp/**"
391
+ ]
384
392
  },
385
393
  reporters: [
386
394
  "default",
387
395
  ["junit", { suiteName: "Vitest tests" }],
388
396
  ...githubReporter
389
397
  ],
390
- outputFile: "./test-results/vitest-junit.xml"
398
+ outputFile: "./test-results/vitest-junit.xml",
399
+ exclude: [
400
+ "**/.git/**",
401
+ "**/build/**",
402
+ "**/dist/**",
403
+ "**/node_modules/**",
404
+ "**/temp/**"
405
+ ]
391
406
  };
392
407
  const resolvedConfig = userConfig ? (0, import_deepmerge.default)(defaultConfig, userConfig, { arrayMerge: overwriteMerge }) : defaultConfig;
393
408
  return resolvedConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/vitest-config",
3
- "version": "2.4.0",
3
+ "version": "2.5.1",
4
4
  "description": "Försäkringskassan shareable config for Vitest",
5
5
  "keywords": [
6
6
  "vitest"
@@ -37,5 +37,5 @@
37
37
  "node": ">= 22.12.0",
38
38
  "npm": ">= 10.0.0"
39
39
  },
40
- "gitHead": "d9743925effe6a2be11730fb7e87e9cfec7cbc7d"
40
+ "gitHead": "857c963ca7a1b5ff166597a643bf0996cadcc116"
41
41
  }