# @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 — ``, `
` — matching the `ref` directive shape Solid 2 replaced `use:` with. The two-argument `(el, props)` form still works. - 50e36c9: Bump the `solid-js`/`@solidjs/web` peer and dev dependency range to `2.0.0-beta.20`. No API or behavior changes; beta.19/beta.20 introduced no breaking changes upstream (internal tree-shaking work, a new `solid-js/refresh` HMR entry point, and SSR/hydration/`lazy()` bug fixes). - c98cb2d: Bump the `solid-js`/`@solidjs/web`/`@solidjs/signals`/`babel-preset-solid` peer and dev dependency range to `2.0.0-rc.0`. No API or behavior changes on our end — this tracks upstream's move from the beta series into the release candidate. - 1b703e1: Bump the `solid-js`/`@solidjs/web`/`@solidjs/signals` peer and dev dependency range to `2.0.0-rc.14`. - 638c530: Bump the `solid-js`/`@solidjs/web`/`@solidjs/signals` peer and dev dependency range to `2.0.0-rc.9`, and `babel-preset-solid` to `2.0.0-rc.2`. Two behavior fixes were needed to keep up with upstream changes in this range: - `@solid-primitives/deep`: `captureStoreUpdates` no longer missed property changes. As of `2.0.0-rc.1` a store's `[$TRACK]` only fires for structural changes (key additions/removals), so leaf value changes stopped being reported. Each node's direct property values are now tracked individually. Updates are still reported at the shallowest node that actually changed. - `@solid-primitives/storage`: `makePersisted` no longer persists stale data. Signal writes stay pending until the next flush in `2.0.0-rc.1`+, so reading the value back inside the setter returned the _previous_ one — persisting stale data, or removing the stored entry entirely when the previous value was nullish. The value returned by the setter is now persisted directly. - Updated dependencies [89c5324] - Updated dependencies [5fc4efa] - Updated dependencies [4a5bf32] - Updated dependencies [dd165cd] - Updated dependencies [7ee755d] - Updated dependencies [50e36c9] - Updated dependencies [c98cb2d] - Updated dependencies [1b703e1] - Updated dependencies [638c530] - Updated dependencies [04a170e] - Updated dependencies [cc30d55] - Updated dependencies [b7ef2f3] - Updated dependencies [5c23fda] - @solid-primitives/utils@7.0.0 - @solid-primitives/timer@1.4.5 ## 3.0.0-next.6 ### 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. ## 3.0.0-next.5 ### Patch Changes - 1b703e1: Bump the `solid-js`/`@solidjs/web`/`@solidjs/signals` peer and dev dependency range to `2.0.0-rc.14`. - Updated dependencies [1b703e1] - @solid-primitives/timer@1.4.5-next.3 - @solid-primitives/utils@7.0.0-next.6 ## 3.0.0-next.4 ### Patch Changes - 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 — ``, `` — matching the `ref` directive shape Solid 2 replaced `use:` with. The two-argument `(el, props)` form still works. - 638c530: Bump the `solid-js`/`@solidjs/web`/`@solidjs/signals` peer and dev dependency range to `2.0.0-rc.9`, and `babel-preset-solid` to `2.0.0-rc.2`. Two behavior fixes were needed to keep up with upstream changes in this range: - `@solid-primitives/deep`: `captureStoreUpdates` no longer missed property changes. As of `2.0.0-rc.1` a store's `[$TRACK]` only fires for structural changes (key additions/removals), so leaf value changes stopped being reported. Each node's direct property values are now tracked individually. Updates are still reported at the shallowest node that actually changed. - `@solid-primitives/storage`: `makePersisted` no longer persists stale data. Signal writes stay pending until the next flush in `2.0.0-rc.1`+, so reading the value back inside the setter returned the _previous_ one — persisting stale data, or removing the stored entry entirely when the previous value was nullish. The value returned by the setter is now persisted directly. - Updated dependencies [7ee755d] - Updated dependencies [638c530] - @solid-primitives/utils@7.0.0-next.5 - @solid-primitives/timer@1.4.5-next.2 ## 3.0.0-next.3 ### Patch Changes - Bump the `solid-js`/`@solidjs/web`/`@solidjs/signals`/`babel-preset-solid` peer and dev dependency range to `2.0.0-rc.0`. No API or behavior changes on our end — this tracks upstream's move from the beta series into the release candidate. - Updated dependencies - @solid-primitives/timer@1.4.5-next.1 - @solid-primitives/utils@7.0.0-next.4 ## 3.0.0-next.2 ### Patch Changes - 50e36c9: Bump the `solid-js`/`@solidjs/web` peer and dev dependency range to `2.0.0-beta.20`. No API or behavior changes; beta.19/beta.20 introduced no breaking changes upstream (internal tree-shaking work, a new `solid-js/refresh` HMR entry point, and SSR/hydration/`lazy()` bug fixes). - Updated dependencies [50e36c9] - @solid-primitives/timer@1.4.5-next.0 - @solid-primitives/utils@7.0.0-next.2 ## 3.0.0-next.1 ### Patch Changes - 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. - Updated dependencies [5fc4efa] - @solid-primitives/utils@7.0.0-next.1 ## 3.0.0-next.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 - Updated dependencies [89c5324] - Updated dependencies [4a5bf32] - @solid-primitives/utils@7.0.0-next.0 ## 2.1.6 ### Patch Changes - Updated dependencies [6680ab9] - @solid-primitives/utils@6.4.0 - @solid-primitives/memo@1.4.5 ## 2.1.5 ### Patch Changes - Updated dependencies [f32f209] - @solid-primitives/timer@1.4.4 - @solid-primitives/memo@1.4.4 ## 2.1.4 ### Patch Changes - Updated dependencies [3eec5eb] - @solid-primitives/timer@1.4.3 ## 2.1.3 ### Patch Changes - 396812d: Enable verbatimModuleSyntax -> add `type` keyword to all type imports. - Updated dependencies [396812d] - @solid-primitives/timer@1.4.2 - @solid-primitives/utils@6.3.2 - @solid-primitives/memo@1.4.3 ## 2.1.2 ### Patch Changes - 53f08cc: fix: Move `"@solid-primitives/source"` export condition under import in package.json (Fixes #774, Fixes #749) - Updated dependencies [53f08cc] - @solid-primitives/timer@1.4.1 - @solid-primitives/utils@6.3.1 - @solid-primitives/memo@1.4.2 ## 2.1.1 ### Patch Changes - Updated dependencies [d86e65d] - @solid-primitives/memo@1.4.1 ## 2.1.0 ### Minor Changes - ea09f71: Remove CJS support. The package is ESM only now. ### Patch Changes - Updated dependencies [ea09f71] - @solid-primitives/timer@1.4.0 - @solid-primitives/utils@6.3.0 - @solid-primitives/memo@1.4.0 ## 2.0.24 ### Patch Changes - @solid-primitives/memo@1.3.10 ## 2.0.23 ### Patch Changes - Updated dependencies [8dfd42d] - @solid-primitives/timer@1.3.10 ## 2.0.22 ### Patch Changes - Updated dependencies [49416e8] - @solid-primitives/memo@1.3.9 ## 2.0.21 ### Patch Changes - 74db287: Correct the "homepage" field in package.json - Updated dependencies [74db287] - @solid-primitives/memo@1.3.8 - @solid-primitives/timer@1.3.9 ## 2.0.20 ### Patch Changes - Updated dependencies [48d44c0] - @solid-primitives/utils@6.2.3 - @solid-primitives/memo@1.3.7 ## 2.0.19 ### Patch Changes - d23dd74: Add type exports for cjs - Updated dependencies [d23dd74] - @solid-primitives/memo@1.3.6 - @solid-primitives/timer@1.3.8 - @solid-primitives/utils@6.2.2 ## 2.0.18 ### Patch Changes - Updated dependencies [6aa53864] - @solid-primitives/memo@1.3.5 ## 2.0.17 ### Patch Changes - @solid-primitives/memo@1.3.4 ## 2.0.16 ### Patch Changes - Updated dependencies [92c1e5c4] - @solid-primitives/utils@6.2.1 - @solid-primitives/memo@1.3.3 ## 2.0.15 ### Patch Changes - @solid-primitives/memo@1.3.2 ## 2.0.14 ### Patch Changes - Updated dependencies [3c007b92] - @solid-primitives/utils@6.2.0 - @solid-primitives/memo@1.3.1 ## 2.0.13 ### Patch Changes - Updated dependencies [5e1f19e0] - @solid-primitives/memo@1.3.0 ## 2.0.12 ### Patch Changes - Updated dependencies [2e0bcedf] - @solid-primitives/utils@6.1.1 - @solid-primitives/memo@1.2.5 ## 2.0.11 ### Patch Changes - Updated dependencies [2f6d3732] - Updated dependencies [a1b88c95] - @solid-primitives/utils@6.0.0 - @solid-primitives/memo@1.2.4 ## 2.0.10 ### Patch Changes - 3fad3789: Revert from publishing separate server, development, and production builds that has to rely on export conditions to publishing a single build that can be used in any environment. Envs will be checked at with `isDev`and `isServer` consts exported by `"solid-js/web"` so it's still tree-shakeable. - Updated dependencies [3fad3789] - @solid-primitives/timer@1.3.7 - @solid-primitives/utils@5.5.1 - @solid-primitives/memo@1.2.3 ## 2.0.9 ### Patch Changes - Updated dependencies [d6559a32] - Updated dependencies [d7b907e6] - @solid-primitives/utils@5.4.0 - @solid-primitives/memo@1.2.0 ## 2.0.9-beta.1 ### Patch Changes - Updated dependencies [d6559a32] - @solid-primitives/utils@5.4.0-beta.0 - @solid-primitives/memo@1.2.0-beta.1 ## 2.0.9-beta.0 ### Patch Changes - Updated dependencies [d7b907e6] - @solid-primitives/memo@1.2.0-beta.0 ## 2.0.8 ### Patch Changes - 865d5ee9: Fix build. (remove keepNames option) - Updated dependencies [865d5ee9] - @solid-primitives/memo@1.1.5 - @solid-primitives/timer@1.3.6 - @solid-primitives/utils@5.2.1 ## 2.0.7 ### Patch Changes - Updated dependencies [c2866ea6] - Updated dependencies [c2866ea6] - @solid-primitives/memo@1.1.4 - @solid-primitives/utils@5.0.0 ## 2.0.6 ### Patch Changes - dd2d7d1c: Improve export conditions. - Updated dependencies [dd2d7d1c] - @solid-primitives/timer@1.3.5 - @solid-primitives/utils@4.0.1 - @solid-primitives/memo@1.1.3 ## 2.0.5 ### Patch Changes - Updated dependencies [9ed32b38] - @solid-primitives/utils@4.0.0 - @solid-primitives/memo@1.1.1 ## 2.0.4 ### Patch Changes - b662fe9f: Improve package export contidions for SSR (node, workers, deno) - Updated dependencies [71a1414d] - Updated dependencies [a372d0e7] - Updated dependencies [8ddc147a] - Updated dependencies [b662fe9f] - Updated dependencies [abb8063c] - @solid-primitives/memo@1.1.0 - @solid-primitives/utils@3.1.0 - @solid-primitives/timer@1.3.4 ## 2.0.2 ### Patch Changes - 7ac41ed: Update to solid-js version 1.5 - Updated dependencies [7ac41ed] - @solid-primitives/memo@1.0.2 - @solid-primitives/timer@1.3.2 - @solid-primitives/utils@3.0.2 ## 2.0.1 ### Patch Changes - e7870cb: Update deps. ## Changelog up to version 2.0.0 0.0.100 Initial release as a Stage-0 package. 1.0.0 Stage-2 realease. 1.0.2 Updated build process and documentation. 1.1.0 Rename to `date`, merge with `countdown`, refactor primitives to split them into smaller functions. 2.0.0 - **stage-3** [PR#113](https://github.com/solidjs-community/solid-primitives/pull/113) Remove `createTime`, use memo, and timer packages to reuse primitives