Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
469d4d1
Update pnpm-lock.yaml
steida Nov 30, 2025
11af2dc
Raise minimum Node.js version to 24 in all packages
steida Nov 30, 2025
bba73d6
Leverage using with Node 24
steida Dec 1, 2025
87b32fe
Update pnpm-lock.yaml
steida Dec 1, 2025
76babe6
Add resource management polyfills and docs
steida Dec 2, 2025
6b2ef92
Refactor resource management test structure
steida Dec 2, 2025
ad353f0
Add generator-based composition tests for Result
steida Dec 2, 2025
2c4fe0a
Update Prettier config for embedded SQL tags
steida Dec 2, 2025
ffcffb4
Fix SQL createAppTable formatting
steida Dec 2, 2025
88dabe9
Improve resource management docs
steida Dec 2, 2025
f46f25c
Update dependencies in pnpm-lock.yaml
steida Dec 3, 2025
45dae12
Replace interface-based symmetric encryption with direct function-bas…
steida Dec 3, 2025
34669e4
Update pnpm-lock.yaml
steida Dec 3, 2025
23402c1
Remove TimeDep from EvoluDeps and related usage
steida Dec 3, 2025
5a4d172
Raise minimum Node.js version to 24 in all packages
steida Nov 30, 2025
7268cde
Leverage using with Node 24
steida Dec 1, 2025
b4858fa
Update pnpm-lock.yaml
steida Dec 1, 2025
d1f817f
Add resource management polyfills and docs
steida Dec 2, 2025
7ef3b51
Refactor resource management test structure
steida Dec 2, 2025
8f47597
Add generator-based composition tests for Result
steida Dec 2, 2025
e4d0d7b
Update Prettier config for embedded SQL tags
steida Dec 2, 2025
f48fbbf
Fix SQL createAppTable formatting
steida Dec 2, 2025
216a294
Improve resource management docs
steida Dec 2, 2025
f4f0bbc
Update dependencies in pnpm-lock.yaml
steida Dec 3, 2025
953c1fb
Replace interface-based symmetric encryption with direct function-bas…
steida Dec 3, 2025
6ff8bb0
Update pnpm-lock.yaml
steida Dec 3, 2025
e01010a
Remove TimeDep from EvoluDeps and related usage
steida Dec 3, 2025
7a8b588
Update pnpm-lock.yaml
steida Dec 4, 2025
b76322e
Merge branch 'common-v8' of https://github.com/evoluhq/evolu into com…
steida Dec 4, 2025
ebcaa53
Update README files
steida Dec 4, 2025
e29928f
Update @types/node to version 24.0.0
steida Dec 4, 2025
7557dc2
Enable @typescript-eslint/unbound-method rule
steida Dec 4, 2025
f0bbebb
Add createObjectURL helper for safe blob URL management
steida Dec 4, 2025
240ac18
Update Expo and related dependencies in pnpm-lock.yaml
steida Dec 4, 2025
08347f0
Add link to blog post in TypeScript library section
steida Dec 4, 2025
ac90851
Expand generator-based Result composition tests
steida Dec 4, 2025
010145a
Remove unused import from Result.test.ts
steida Dec 4, 2025
325e1d3
Add performance test for createRandomBytes
steida Dec 4, 2025
2564bb0
Skip generator vs imperative performance test
steida Dec 4, 2025
1f1819f
Update comments on generator-based Result
steida Dec 5, 2025
2aa786a
Update dependencies in pnpm-lock.yaml
steida Dec 5, 2025
0528425
Refactor platform abstractions and re-export web in react-web
steida Dec 5, 2025
c9ac795
Disable JavaScript formatter in biome.json
steida Dec 6, 2025
0df8692
Rename LazyValue<T> to Lazy<T>
steida Dec 7, 2025
ce37b58
Update coding conventions in Copilot instructions
steida Dec 7, 2025
df7bca1
Remove "abstraction" from SQLite and Console docs
steida Dec 7, 2025
0c886fb
Update pnpm-lock.yaml
steida Dec 7, 2025
4be336d
WIP: Migrate from Worker to SharedWorker
steida Dec 7, 2025
686bbfd
Update dependencies in pnpm-lock.yaml
steida Dec 8, 2025
438116d
Fix build
steida Dec 8, 2025
a8e0453
Add explicit MessageEvent typing to event handlers
steida Dec 8, 2025
95dfad4
Update pnpm-lock.yaml
steida Dec 8, 2025
3108133
Add multitenant SQLite WASM test
steida Dec 8, 2025
025632d
Improve Task cancellation documentation links
steida Dec 8, 2025
aebd8a5
Add SQLite WASM worker lifecycle playground
steida Dec 8, 2025
6aac338
Refactor multitenant playground to use Evolu example
steida Dec 8, 2025
f9a53b1
Improve link styling and container classes in Alerts
steida Dec 8, 2025
0a60eb0
Revise dependency injection docs for clarity and error handling
steida Dec 8, 2025
b7b4e07
Clarify DI usage in Ref and Store documentation
steida Dec 8, 2025
fd35b0a
Add Resources reference link to docs
steida Dec 8, 2025
771a286
Add draft blog post on alternatives to Comlink
steida Dec 9, 2025
8abad4c
Update copilot-instructions.md
steida Dec 9, 2025
e948269
Add equality checks and tests to Ref and Store
steida Dec 9, 2025
82893f0
Replace "business" with "domain"
steida Dec 9, 2025
2557e49
Improve Result docs
steida Dec 9, 2025
d8e9668
Update pnpm and various dependencies
steida Dec 9, 2025
e823948
Rename TransferableError to UnknownError
steida Dec 9, 2025
9ba5442
Create transferable-error-rename.md
steida Dec 10, 2025
3b290f4
Remove dev comments from Evolu example files
steida Dec 10, 2025
eefdea9
WIP: Refactor worker architecture with platform-agnostic interfaces
steida Dec 10, 2025
5194e24
Update dependencies across packages
steida Dec 11, 2025
ff7fc71
Add standalone Brand usage example and tests
steida Dec 11, 2025
7e95a04
Add DisposableDep and stack dependency interfaces
steida Dec 11, 2025
0df63a0
Add GlobalErrorScope for unified global error handling
steida Dec 11, 2025
e78550a
WIP: SharedWorker
steida Dec 11, 2025
74245dd
Update deps
steida Dec 11, 2025
e8c4584
Update dependencies for Expo, Svelte, and Vue projects
steida Dec 12, 2025
b65ddfe
Update project guidelines with TDD and enum conventions
steida Dec 16, 2025
b2814b9
Add and test decodeRle for robust RLE decoding
steida Dec 17, 2025
f191332
Revise and expand coding conventions documentation
steida Dec 19, 2025
780b6f0
Remove unused sections export and update privacy docs
steida Dec 19, 2025
7fe328d
Improve Result type inference for ok and err functions
steida Dec 19, 2025
5340043
Update docs headings from '###' to '##'
steida Dec 19, 2025
f060169
Revamp search indexing and UI for docs
steida Dec 19, 2025
f4aa7c2
Update Prettier SQL plugin configuration
steida Dec 19, 2025
db275f3
Update typedoc config with router and external links
steida Dec 19, 2025
998bb39
Update docs headings from ### to ##
steida Dec 19, 2025
14869f5
Rename typedoc script to build:docs
steida Dec 19, 2025
d0c10ab
Update deps
steida Dec 19, 2025
a88e382
Update doc headings from '###' to '##' in Types.ts
steida Dec 19, 2025
9373afa
Add Typed interface and typed factory for discriminated unions
steida Dec 19, 2025
cb5b351
Add guideline to avoid pipe characters in first sentence
steida Dec 20, 2025
7769158
Refactor and simplify MDX file fixing script
steida Dec 20, 2025
9337864
Update Feature icon prop type in Features.tsx
steida Dec 20, 2025
eaa08aa
Remove unnecessary ESLint disable comment
steida Dec 20, 2025
a9bd934
Update ESLint config for .mts files and exceptions
steida Dec 20, 2025
f3d2c2d
Remove local publish script and npm script entry
steida Dec 20, 2025
98a4b6c
Refactor Array module: new helpers, breaking changes
steida Dec 20, 2025
67ab589
Update library docs and navigation for Array section
steida Dec 20, 2025
685cd9d
Update intro text in local-first guide
steida Dec 20, 2025
89b8e3c
Add empty sections export to docs page
steida Dec 20, 2025
91b971c
Update readonly example for ES2025 iterator chains
steida Dec 20, 2025
46fd0ea
Refactor toggle-examples-deps script for clarity and linting
steida Dec 20, 2025
28d3819
feat(m0): adopt Biome for linting and formatting
miccy Dec 24, 2025
8b98edd
refactor(m0): finalize Biome migration and config structure
miccy Dec 24, 2025
a2fb924
chore: replace ESLint and Prettier VS Code extensions with Biome
miccy Dec 26, 2025
3b793c0
Update copilot instructions with shadowing and doc style
steida Dec 27, 2025
884a017
Clarify immutability and getter usage in docs
steida Dec 27, 2025
150c1c2
Refactor search indexing and add tests
steida Jan 12, 2026
7a6a155
Add emptyArray constant and enhance flatMapArray
steida Jan 12, 2026
e5f1ba9
Revamp docs and landing page
steida Jan 12, 2026
8676b85
Update Biome schema and dependencies
steida Jan 12, 2026
73156b1
Update copilot-instructions.md
steida Jan 12, 2026
ec2ad0e
Expand and clarify coding conventions documentation
steida Jan 12, 2026
6b24ac5
Remove emoji markers from code comments in docs
steida Jan 12, 2026
2bd5313
Update TypeDoc config for improved formatting
steida Jan 12, 2026
8958ed9
Add test coverage support and update dependencies
steida Jan 12, 2026
75e8148
Update .gitignore for API reference path
steida Jan 12, 2026
bfaa2ca
Add Listeners module for publish-subscribe notifications
steida Jan 12, 2026
2f39c8e
Add Awaitable type and numeric template utilities
steida Jan 12, 2026
d30b95a
Refactor Time module for type safety and timers
steida Jan 12, 2026
332dfca
Add pull-based protocol types and utilities
steida Jan 12, 2026
3ba2a92
Add experimental Schedule module for composable strategies
steida Jan 12, 2026
f19f106
Add FibonacciIndex type and fibonacciAt function
steida Jan 12, 2026
5720b0b
Add Set module with type-safe immutable helpers
steida Jan 12, 2026
5b9fe48
Remove guideline to avoid `import type` in instructions
steida Jan 12, 2026
ee6318e
Add public and internal schedule module exports
steida Jan 12, 2026
c1da8d0
Update @types/sharedworker to version 0.0.205
steida Jan 12, 2026
9ee2e12
Add browser test deps and enhance Vitest config
steida Jan 12, 2026
20dd037
Add Tracer interface for observability
steida Jan 12, 2026
0eeab7c
Update documentation example headings to '### Example'
steida Jan 12, 2026
21b165c
Refactor Store to use shared Listeners utility
steida Jan 12, 2026
3b74e48
Add result Type factory and typed overload for discriminants
steida Jan 12, 2026
e5ad6c1
Add tests for emptyArray constant and flatMapArray
steida Jan 12, 2026
fe07690
Add emptyRecord constant and update doc examples
steida Jan 12, 2026
6f1d6ea
Add RandomNumber branded type for random values
steida Jan 12, 2026
bb08cd7
Update documentation formatting in Redacted.ts
steida Jan 12, 2026
2875de9
Simplify module export documentation in local-first
steida Jan 12, 2026
eeb63f4
Update documentation headings from '##' to '### Example'
steida Jan 12, 2026
c47319a
Refactor Task.ts for structured concurrency and DI
steida Jan 12, 2026
c3e818b
Merge upstream/common-v8 preserving Biome/Bun configuration
miccy Jan 12, 2026
7210b55
fix(tests): remove empty Cache.test.ts and obsolete snapshots
miccy Jan 12, 2026
ee9581a
chore: update biome.json schema to 2.3.11
miccy Jan 12, 2026
57cabb8
chore: consolidate Biome configuration
miccy Jan 12, 2026
2963e13
update: minor dephs
miccy Jan 12, 2026
0551405
update: minor (yellow) deps
miccy Jan 12, 2026
cab053d
fix: promise and task
miccy Jan 13, 2026
be844fb
Disable web docs test
steida Jan 12, 2026
7cd7851
js/incomplete-multi-character-sanitization fix
steida Jan 12, 2026
fd46fdd
Add Playwright browser installation to CI workflow
steida Jan 12, 2026
c51612e
Increase Node.js memory limit for build script
steida Jan 12, 2026
ebaaf1b
Rename searchUtils.js to searchUtils.mjs and update imports
steida Jan 12, 2026
fb934cc
Update README with web build notes and instructions
steida Jan 12, 2026
0dc8b19
Update build script memory option in package.json
steida Jan 12, 2026
8a06990
Comment out glob import and dynamic MDX loading
steida Jan 12, 2026
c732570
Refactor tests to use sync Task functions
steida Jan 12, 2026
11847cf
Rename RunnerSnapshot to FiberSnapshot
steida Jan 13, 2026
d8cc334
Update Task test to use run parameter
steida Jan 13, 2026
55e73e1
chore: sync with upstream/common-v8 and polish monorepo
miccy Jan 13, 2026
6c3afe4
upgrade: bun 1.3.6 and turbo 2.7.4
miccy Jan 13, 2026
c950582
fix: finished
miccy Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .changeset/add-types-utilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@evolu/common": minor
---

Added new types and utilities to Types.ts:

- `Awaitable<T>` - type for values that can be sync or async
- `isPromiseLike` - type guard to check if a value is a PromiseLike
- `Digit`, `Digit1To9`, `Digit1To6`, `Digit1To23`, `Digit1To51`, `Digit1To99`, `Digit1To59` - template literal types for numeric validation
- `UnionToIntersection<U>` - converts a union to an intersection

`Awaitable<T>` represents values that can be either synchronous or asynchronous (`T | PromiseLike<T>`). This type is useful for functions that may complete synchronously or asynchronously depending on runtime conditions.

`isPromiseLike()` is a type guard to check if an Awaitable value is async, allowing conditional await only when necessary.
52 changes: 52 additions & 0 deletions .changeset/array-module-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
"@evolu/common": major
---

Refactored the Array module with breaking changes, better naming, and new helpers.

### Breaking Changes

**Removed `isNonEmptyReadonlyArray`** — use `isNonEmptyArray` instead. The function now handles both mutable and readonly arrays via overloads:

```ts
// Before
if (isNonEmptyReadonlyArray(readonlyArr)) { ... }
if (isNonEmptyArray(mutableArr)) { ... }

// After — one function for both
if (isNonEmptyArray(readonlyArr)) { ... }
if (isNonEmptyArray(mutableArr)) { ... }
```

**Renamed mutation functions** for consistency with the `...Array` suffix pattern:

- `shiftArray` → `shiftFromArray`
- `popArray` → `popFromArray`

### New Constants

- **`emptyArray`** — use as a default or initial value to avoid allocating new empty arrays

### New Functions

- **`flatMapArray`** — maps each element to an array and flattens the result, preserving non-empty type when applicable
- **`concatArrays`** — concatenates two arrays, returning non-empty when at least one input is non-empty
- **`sortArray`** — returns a new sorted array (wraps `toSorted`), preserving non-empty type
- **`reverseArray`** — returns a new reversed array (wraps `toReversed`), preserving non-empty type
- **`spliceArray`** — returns a new array with elements removed/replaced (wraps `toSpliced`)

### Migration

```ts
// isNonEmptyReadonlyArray → isNonEmptyArray
-import { isNonEmptyReadonlyArray } from "@evolu/common";
+import { isNonEmptyArray } from "@evolu/common";

// shiftArray → shiftFromArray
-import { shiftArray } from "@evolu/common";
+import { shiftFromArray } from "@evolu/common";

// popArray → popFromArray
-import { popArray } from "@evolu/common";
+import { popFromArray } from "@evolu/common";
```
18 changes: 9 additions & 9 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["web", "@example/*"]
"$schema": "https://unpkg.com/@changesets/config@2.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["web", "@example/*"]
}
12 changes: 12 additions & 0 deletions .changeset/gentle-pumas-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@evolu/react-native": major
"@evolu/react-web": major
"@evolu/common": major
"@evolu/nodejs": major
"@evolu/react": major
"@evolu/vue": major
"@evolu/web": major
"@evolu/relay": major
---

Updated minimum Node.js version from 22 to 24 (current LTS)
12 changes: 12 additions & 0 deletions .changeset/global-error-scope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@evolu/common": minor
"@evolu/web": minor
"@evolu/nodejs": minor
---

Added `GlobalErrorScope` interface for platform-agnostic global error handling

- Added `GlobalErrorScope` interface representing execution contexts that capture uncaught errors and unhandled promise rejections
- Added `handleGlobalError` helper to forward errors to scope callbacks
- Added `createGlobalErrorScope` for browser windows in `@evolu/web`
- Added `createGlobalErrorScope` for Node.js processes in `@evolu/nodejs`
5 changes: 5 additions & 0 deletions .changeset/lazy-rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@evolu/common": major
---

Renamed `LazyValue<T>` to `Lazy<T>` for brevity
19 changes: 19 additions & 0 deletions .changeset/listeners-module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
"@evolu/common": patch
---

Added Listeners module for publish-subscribe notifications

### Example

```ts
// Without payload (default)
const listeners = createListeners();
listeners.subscribe(() => console.log("notified"));
listeners.notify();

// With typed payload
const listeners = createListeners<{ id: string }>();
listeners.subscribe((event) => console.log(event.id));
listeners.notify({ id: "123" });
```
22 changes: 22 additions & 0 deletions .changeset/lovely-aliens-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
"@evolu/common": minor
---

Added `createObjectURL` helper for safe, disposable `URL.createObjectURL` usage using JS Resource Management so the URL is disposed automatically when the scope ends.

Example:

```ts
const handleDownloadDatabaseClick = () => {
void evolu.exportDatabase().then((data) => {
using objectUrl = createObjectURL(
new Blob([data], { type: "application/x-sqlite3" }),
);

const link = document.createElement("a");
link.href = objectUrl.url;
link.download = `${evolu.name}.sqlite3`;
link.click();
});
};
```
18 changes: 18 additions & 0 deletions .changeset/next-result-done.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@evolu/common": minor
---

Added pull-based protocol types for modeling three-outcome operations

New types and utilities for iterators and streams where completion is a normal outcome, not an error:

- `Done<D>` - Signal type for normal completion with optional summary value
- `done(value)` - Factory function to create Done instances
- `NextResult<A, E, D>` - Result that can complete with value, error, or done
- `nextResult(ok, err, done)` - Factory for creating NextResult Type instances
- `UnknownNextResult` - Type instance for runtime `.is()` checks
- `InferDone<R>` - Extracts the done value type from a NextResult
- `NextTask<T, E, D>` - Task that can complete with value, error, or done
- `InferTaskDone<T>` - Extracts the done value type from a NextTask

The naming follows the existing pattern: `Result` → `NextResult`, `Task` → `NextTask`.
9 changes: 9 additions & 0 deletions .changeset/random-number-brand.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@evolu/common": minor
---

Added `RandomNumber` branded type for type-safe random values

- `RandomNumber` — branded `number` type for values in [0, 1) range
- `Random.next()` now returns `RandomNumber` instead of `number`
- Prevents accidentally passing arbitrary numbers where random values are expected
9 changes: 9 additions & 0 deletions .changeset/red-wings-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@evolu/react-native": major
"@evolu/react-web": major
"@evolu/common": major
"@evolu/web": major
---

- Merged `@evolu/common/local-first/Platform.ts` into `@evolu/common/Platform.ts`
- Made `@evolu/react-web` re-export everything from `@evolu/web`, allowing React users to install only `@evolu/react-web`
5 changes: 5 additions & 0 deletions .changeset/result-never-inference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@evolu/common": major
---

Changed `ok()` to return `Result<T, never>` and `err()` to return `Result<never, E>` for correct type inference.
42 changes: 42 additions & 0 deletions .changeset/schedule-module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
"@evolu/common": minor
---

Added Schedule module for composable scheduling strategies.

**Schedule** is a composable abstraction for retry, repeat, and rate limiting. Each schedule is a state machine: calling `schedule(deps)` creates a step function, and each `step(input)` returns `Ok([Output, Millis])` or `Err(Done<void>)` to stop.

**Constructors:**

- `forever` — never stops, no delay (base for composition)
- `once` — runs exactly once
- `recurs(n)` — runs n times
- `spaced(duration)` — constant delay
- `exponential(base, factor?)` — exponential backoff
- `linear(base)` — linear backoff
- `fibonacci(initial)` — Fibonacci backoff
- `fixed(interval)` — window-aligned intervals
- `windowed(interval)` — sleeps until next window boundary
- `fromDelay(duration)` — single delay
- `fromDelays(...durations)` — sequence of delays
- `elapsed` — outputs elapsed time
- `during(duration)` — runs for specified duration
- `succeed(value)` — constant output
- `unfold(initial, next)` — state machine

**Combinators:**

- Limiting: `take`, `maxElapsed`, `maxDelay`
- Delay: `jitter`, `delayed`, `addDelay`, `modifyDelay`, `compensateExecution`
- Filtering: `whileInput`, `untilInput`, `whileOutput`, `untilOutput`, `resetAfter`
- Transform: `map`, `passthrough`, `fold`, `repetitions`, `delays`
- Collection: `collectAllOutputs`, `collectInputs`, `collectWhile`, `collectUntil`
- Composition: `sequence`, `intersect`, `union`, `whenInput`
- Side effects: `tapOutput`, `tapInput`

**Presets:**

- `retryStrategyAws` — exponential backoff (100ms base), max 2 retries, 20s cap, full jitter
- `retryStrategyAwsThrottled` — same but with 1s base for rate limiting

All APIs are marked `@experimental`.
28 changes: 28 additions & 0 deletions .changeset/set-module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
"@evolu/common": minor
---

Added Set module with type-safe helpers for immutable set operations.

**Types:**

- `NonEmptyReadonlySet<T>` — branded type for sets with at least one element (no mutable variant because `clear()`/`delete()` would break the guarantee)

**Constants:**

- `emptySet` — singleton empty set to avoid allocations

**Type Guards:**

- `isNonEmptySet` — narrows to branded `NonEmptyReadonlySet`

**Transformations:**

- `addToSet` — returns branded non-empty set with item added
- `deleteFromSet` — returns new set with item removed
- `mapSet` — maps over set, preserves non-empty type
- `filterSet` — filters set with predicate or refinement

**Accessors:**

- `firstInSet` — returns first element by insertion order (requires branded type)
5 changes: 5 additions & 0 deletions .changeset/smart-refs-store.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@evolu/common": minor
---

Added optional equality function to `Ref` and `ReadonlyStore` interface. `Ref.set` and `Ref.modify` now return `boolean` indicating whether state was updated. `Store` now uses `Ref` internally for state management.
11 changes: 11 additions & 0 deletions .changeset/spotty-coats-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@evolu/common": minor
---

Added Resource Management polyfills

Provides `Symbol.dispose`, `Symbol.asyncDispose`, `DisposableStack`, and `AsyncDisposableStack` for environments without native support (e.g., Safari). This enables the `using` and `await using` declarations for automatic resource cleanup.

Polyfills are installed automatically when importing `@evolu/common`.

See `Result.test.ts` for usage patterns combining `Result` with `using`, `DisposableStack`, and `AsyncDisposableStack`.
34 changes: 34 additions & 0 deletions .changeset/time-module-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
"@evolu/common": major
---

Refactored Time module for type safety, consistency, and better abstractions.

**Type safety:**

- Changed `Time.now()` return type from `number` to `Millis`
- Added `Millis` branded type with efficient 6-byte serialization (max value: year 10889)
- Added `minMillis` and `maxMillis` constants
- Both `now()` and `nowIso()` now throw on invalid values for consistent error handling

**Timer abstraction:**

- Added `Time.setTimeout` and `Time.clearTimeout` for platform-agnostic timers
- Added `TimeoutId` opaque type for timeout handles
- Added `TestTime` interface with `advance()` for controllable time in tests
- Updated `createTestTime` with `startAt` and `autoIncrement` options

**Duration literals:**

- Renamed `DurationString` to `DurationLiteral`
- Each duration has exactly one canonical form (e.g., "1000ms" must be written as "1s")
- Added decimal support: "1.5s" (1500ms), "1.5h" (90 minutes)
- Added weeks ("1w" to "51w") and years ("1y" to "99y")
- Removed combination syntax ("1h 30m") in favor of decimals ("1.5h")
- Months not supported (variable length)

**UI responsiveness constants:**

- `ms60fps` (16ms frame budget at 60fps)
- `ms120fps` (8ms frame budget at 120fps)
- `msLongTask` (50ms long task threshold for use with `yieldNow`)
Loading
Loading