# @solid-primitives/date ## 3.0.0 ### Major Changes - 607d43c: Migrate to Solid.js v2.0 (beta.14) ## Breaking Changes **Peer dependencies**: `solid-js@^2.0.0-beta.14` and `@solidjs/web@^2.0.0-beta.14` are now required. - `isServer` is now imported from `@solidjs/web` (not `solid-js/web`) - `createStore` is now imported from `solid-js` (not `solid-js/store`) - `@solid-primitives/timer` and `@solid-primitives/memo` dependencies removed; `TimeoutSource` type is now defined locally - `createDateNow`: `createEffect` converted to split `(compute, apply)` form required by Solid 2.0; cleanup returned from apply phase instead of `onCleanup` - `createCountdown`: `createComputed` (removed in Solid 2.0) replaced with `createRenderEffect(compute, apply)` - `createDate`: `createWritableMemo` (removed in Solid 2.0) replaced with `createSignal(fn)` overload ### Patch Changes - 3221a4f: `getCountdown` (and so `createCountdown` / `createCountdownFromNow`) now returns the milliseconds left after the whole seconds (`% 1000` instead of `% 100`). `formatDateRelative` returns `messages.justNow` instead of `"in 0 second"` / `"0 second ago"` for differences under half a second. - 5fc4efa: Fix named imports breaking under Rolldown (Vite 8+ / Storybook 10.4.6+) bundlers. These packages re-export their public API via `export * from "./x.js"` barrels. Rollup resolves named imports through these at link time, but Rolldown's static analysis doesn't reliably follow `export *` for named-export resolution, causing errors like: ``` "createEventListener" is not exported by "@solid-primitives/event-listener/dist/index.js" ``` The build now also emits explicit `export { name } from "./x.js"` lines for every runtime export reachable through a barrel's `export *`, derived automatically from each submodule's compiled output — so `dist/` is bundler-agnostic regardless of how a given tool resolves star re-exports. - 7ee755d: Stop writing signals during server renders, and ship ref-factory forms of the remaining `use:`-shaped directives. Solid 2 (`2.0.0-rc.1`+) flags a signal or store setter that runs during a server render (`SERVER_WRITE`): the write lands as inert data today and will throw in a later release. Eight primitives still did this: - `@solid-primitives/utils`: new `createServerSafeSignal(value, options)` — `createSignal` on the client; on the server the signal is still created (so hydration ids stay aligned) but reads and writes go to a plain box. For primitives that hold interactive state with no async source. - `@solid-primitives/analytics`, `@solid-primitives/list-state`, `@solid-primitives/queue`, and `createInfiniteScroll` in `@solid-primitives/pagination`: internal state uses `createServerSafeSignal`. - `@solid-primitives/controlled-signal`: on the server an uncontrolled write lands in a plain override instead of the signal; reads and `onChange` behave as before. - `@solid-primitives/date`: `createCountdown` is now a derived store (`createStore(fn, seed)`) instead of a render effect writing into one — the shape upstream prescribes. - `@solid-primitives/masonry`: the one-shot signal that wired items to the layout memo is a plain variable. - `@solid-primitives/pagination`: `createPagination` no longer reads its options at the top level of the calling component (`STRICT_READ_UNTRACKED`). - `@solid-primitives/tween`: the effect's apply phase reads the current value with `untrack` (`STRICT_READ_UNTRACKED`). `@solid-primitives/event-listener` and `@solid-primitives/pointer`: `eventListener`, `pointerPosition` and `pointerHover` now return a ref callback when called with props alone — `