test-inventory-mcp 0.7.0 → 0.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # test-inventory-mcp
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#30](https://github.com/Huldoser/test-inventory-mcp/pull/30) [`1a503e3`](https://github.com/Huldoser/test-inventory-mcp/commit/1a503e307a613557e1e8f1f0dca775f9d7eb2050) - A pattern that reaches outside the project through a backslash escape, as `.\./secret/*.test.ts`, is refused on every
8
+ system. On Linux and macOS the glob reads `\.` as `.`, so the check, which looked for `..` between slashes and
9
+ backslashes, let it through, and the answer listed tests from outside the project.
10
+
11
+ - [#31](https://github.com/Huldoser/test-inventory-mcp/pull/31) [`de056b0`](https://github.com/Huldoser/test-inventory-mcp/commit/de056b0b6f205ac0f6ce5a9416c07bc730f050c4) - The server requires test-inventory 0.9.1, so its answers have that release's fixes: tests written as
12
+ `(process.env.CI ? it.skip : it)(...)` are listed, `.mocharc.yml`, `bunfig.toml`, Cypress and WebdriverIO spec patterns,
13
+ Jest's `moduleNameMapper` and Vite's `'@': '/src'` alias are read as the runners read them, Playwright 1.65's
14
+ `test.skip('reason')` gives the reason, and node:test and Bun skip states follow their describes. A `bunfig.toml` in a
15
+ scanned project can no longer change what later calls of a running server read.
16
+
3
17
  ## 0.7.0
4
18
 
5
19
  ### Minor Changes
package/dist/project.js CHANGED
@@ -1,9 +1,16 @@
1
1
  import { realpath, stat } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { scan } from 'test-inventory';
4
- /** A pattern from a tool call stays inside the folder it is scanned from: no absolute path and no `..`. */
4
+ /**
5
+ * A pattern from a tool call stays inside the folder it is scanned from: no absolute path and no `..`. On Windows a
6
+ * backslash separates folders, and elsewhere it escapes the next character, so `.\./` is `../` to the glob; a pattern
7
+ * is refused when either reading leaves the folder, so the answer is the same on every system.
8
+ */
5
9
  function checkPattern(pattern) {
6
- if (path.posix.isAbsolute(pattern) || path.win32.isAbsolute(pattern) || pattern.split(/[\\/]/).includes('..')) {
10
+ const unescaped = pattern.replaceAll(/\\(.)/gs, '$1');
11
+ if (path.posix.isAbsolute(unescaped) ||
12
+ path.win32.isAbsolute(pattern) ||
13
+ [...pattern.split(/[\\/]/), ...unescaped.split('/')].includes('..')) {
7
14
  throw new Error(`The pattern "${pattern}" reaches outside the folder it is scanned from. Patterns are relative to ` +
8
15
  '`directory` (the project root by default) and cannot start with "/" or a drive, or contain "..".');
9
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-inventory-mcp",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "MCP server for test-inventory: AI agents ask which Playwright, Vitest, Jest, Mocha, Jasmine, Cypress, WebdriverIO, node:test and Bun tests a project has, which are skipped and why, and which a change can affect, without running them.",
5
5
  "mcpName": "io.github.Huldoser/test-inventory",
6
6
  "keywords": [
@@ -11,6 +11,12 @@
11
11
  "playwright",
12
12
  "vitest",
13
13
  "jest",
14
+ "mocha",
15
+ "jasmine",
16
+ "cypress",
17
+ "webdriverio",
18
+ "bun",
19
+ "node-test",
14
20
  "test-inventory",
15
21
  "ai-agents"
16
22
  ],
@@ -71,7 +77,7 @@
71
77
  },
72
78
  "dependencies": {
73
79
  "@modelcontextprotocol/server": "^2.3.1",
74
- "test-inventory": "^0.9.0",
80
+ "test-inventory": "^0.9.1",
75
81
  "zod": "^4.6.7"
76
82
  }
77
83
  }