talktrack 0.1.0 → 0.1.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/README.md +36 -0
  2. package/package.json +16 -1
package/README.md CHANGED
@@ -98,6 +98,42 @@ await finalizeFramedRecording(page, testInfo, {
98
98
 
99
99
  `bands` accepts any subset of `BandStyle`: `headerHeightPx`, `footerHeightPx`, `background`, `textColor`, `fontStack`, `headerFontSizePx`, `footerFontSizePx`. The same options exist on `recordDemo`.
100
100
 
101
+ ## Development
102
+
103
+ TypeScript, pnpm, Turborepo, Playwright. You need Node 22 (see `.tool-versions`), the pnpm version in `packageManager`, and `ffmpeg` plus `ffprobe` with the `libvpx-vp9` encoder on `PATH`; the end-to-end suite needs them and nothing else does.
104
+
105
+ ```sh
106
+ pnpm install
107
+ pnpm exec playwright install chromium # once, for the e2e suite
108
+ pnpm typecheck && pnpm lint && pnpm test && pnpm test:e2e
109
+ ```
110
+
111
+ `pnpm prepush` runs that whole matrix through turbo and is what the pre-push hook executes.
112
+
113
+ ### Architecture
114
+
115
+ `src/` splits the pure halves (`human-path.ts` cursor geometry, `filter-graph.ts` caption windows and the ffmpeg filter graph, `timeline.ts` per-page narration events) from everything that touches a browser, the filesystem or ffmpeg (`cursor.ts`, `bands.ts`, `ffmpeg.ts`, `frame.ts`). The two adapters, `test-adapter.ts` (`finalizeFramedRecording`) and `standalone.ts` (`recordDemo`), are thin wrappers over `frameRecording`, so both driving modes produce identical output.
116
+
117
+ Tests are `test/unit/` (Vitest, pure modules) and `test/e2e/` (Playwright against `test/fixtures/demo-page.html`, driving both modes and probing the framed video with ffprobe).
118
+
119
+ ### Conventions
120
+
121
+ - Turbo task names are the underscore-prefixed leaf commands (`_build`, `_lint`, ...). Run the public names (`pnpm lint`, `pnpm test`); they go through turbo and its cache.
122
+ - Conventional commits, enforced by commitlint in the `commit-msg` hook and in CI. Releases are cut from them by semantic-release on every push to `main` (`release.config.ts`); never bump the version or edit the changelog by hand.
123
+ - Dependencies are added through the package manager and pinned exactly (`saveExact`). Anything younger than the configured release age waits, except the org's own `@exadev/*` tooling package, which is exempt in `pnpm-workspace.yaml` and `.npmrc`.
124
+ - `AGENTS.md` and `CLAUDE.md` are symlinks to this file. Keep them that way.
125
+
126
+ ### Releasing
127
+
128
+ Pushing to `main` runs the `release` job in `.github/workflows/ci.yml` after the required checks pass. It publishes to npm through trusted publishing (OIDC), so there is no npm token anywhere: the publisher is registered on npmjs.com for this repository and the `ci.yml` workflow. The release commit and tags are pushed to `main` straight from the job, which the ruleset on `main` otherwise forbids, so the job checks out with the repository's write deploy key (secret `RELEASE_DEPLOY_KEY`), the one actor the ruleset lets bypass its pull-request requirement. `release.config.ts` names the SSH repository URL so semantic-release pushes through that key rather than over HTTPS with the workflow token. Tags are `talktrack@<version>`, continuing from `talktrack@0.0.0`, the tag that marks the stub the npm name was reserved with.
129
+
130
+ ### Gotchas
131
+
132
+ - The framing pass needs the recording to be exactly viewport-sized. In `@playwright/test`, set `video: { mode: "on", size }` to the viewport size; Playwright otherwise scales the video down and `finalizeFramedRecording` throws rather than produce a mis-laid-out file.
133
+ - `finalizeFramedRecording` closes the page. Playwright only finalises a video once its page is closed, so the adapter does it itself; call it from `afterEach`, not mid-test.
134
+ - Do not set `registry-url` in `actions/setup-node` anywhere: it writes an `_authToken` line that wins over the OIDC exchange and silently breaks publishing.
135
+ - The ESLint config bans inline `eslint-disable` comments. Fix the code or restructure the test (for example `test.info()` instead of an empty destructuring pattern).
136
+
101
137
  ## Licence
102
138
 
103
139
  MIT
package/package.json CHANGED
@@ -1,22 +1,34 @@
1
1
  {
2
2
  "name": "talktrack",
3
3
  "description": "Narrated, cursor-driven demo recordings from Playwright: a synthetic human-feeling cursor, caption bands timed to real page events, and ffmpeg-framed output, usable inside @playwright/test specs or from standalone scripts.",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "bugs": {
6
6
  "url": "https://github.com/ExaDev/talktrack/issues"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@arethetypeswrong/cli": "^0.18.5",
10
+ "@commitlint/cli": "^21.2.2",
11
+ "@commitlint/config-conventional": "^21.2.2",
10
12
  "@eslint/js": "^10.0.1",
11
13
  "@exadev/eslint-config": "2.27.0",
12
14
  "@playwright/test": "^1.63.0",
15
+ "@semantic-release/changelog": "^7.0.0",
16
+ "@semantic-release/commit-analyzer": "^13.0.1",
17
+ "@semantic-release/git": "^11.0.1",
18
+ "@semantic-release/github": "^12.0.9",
19
+ "@semantic-release/npm": "^13.1.5",
20
+ "@semantic-release/release-notes-generator": "^14.1.1",
13
21
  "@types/node": "^26.4.0",
22
+ "conventional-changelog-conventionalcommits": "^10.4.0",
14
23
  "eslint": "^10.9.1",
15
24
  "eslint-config-prettier": "^10.1.8",
16
25
  "eslint-plugin-prettier": "^5.5.6",
17
26
  "globals": "^17.11.0",
27
+ "husky": "^9.1.7",
28
+ "lint-staged": "^17.4.1",
18
29
  "prettier": "^3.9.6",
19
30
  "publint": "^0.3.24",
31
+ "semantic-release": "^25.0.9",
20
32
  "tsdown": "^0.23.0",
21
33
  "turbo": "^2.10.12",
22
34
  "typescript": "^6.0.3",
@@ -54,6 +66,7 @@
54
66
  "license": "MIT",
55
67
  "main": "./dist/index.cjs",
56
68
  "module": "./dist/index.js",
69
+ "packageManager": "pnpm@12.4.1+sha512.2e81e399d73fe8390dab25e06aa788ab7a5908248d2f5a370f82b481147a6a7a367bf8048f9a6fdb6460f21a66f0542dedb8b94ca2c8723596741920b1656d4c",
57
70
  "peerDependencies": {
58
71
  "@playwright/test": ">=1.55"
59
72
  },
@@ -77,8 +90,10 @@
77
90
  "build": "turbo run _build",
78
91
  "lint": "turbo run _lint",
79
92
  "lint:fix": "eslint . --fix",
93
+ "prepare": "husky",
80
94
  "prepublishOnly": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build && publint && attw --pack",
81
95
  "prepush": "turbo run _prepush",
96
+ "release": "semantic-release",
82
97
  "test": "turbo run _test",
83
98
  "test:e2e": "turbo run _test:e2e",
84
99
  "typecheck": "turbo run _typecheck _typecheck:attw"