@@ -73,16 +73,30 @@ There is no test suite. Baseline coverage is **0 %**.
7373
7474## Phase-by-phase plan
7575
76- - [x] ** Phase 0** — Reconnaissance: write this plan, ` DECISIONS.md ` , ` BREAKING_CHANGES.md ` , the v2 branch.
77- - [ ] ** Phase 1** — Foundation: bump engines, write ` tsconfig.json ` , ` package.json ` with ` exports ` map, ` files ` , ` .nvmrc ` , ` .node-version ` , ` browserslist ` , ` packageManager ` .
78- - [ ] ** Phase 2** — Dependencies: rip out ` webpack ` , ` babel ` , ` get-browser ` . Add ` typescript ` , ` tsup ` , ` vitest ` , ` happy-dom ` , ` @vitest/coverage-v8 ` , ` expect-type ` , ` tinybench ` , ESLint/Prettier stack, ` publint ` , ` @arethetypeswrong/cli ` , ` size-limit ` , changesets.
79- - [ ] ** Phase 3** — Rewrite source in TypeScript. New detection module. Typed errors. Strict types on public API.
80- - [ ] ** Phase 4** — Tooling: ESLint flat config, Prettier, tsup config, lint-staged + simple-git-hooks, full script set.
81- - [ ] ** Phase 5** — Tests + coverage gates + benchmark.
82- - [ ] ** Phase 6** — CI workflows + Changesets + branch-protection note.
83- - [ ] ** Phase 7** — README rewrite, TypeDoc site, supporting docs, issue/PR templates.
84- - [ ] ** Phase 8** — Hygiene: ` .gitignore ` , ` .gitattributes ` , examples, size-limit budget, fresh-install smoke test.
85- - [ ] ** Phase 9** — Final verification: install/typecheck/lint/test/build all green, ` publint ` + ` attw ` clean, smoke-test installation from ` npm pack ` .
76+ - [x] ** Phase 0** — Reconnaissance + ` MIGRATION_PLAN.md ` / ` DECISIONS.md ` / ` BREAKING_CHANGES.md ` .
77+ - [x] ** Phase 1** — Foundation: engines, ` tsconfig.json ` (strict + ` noUncheckedIndexedAccess ` , ` exactOptionalPropertyTypes ` , ` verbatimModuleSyntax ` ), ` package.json ` with ` exports ` map, files allowlist, ` .nvmrc ` / ` .node-version ` , browserslist, ` packageManager ` .
78+ - [x] ** Phase 2** — Dependencies: removed webpack/babel/get-browser; modern stack installed; zero runtime deps.
79+ - [x] ** Phase 3** — Source rewritten in TypeScript across ` browser.ts ` , ` strategies.ts ` , ` detect.ts ` , ` errors.ts ` , ` types.ts ` , ` index.ts ` .
80+ - [x] ** Phase 4** — ESLint v9 flat + Prettier + tsup dual build, lint-staged + simple-git-hooks installed.
81+ - [x] ** Phase 5** — Vitest suite, 49 tests, ** 98.17 % lines / 100 % functions / 90.09 % branches** , type-level tests with ` expectTypeOf ` , tinybench benchmarks.
82+ - [x] ** Phase 6** — ` ci.yml ` (3 × 3 matrix), ` release.yml ` (changesets + npm provenance via OIDC), ` codeql.yml ` , ` docs.yml ` , dependabot config.
83+ - [x] ** Phase 7** — README rewrite, TypeDoc site builds, CONTRIBUTING / CODE_OF_CONDUCT / SECURITY / CHANGELOG, issue/PR templates, FUNDING.yml.
84+ - [x] ** Phase 8** — Examples (` browser/ ` , ` node-import/ ` , ` vite-react/ ` ), ` .gitattributes ` , size-limit budget enforced.
85+ - [x] ** Phase 9** — Final verification ✓
86+ - ` pnpm install --frozen-lockfile ` ✓
87+ - ` pnpm typecheck ` ✓ (zero errors)
88+ - ` pnpm lint ` ✓ (zero errors, zero warnings)
89+ - ` pnpm test ` ✓ (49/49)
90+ - ` pnpm test:coverage ` ✓ (above thresholds)
91+ - ` pnpm build ` ✓
92+ - ` pnpm validate:package ` ✓ (publint "All good!" + attw "No problems found 🌟")
93+ - ` pnpm size ` ✓ (1.07 kB / 1.18 kB brotlied; budget 2 kB)
94+ - ` npm pack --dry-run ` ✓ (10 files; 15 kB / 80 kB unpacked)
95+ - Fresh-install smoke test ✓ (ESM / CJS / TS-strict all import cleanly from the tarball; typed error class crosses the module boundary)
96+
97+ ## Known limitations
98+
99+ - ** ` attw ` upstream bug** : versions 0.14 – 0.18 use a streaming-Gunzip pattern that only retains the last (empty) chunk, so any package whose decompressed contents exceed one fflate buffer fails with ` Cannot read properties of undefined (reading 'filename') ` . Worked around with a ` pnpm patch ` to ` @arethetypeswrong/core ` that concatenates all chunks. Upstream issue reference: < https://github.com/arethetypeswrong/arethetypeswrong.github.io > . Once an upstream fix lands, drop the patch.
86100
87101## Risk register
88102
0 commit comments