Releases: rotaready/moment-range
Releases · rotaready/moment-range
v4.0.2
[4.0.2]
Added
- Added TypeScript & flow types missing options argument for
addmethod - Added overloaded TypeScript declarations allowing for calling
moment.range()without arguments
Changed
- Changed second parameter of
diff&durationfromroundedtopreciseto reflect the underlying moment method - Changed the
moment.range()&DateRangeconstructortypes to allow mixedDate&Momentparameters - Changed the
interval/unitflow parameter types in theby,diff,duration,reverseBy&snapToto 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
addandintersecttoDateRange | nullas opposed toDateRange | undefined - Fixed the flow
toDate()method return type from an array ofDates to aDatetuple - Fixed
extendMoment()typescript declaration to give access to moment namespace variables, e.g.moment.duration(),moment.HTML5_FMT
v4.0.1
v4.0.0
[4.0.0]
Deprecated
- Deprecated
exclusiveoption ofcontains()method in favour of new
excludeStartandexcludeEndoptions - Deprecated
exclusiveoption ofby()method in favour of newexcludeEndoptions - Deprecated
exclusiveoption ofbyRange()method in favour of newexcludeEndoptions - Deprecated
exclusiveoption ofreverseBy()method in favour of newexcludeStartoptions - Deprecated
exclusiveoption ofreverseByRange()method in favour of newexcludeStartoptions - Deprecated
parseZoneRangein favour ofrangeFromISOString
Added
- Added Typescript definitions
- Added Typescript config and tests
- Added
check,typescript-testnpm script - Added
excludeStartandexcludeEndtocontains()method - Added
excludeEndtoby()method - Added
excludeEndtobyRange()method - Added
excludeStarttoreverseBy()method - Added
excludeStarttoreverseByRange()method - Added note about supporting older browsers with links to polyfills to the README
- Added moment extension
rangeFromISOString, changed name fromparseZoneRange - Added
snapTo()method - Added explicit Flow typing tests
Changed
- Changed
buildscript to use webpack's production settings for a more
optimized build - Changed
prepublishscript toprepublishOnlyso the task isn't run on
install - Changed
prepublishOnlyandversionscripts to use&&instead of; - Changed
prepublish,preversion,versionscripts to support typescript definitions - Changed CircleCI config to also run typescript tests
- Changed
parseZoneRangetorangeFromISOStringto follow naming conventions. DeprecatedparseZoneRange. - 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:
flow→check:flowtypescript-test→check: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
intersectnot 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
v3.1.1
v3.1.0
Added
- Added function
isRangeas a simple and clear way to check if a variable is a DateRange - Added moment extension
parseZoneRangeto preserve timezone of start/end dates in a new range - Added moment extension
rangeFromIntervalto create a range between a date and a specified interval
Changed
- Changed open-ended ranges to accept any falsy value (except 0)
- Changed
addfunction: now has an option for adding adjacent ranges - Changed README: tidied documentation examples
Fixed
- Fixed typo in README in method
add - Fixed webpack output path for webpack >2.3.0
- Fixed linter errors/warnings for development
- Fixed repository URLs in CHANGELOG
v3.0.3
v3.0.2
Changed
libis now included in npm release to allow packagers to repackage the library- Update to webpack 2
- Add @victoriafrench to CONTRIBUTORS
- Add @JochenDiekenbrock to CONTRIBUTORS
v3.0.1
Added
- Added contributors to README
- Added CircleCI badge to README
- Added yarn lockfile
- Added polyfill for
Symbol
Changed
- Updated contributors in package.json
- Updated usage instructions for browsers (
window['moment-range']) - Moved
expect.jsfrom dependencies to development dependencies
The Big Three
Added
- ES6
- Flow typing
- Added documentation about range creation (thanks @seanwendt)
- Added webpack
- Added eslint
- Added karma/mocha/expect.js
- Added many more tests
- Addded new methods:
by,reverseBy,byRange,reverseByRange(#68)- Pass options as object
- New methods use iterators
- Added reversal methods
- Discrete methods for different iterator types
- Added ability to iterate over a range by a step (#93)
- Added
isEqualas alias ofisSame - Added
adjacentmethod and option tooverlaps(#92 #112) - Added
durationas an alias ofdiff(#64) - Added CircleCI config
Changed
- Documentation
- Changed usage:
import Moment from 'moment';
import { DateRange, extendMoment } from 'moment-js';
const moment = extendMoment(Moment); - Pass additonal optional rounded argument in
diff(#104) - Updated short-hand units (#134)
- Updated packaging rules and scripts
- Iteration methods now return an
Iterator dist/is only included in the npm release now
Removed
- Removed bower
- Removed grunt
- Removed jshint
- Removed mocha/should
- Removed
toArray