An educational pure functional programming library in TypeScript
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Release v0.1.0-alpha.12

+26 -1
+25
CHANGELOG.md
··· 2 2 3 3 All notable changes to this project will be documented in this file. 4 4 5 + ## [0.1.0-alpha.12] - 2026-02-28 6 + 7 + ### Fixed 8 + 9 + - **`ifElse` inverted arguments** — `onTrue` was called when predicate was false and vice versa; swapped parameter order and ternary to match naming 10 + - **`matchLiteral` soundness gap** — Split into exhaustive `matchLiteral` (requires all cases) and partial `matchLiteralOr` (with default fallback) 11 + - **Fiber interrupt doesn't cancel async** — Interrupt now calls cleanup on in-flight async operations and force-resolves blocked promises 12 + - **`zip` fiber leak** — When the second effect fails, the first fiber is now interrupted instead of being abandoned 13 + - **`traverseResult` unnecessary cast** — Removed redundant `as unknown as` double-cast; TypeScript narrows correctly 14 + - **Generic guards missing type predicates** — Added explicit `: x is T` annotations to `isDefined`, `isNotNull`, `isNotNullish` (TS 5.5 inference doesn't apply to generics) 15 + - **Interpreter null assertion** — Replaced `result!` with null guard in Blocked handler's next thunk 16 + - **Documentation: `race()` array syntax** — Fixed `race([fast, slow])` to `race(fast, slow)` in testing strategies 17 + - **Documentation: timeout test** — Fixed test to expect `Success(null)` instead of `Failure` on timeout 18 + - **Documentation: `yield*` pseudo-code** — Replaced generator syntax with actual `pipe`/`flatMap` in fiber example 19 + - **Documentation: `all()` return type** — Corrected type comment from tuple to union array 20 + - **Documentation: dead link** — Fixed `/concepts/01-branded-types-and-refinements/` to `/concepts/02-branded-types/` 21 + - **Examples: comma-expression patterns** — Replaced `(sideEffect, expr)` with explicit block bodies in http-client and task-queue 22 + - **Examples: redundant `as` casts** — Removed unnecessary `as MessageError` casts in forest-election story 23 + - **Documentation: task-queue key concepts** — Updated from `fork`/`join` to `allSequential`/`timeout`/`retry` 24 + - **Documentation: unused imports** — Removed unused `fork`/`join` from forest-election story 25 + 26 + ### Added 27 + 28 + - **39 new tests** (261 → 300 total) covering: `ifElse`, `matchLiteral`, `matchLiteralOr`, `mapErr`, `isOk`/`isErr`, `toNullable`, `flatMapOption` edge cases, `accessEff`, `tapEff`, `repeatEff`, `interruptFiber`, `matchExit`, `liftA2Option` both-None, Option Functor laws, Option Monad laws 29 + 5 30 ## [0.1.0-alpha.11] - 2026-02-28 6 31 7 32 ### Added
+1 -1
package.json
··· 1 1 { 2 2 "name": "purus-ts", 3 - "version": "0.1.0-alpha.11", 3 + "version": "0.1.0-alpha.12", 4 4 "description": "Pure TypeScript effect system with fiber-based concurrency, brands, refinements, and pattern matching", 5 5 "type": "module", 6 6 "main": "./dist/index.js",