diff --git a/CHANGELOG.md b/CHANGELOG.md index a146799..f00b7d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +## 1.6.0 (2026-09-06) + +* feat(snapshots): `--update-snapshots` and `--ci` drive `twd.matchLayout` headlessly. `matchLayout` is off in the browser sidebar on purpose, because the sidebar resizes the page and a developer's window is an arbitrary size, so twd-cli is where a layout snapshot is actually decided +* feat(snapshots): the two flags stay separate the way Jest separates them, because they close two different holes. `--update-snapshots` rewrites references that already exist; `--ci` forbids *creating* one, so a brand new test cannot write its own baseline on the first CI run and pass forever without anyone noticing +* feat(snapshots): a run writes a self-contained `.twd/snapshot-report.html` with every failure capture embedded. In CI the machine that produced the PNGs is gone by the time anyone looks, so this is one file, one artifact, opened in any browser rather than a zip of loose images matched up by filename +* feat(snapshots): captures from earlier runs are cleared before each run. twd-js overwrites a capture on failure but never removes one when that snapshot later passes, so without the sweep a fixed layout keeps its old capture forever and the report shows a failure that no longer exists. Only `*.failed.png` is touched; the committed `.snap` references next to them are not +* feat(diagnostics): a failing test now reports which mock rules never fired, above the error message rather than below, because a twd-js failure message can carry a full accessible-roles dump that would bury it (#20) +* chore(deps): puppeteer 25.10.0 and a clean `npm audit` (#19) +* docs: list the sharding inputs in the action inputs table (#18) +* note: **behaviour change, and it is not opt-in.** `page.setViewport()` now runs on every run, not just when recording. A normal run used to inherit Puppeteer's implicit size. Layout snapshots are only reproducible if the viewport is fixed and explicit, and relying on the implicit default would mean a Puppeteer upgrade could change it and invalidate every committed reference at once, without a word. The default is `1280x800`, `viewport` in `twd.config.json` pins your own, and `record.viewport` still wins while recording +* note: the snapshot flags need **twd-js 1.10.0 or newer**. On an older version there is no `matchLayout` to drive and the flags do nothing + +A normal release: `npm install twd-cli` gets it. The *layout snapshot feature* is +the part marked beta, and it needs `twd-js` 1.10.0 or newer to do anything at +all. + +Unlike 1.5.0, this one does **not** come with a "no behaviour change unless you +opt in" guarantee. The viewport is now set explicitly on every run, so read that +note above even if you never touch a layout snapshot. + ## 1.5.0 (2026-08-25) * feat(shard): `--shard /` runs one slice of the suite so a run can be split across parallel CI jobs. Each shard discovers the whole suite itself and takes every nth test, so the test count never has to be known in advance diff --git a/package-lock.json b/package-lock.json index bc2c60e..14d1c96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "twd-cli", - "version": "1.5.0", + "version": "1.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "twd-cli", - "version": "1.5.0", + "version": "1.6.0", "license": "ISC", "dependencies": { "istanbul-lib-coverage": "^3.2.2", @@ -570,7 +570,6 @@ "integrity": "sha512-8MVGEFnJIcdGjcbfKmeq8z0pZHH0JlVtoVZH9Q/qwUp6wyFnEJUBMrw9DCaj+ra3vShGmhavjalMIhPNxZAUcw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@bcoe/v8-coverage": "^1.0.2", "@vitest/utils": "4.1.11", @@ -924,7 +923,6 @@ "integrity": "sha512-cs+LadpH7Kpw0M3k8wurk+sOVVDAENA0iK4OBOrkL94j5lEVYRJ4j3zd2bhY9qgzyrPqthdcYT3axzRN7AliMg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=22" } @@ -935,7 +933,6 @@ "integrity": "sha512-O+x4N2yH+ijvqWlIyTHsXTAP+algNWgGbjY2duCe8w2vUMvUB95cLRslCPfTMQyLAKlet3bhZTdu6ozn4M+QJQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@simple-libs/stream-utils": "^2.0.0", "argue-cli": "^3.1.0" @@ -968,8 +965,7 @@ "version": "0.0.1666840", "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1666840.tgz", "integrity": "sha512-gCcO42XCHKEs7Ag0S7aGYsnJ7hlgrO3qderYqeiY0Eqk+0GFfuvT13IA0hHreJTa2KCdDVyGMeOhdMNmrrTjVg==", - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/emoji-regex": { "version": "10.6.0", @@ -1593,7 +1589,6 @@ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -1864,7 +1859,6 @@ "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.5", @@ -1943,7 +1937,6 @@ "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/expect": "4.1.11", "@vitest/mocker": "4.1.11", diff --git a/package.json b/package.json index 40203ce..bb7583a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "twd-cli", - "version": "1.5.0", + "version": "1.6.0", "description": "CLI tool for running TWD tests with Puppeteer", "type": "module", "main": "src/index.js",