@vitronai/themis 1.2.1 → 1.3.0

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
@@ -4,6 +4,28 @@ All notable changes to this project are documented in this file.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 1.3.0 - 2026-05-03
8
+
9
+ ### Added
10
+
11
+ - **`themis migrate node` codemod.** New third migration source converts test files written with `node:test` + `node:assert/strict` (default-import or named-import shapes) to Themis-native primitives. Handles `assert.equal`/`strictEqual` → `expect().toBe()`, `deepEqual`/`deepStrictEqual` → `toEqual()`, `ok` → `toBeTruthy()`, `match(str, /re/)` → `toMatch()`, `rejects(...)` → async try/catch wrapper, and `test.after`/`test.afterEach` → `afterAll`/`afterEach`. Also strips the optional 3rd-arg options object from `test(name, options, fn)` calls. Uses a balanced-paren scanner with regex-literal awareness so escaped slashes inside regex args don't trip the parser.
12
+ - **`toMatch(string | RegExp)` matcher** in core `expect`. Jest-compatible. Matches strings against a substring or regex; throws if `received` is not a string.
13
+ - **`--isolation process` mode.** Spawns a fresh Node child process (`child_process.fork`) per test file, mirroring `node --test`'s isolation model. Use this when tests mutate `process.env`, `process.cwd()`, or other process-level state at module-load time and depend on the SUT picking up those mutations — the worker-thread model freezes `os.homedir()` and shares the ESM module cache across files in `in-process` mode.
14
+ - **`npm run verify:dogfood`** — runs the migrator + Themis test pass against `alethia-mcp`'s `bridge-tests/*.mjs` (set `ALETHIA_MCP_REPO` to override path). Currently 57/57 green.
15
+ - ESM runtime support (`.mjs`, `.cjs`, `.js` in `type:module` packages) via dynamic `import()` in `src/module-loader.js`. Backed by 5 fixtures in `tests/fixtures/esm/` and `npm run proof:esm`. Mock-via-`mock(...)` is not supported for ESM imports (CJS only); document if encountered.
16
+ - `node:test` / `node:assert` residual-import detection in `MIGRATION_ASSIST_PATTERNS` so post-migration leftovers surface as warnings.
17
+
18
+ ### Changed
19
+
20
+ - Default `testRegex` now matches `.mjs` and `.cjs` test files in addition to `.js/.jsx/.ts/.tsx`.
21
+ - Migration report `summary` gains `nodeTest` and `nodeAssert` counters; `source` enum extended to `['jest', 'vitest', 'node']`. Schema bumped in-place under `themis.migration.report.v1`.
22
+
23
+ ### Notes
24
+
25
+ - `themis migrate node` silently drops `assert.equal`'s optional 3rd-arg message string (same posture as the existing jest/vitest codemods). Failure messages still surface via Themis assertion output.
26
+ - TS files inside `type:module` packages still transpile to CJS and crash in ESM scope — out of scope for this release; defer until a partner pulls.
27
+
28
+
7
29
  ## 1.2.1 - 2026-04-09
8
30
 
9
31
  - Added `init --cursor` flag to install a `.cursorrules` file with Themis conventions. Composable with `--agents` and `--claude-code`.