Skip to content

Update dependency moment-range to v4

Renovate Bot requested to merge renovate/moment-range-4.x into master

This MR contains the following updates:

Package Type Update Change
moment-range dependencies major ^3.1.1 -> ^4.0.0

Release Notes

rotaready/moment-range (moment-range)

v4.0.2

Compare Source

Added
  • Added TypeScript & flow types missing options argument for add method
  • Added overloaded TypeScript declarations allowing for calling moment.range() without arguments
Changed
  • Changed second parameter of diff & duration from rounded to precise to reflect the underlying moment method
  • Changed the moment.range() & DateRange constructor types to allow mixed Date & Moment parameters
  • Changed the interval/unit flow parameter types in the by, diff, duration, reverseBy & snapTo to include all strings allowed by moment
  • Changed internal TypeScript version to 3.3.3333
  • Changed internal moment version to 2.24.0
  • Changed CircleCI to version 2
Fixed
  • Fixed the return type of add and intersect to DateRange | null as opposed to DateRange | undefined
  • Fixed the flow toDate() method return type from an array of Dates to a Date tuple
  • Fixed extendMoment() typescript declaration to give access to moment namespace variables, e.g. moment.duration(), moment.HTML5_FMT

v4.0.1

Compare Source

Fixed
  • Fixed eslint-plugin-import pointing to non-existing file

v4.0.0

Compare Source

Deprecated
  • Deprecated exclusive option of contains() method in favour of new excludeStart and excludeEnd options
  • Deprecated exclusive option of by() method in favour of new excludeEnd options
  • Deprecated exclusive option of byRange() method in favour of new excludeEnd options
  • Deprecated exclusive option of reverseBy() method in favour of new excludeStart options
  • Deprecated exclusive option of reverseByRange() method in favour of new excludeStart options
  • Deprecated parseZoneRange in favour of rangeFromISOString
Added
  • Added Typescript definitions
  • Added Typescript config and tests
  • Added check, typescript-test npm script
  • Added excludeStart and excludeEnd to contains() method
  • Added excludeEnd to by() method
  • Added excludeEnd to byRange() method
  • Added excludeStart to reverseBy() method
  • Added excludeStart to reverseByRange() method
  • Added note about supporting older browsers with links to polyfills to the README
  • Added moment extension rangeFromISOString, changed name from parseZoneRange
  • Added snapTo() method
  • Added explicit Flow typing tests
Changed
  • Changed build script to use webpack's production settings for a more optimized build
  • Changed prepublish script to prepublishOnly so the task isn't run on install
  • Changed prepublishOnly and version scripts to use && instead of ;
  • Changed prepublish, preversion, version scripts to support typescript definitions
  • Changed CircleCI config to also run typescript tests
  • Changed parseZoneRange to rangeFromISOString to follow naming conventions. Deprecated parseZoneRange.
  • Changed typing tests to be grouped by type-checker (flow, typescript)
  • Changed test suffix (_test.js.test.js)
  • Changed test file location (./lib/./lib/tests/)
  • Changed package json script names:
    • flowcheck:flow
    • typescript-testcheck:typescript
  • Changed CircleCI to use Node 8.2.0
  • Changed CircleCI to use Yarn
  • Changed Flow config to find correct declarations
  • Changed location of Flow declaration (./declarations/./lib/)
Fixed
  • Fixed intersect not creating a new DateRange instance in all cases
  • Fixed Flow declaration to provide correct and stricter typings
  • Fixed DateRange constructor poor performance when passed moment objects
Removed
  • Removed lib/ from package.json files
  • Removed a bunch of unused Flow types

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Edited by Renovate Bot

Merge request reports