Files
effect-view/packages/docs/package.json
T
ThilawynandJulien Valverdé ccd96f18d5
Publish / publish (push) Successful in 2m15s
Lint / lint (push) Successful in 27s
Release 0.4.0: extended runtimes, refreshable components, ScopeRegistry rework (#83)
## Summary

Bumps `effect-view` and `@effect-view/vite-plugin` to 0.4.0.

### ReactRuntime
- `ReactRuntime` is now a `Pipeable` with `*Prototype` / `*ImplPrototype` split, like `Component`.
- The `Provider` builds a `ManagedRuntime` for each mount and holds it in React state, so a remount builds the layer again and releases it on unmount. The runtime no longer exposes `runtime.runtime`, a public `layer` or a `memoMap` (breaking).
- New `runtime.extend(layer)`: an extended runtime gives a subtree (for example a router layout and its routes) its own services, on top of the context of its parent. Its `Provider` is rendered below the parent's, and routes read it with `Component.withContext(component, extended.context)`.
- `Component.withContext` throws a clear error when its context has no `Provider` above it.

### Refreshable components
- Hot reload keeps the state of a component when only its body changed, and remounts it when its hooks changed (`Refreshable`, with `@effect-view/vite-plugin` updated accordingly).

### ScopeRegistry and Component
- `ScopeRegistry` rework: `Ref` instead of `SubscriptionRef`, a monotonic clock, a sweeper that only wakes for earlier deadlines, `dispose` that waits for the scopes being closed (with a timeout).
- `Component` and `Async` no longer depend on `Scope.Scope` in their types; scope handling for `React.Activity` and `useOnChange` fixed.
- Benchmarks and tests for `ScopeRegistry`, `Async` and `Component`.

### Docs and example
- New docs pages: "Extended Runtimes" and "Common patterns".
- AI docs for `ReactRuntime` cover `extend`.
- The example package has `/user` routes using an extended runtime.

## Notes
- Tests migrated off `runtime.runtime` to `ReactRuntime.Provider`.
- `reports/REACT_REFRESH_FEASIBILITY.md` is removed.

---------

Co-authored-by: Julien Valverdé <julien.valverde@mailo.com>
Reviewed-on: #83
2026-11-10 00:16:29 +01:00

58 lines
1.5 KiB
JSON

{
"name": "docs",
"version": "0.0.0",
"private": true,
"scripts": {
"lint:tsc": "tsc -b --noEmit",
"lint:biome": "biome lint",
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build --out-dir dist",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve --dir dist",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"clean:cache": "rm -rf .turbo *.tsbuildinfo && docusaurus clear",
"clean:dist": "rm -rf dist",
"clean:modules": "rm -rf node_modules"
},
"dependencies": {
"@docusaurus/core": "^3.10.2",
"@docusaurus/faster": "^3.10.2",
"@docusaurus/preset-classic": "^3.10.2",
"@mdx-js/react": "^3.1.1",
"clsx": "^2.1.1",
"prism-react-renderer": "^2.4.1",
"react": "^19.2.5",
"react-dom": "^19.2.5"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.10.2",
"@docusaurus/tsconfig": "^3.10.2",
"@docusaurus/types": "^3.10.2",
"@types/react": "^19.2.15",
"@types/react-dom": "^19.2.3",
"docusaurus-plugin-typedoc": "^1.4.3",
"typedoc": "^0.28.20",
"typedoc-plugin-markdown": "^4.14.1",
"typescript": "~6.0.3"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=24.0"
}
}