Skip to content

Releases: metonym/svelte-time

v2.0.0

23 Jan 21:07
Compare
Choose a tag to compare

The library is modernized to only support Svelte 5 (Runes mode). There are no component API changes.

Use [email protected] for Svelte 3/4 support. v1 is also compatible with Svelte 5 (non-Runes mode).

Breaking Changes

f986943, #51 contributed by @kvangrae, @niemyjski, @metonym

  • update Time.svelte to use Runes
  • update svelteTime action to use Runes
  • update TypeScript definitions to replace deprecated SvelteComponentTyped with Component

v1.0.0

23 Jan 20:38
Compare
Choose a tag to compare

Features

  • establish a stable release before upgrading to Svelte 5

Fixes

  • upgrade dayjs to v1.11.13

v0.9.0

20 Apr 03:52
Compare
Choose a tag to compare

Features

  • allow title attribute to be overridden (72a02ce, #44)

v0.8.3

06 Apr 22:28
Compare
Choose a tag to compare

This is a patch release to update documentation published to NPM.

Docs

  • Add recipe to use a custom timezone (a18d4ec)
  • Add recipe to use a custom locale (2892599)

v0.8.2

17 Dec 01:16
Compare
Choose a tag to compare

Fixes

  • fix exports in package.json to include types; add exports for ./src/*.svelte and ./src/* (#38, 748e53a)

v0.8.1

16 Dec 18:15
Compare
Choose a tag to compare

Fixes

  • add exports to package.json to resolve Vite development warnings (#37, 044abc1)

v0.8.0

27 Jul 15:56
Compare
Choose a tag to compare

Breaking Changes

  • minimum Svelte version required is 3.55

Features

  • update type definitions to support Svelte 4
  • upgrade dayjs to v1.11.9

v0.7.2

04 Jun 12:51
Compare
Choose a tag to compare

Fixes

  • upgrade dayjs to v1.11.8
  • fix Time.svelte types to allow data-* attributes (e.g., data-test-id)

v0.7.1

19 Jun 01:04
Compare
Choose a tag to compare

Fixes

  • use default CJS imports from dayjs instead of ESM
  • upgrade dayjs to v1.11.3
  • fix TypeScript definition for re-exported dayjs function to extend the relativeTime plugin
  • fix svelteTime action to update when using a custom live interval
  • fix svelteTime action to also set the datetime attribute

v0.7.0

15 May 18:29
Compare
Choose a tag to compare

Breaking Changes

  • format title attribute using format prop when using relative time (2d9bc08, #16 contributed by @imbolc)

    Previously, the title attribute used the original timestamp, which may not be human-readable. By re-using the format prop, the relative timestamp title will be easier to read while the machine-parseable format is still used by the datetime attribute.

    <time
    - title="2022-05-15T18:03:57.430Z"
    + title="May 15, 2022"
      datetime="2022-05-15T18:03:57.430Z">
      a few seconds ago
    </time>