Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 16 Feb 05:05
· 221 commits to main since this release
449a802

2.0.0 (2024-02-16)

⚠ BREAKING CHANGES

  • TimestampOptions: When constructing a Timestamp from
    TimestampOptions, all fields are now mandatory
    except for type, minutes, and seconds.
  • latest: The latest and
    latestTimestamp functions now take exactly two
    Timestamps as arguments instead of an Iterable. The
    advantage of this approach is that the function never
    returns null. If you need the old behaviour,
    compose it by using the fold function from
    @softwareventures/iterable instead.
  • earliest: The earliest and
    earliestTimestamp functions now take exactly two
    Timestamps as arguments instead of an Iterable. The
    advantage of this approach is that the function never
    returns null. If you need the old behaviour,
    compose it by using the fold function from
    @softwareventures/iterable instead.
  • fromReferenceSeconds: The functions timestamp,
    normalize, normalizeTimestamp,
    fromReferenceSeconds,
    timestampFromReferenceSeconds, earliest,
    earliestTimestamp, earliestFn,
    earliestTimestampFn, latest, latestTimestamp,
    latestFn, and latestTimestampFn now throw
    Error if any numeric values are non-finite.
  • The discriminator string has
    changed from "timestamp" (lowercase) to "Timestamp"
    (capital "T"). This change will break for consumers
    who check the discriminator directly (for example to
    discriminate from other types in a union) or who
    serialize and deserialize Timestamp objects with the
    discriminator intact.
  • node: node versions < 18, 19 are no longer
    supported.

Features

  • change discriminator string from "timestamp" to "Timestamp" (e126a03)
  • earliest: take exactly two Timestamps as arguments instead of an Iterable (eb34f8b)
  • latest: take exactly two Timestamps as arguments instead of an Iterable (e6eb29c)
  • node: drop support for node < 18, 19 (ad84de6)
  • TimestampOptions: require all fields except type, minutes, seconds (7f55f7c)

Bug Fixes

  • fromReferenceSeconds: throw Error if referenceSeconds is non-finite (cc97458)
  • TimestampOptions: fix seconds being incorrectly required (f7dfa2f)