From eecaaeb342a0671fb41bdbe6780a56bd7d2e6083 Mon Sep 17 00:00:00 2001 From: RKushnir Date: Wed, 28 Feb 2018 10:59:28 +0100 Subject: [PATCH 01/25] Remove the test file from the package --- .npmignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 93c12ea..68852b7 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,4 @@ declarations/ flow-typed/ -package-lock.json \ No newline at end of file +lib/moment-range_test.js +package-lock.json From d3ffe1695f3f0512e7832f7fb6c707b4c77d8420 Mon Sep 17 00:00:00 2001 From: Florian Simon Date: Mon, 22 May 2017 10:20:50 +0200 Subject: [PATCH 02/25] intersect(): return new DateRange instances in *EVERY* case --- lib/moment-range.js | 8 ++++---- lib/moment-range_test.js | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/moment-range.js b/lib/moment-range.js index 6f865d0..bafd3f5 100644 --- a/lib/moment-range.js +++ b/lib/moment-range.js @@ -167,7 +167,7 @@ export class DateRange { return null; } else if ((point > otherStart) && (point < otherEnd)) { - return this; + return this.clone(); } } else if (isOtherZeroLength) { @@ -177,7 +177,7 @@ export class DateRange { return null; } else if ((point > start) && (point < end)) { - return other; + return new this.constructor(point, point); } } @@ -189,10 +189,10 @@ export class DateRange { return new this.constructor(start, otherEnd); } else if ((otherStart < start) && (start <= end) && (end < otherEnd)) { - return this; + return this.clone(); } else if ((start <= otherStart) && (otherStart <= otherEnd) && (otherEnd <= end)) { - return other; + return new this.constructor(otherStart, otherEnd); } return null; diff --git a/lib/moment-range_test.js b/lib/moment-range_test.js index 7f74e2f..2e7155c 100644 --- a/lib/moment-range_test.js +++ b/lib/moment-range_test.js @@ -795,6 +795,7 @@ describe('DateRange', function() { const d6 = new Date(Date.UTC(2011, 4, 4)); const d7 = new Date(Date.UTC(2011, 6, 6)); const d8 = new Date(Date.UTC(2011, 8, 8)); + const v = Symbol(); it('should work with [---{==]---} overlaps where (a=[], b={})', function() { const dr1 = moment.range(d5, d7); From 93368d94212b52dc3c184cb319c3f5524c6410fc Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Mon, 18 Dec 2017 17:19:23 -0500 Subject: [PATCH 03/25] Use webpack's production mode for a more optimized build * Update `build` script to include production flag * Findings: - `moment-range` source is `10kb` - when compiled with its deps by webpack it's `29kb` - when compiled with its deps by rollup it's `20kb` - when compiled with its deps by webpack in production mode it's `12kb` --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60b63b6..d3f815f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Changed + +* Changed `build` script to use webpack's production settings for a more + optimized build ## [3.1.1] ### Fixed diff --git a/package.json b/package.json index 192d1a2..62a8785 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "lib/" ], "scripts": { - "build": "webpack", + "build": "webpack -p", "doctoc": "doctoc README.md --github", "flow": "flow", "lint": "eslint ./lib/", From eb43adc511f748eb3f4cd36b9504093e4ae49768 Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Mon, 18 Dec 2017 17:23:04 -0500 Subject: [PATCH 04/25] Change `prepublish` script to `prepublishOnly` --- CHANGELOG.md | 3 +++ package.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3f815f..ea9c786 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * Changed `build` script to use webpack's production settings for a more optimized build +* Changed `prepublsh` script to `prepublshOnly` so the task isn't run on + `install` +* Changed `prepublshOnly` and `version` scripts to use `&&` instead of `;` ## [3.1.1] ### Fixed diff --git a/package.json b/package.json index 62a8785..693d3d8 100644 --- a/package.json +++ b/package.json @@ -41,10 +41,10 @@ "doctoc": "doctoc README.md --github", "flow": "flow", "lint": "eslint ./lib/", - "prepublish": "yarn run build; cp ./declarations/moment-range.js.flow ./dist", + "prepublishOnly": "yarn run build && cp ./declarations/moment-range.js.flow ./dist", "preversion": "yarn run flow && yarn run lint && yarn run test", "test": "karma start ./karma.conf.js", - "version": "yarn run build; cp ./declarations/moment-range.js.flow ./dist" + "version": "yarn run build && cp ./declarations/moment-range.js.flow ./dist" }, "devDependencies": { "babel-core": "^6.18.2", From 62a0d4a22409bf7c10fc3a650681295e0f377273 Mon Sep 17 00:00:00 2001 From: TristanJM Date: Thu, 21 Dec 2017 11:28:15 +0000 Subject: [PATCH 05/25] Fixes typo --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea9c786..3a20817 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * Changed `build` script to use webpack's production settings for a more optimized build -* Changed `prepublsh` script to `prepublshOnly` so the task isn't run on +* Changed `prepublish` script to `prepublishOnly` so the task isn't run on `install` -* Changed `prepublshOnly` and `version` scripts to use `&&` instead of `;` +* Changed `prepublishOnly` and `version` scripts to use `&&` instead of `;` ## [3.1.1] ### Fixed From e544f65f0147ad17728f625580c221c7f4b602a6 Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Mon, 18 Dec 2017 15:25:00 -0500 Subject: [PATCH 06/25] Add typescript definitions * Typescript config & defs * Update npm scripts --- .npmignore | 1 + CHANGELOG.md | 8 ++ circle.yml | 1 + lib/moment-range.d.ts | 77 +++++++++++ package.json | 10 +- typing-tests/moment-range_test.ts | 125 +++++++++++++++++ typing-tests/tsconfig.json | 27 ++++ yarn.lock | 217 +++++++++++++++--------------- 8 files changed, 357 insertions(+), 109 deletions(-) create mode 100644 lib/moment-range.d.ts create mode 100644 typing-tests/moment-range_test.ts create mode 100644 typing-tests/tsconfig.json diff --git a/.npmignore b/.npmignore index 68852b7..e02f723 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,5 @@ declarations/ flow-typed/ lib/moment-range_test.js +typing-tests/ package-lock.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a20817..b1773b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Added + +* Added Typescript defitions +* Added Typescript config and tests +* Added `check`, `typescript-test` npm script + ### Changed * Changed `build` script to use webpack's production settings for a more @@ -13,6 +19,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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 ## [3.1.1] ### Fixed diff --git a/circle.yml b/circle.yml index 7676b3b..1220ef3 100644 --- a/circle.yml +++ b/circle.yml @@ -8,3 +8,4 @@ test: pre: - npm run lint - npm run flow + - npm run typescript-test diff --git a/lib/moment-range.d.ts b/lib/moment-range.d.ts new file mode 100644 index 0000000..628e003 --- /dev/null +++ b/lib/moment-range.d.ts @@ -0,0 +1,77 @@ +import * as moment from 'moment'; +import {Moment, unitOfTime} from 'moment'; + +export class DateRange { + start: Moment; + end: Moment; + + constructor(start: Date, end: Date); + constructor(start: Moment, end: Moment); + constructor(range: [Date, Date]); + constructor(range: [Moment, Moment]); + constructor(range: string); + + adjacent(other: DateRange): boolean; + + add(other: DateRange): DateRange | undefined; + + by(interval: unitOfTime.Diff, options?: { exclusive?: boolean; step?: number; }): Iterable; + + byRange(interval: DateRange, options?: { exclusive?: boolean; step?: number; }): Iterable; + + center(): Moment; + + clone(): DateRange; + + contains(other: Date | DateRange | Moment, options?: { exclusive?: boolean; }): boolean; + + diff(unit?: unitOfTime.Diff, rounded?: boolean): number; + + duration(unit?: unitOfTime.Diff, rounded?: boolean): number; + + intersect(other: DateRange): DateRange | undefined; + + isEqual(other: DateRange): boolean; + + isSame(other: DateRange): boolean; + + overlaps(other: DateRange, options?: { adjacent?: boolean; }): boolean; + + reverseBy(interval: unitOfTime.Diff, options?: { exclusive?: boolean; step?: number; }): Iterable; + + reverseByRange(interval: DateRange, options?: { exclusive?: boolean; step?: number; }): Iterable; + + subtract(other: DateRange): DateRange[]; + + toDate(): [Date, Date]; + + toString(): string; + + valueOf(): number; +} + +export interface MomentRangeStaticMethods { + parseZoneRange(isoTimeInterval: string): DateRange; + + range(start: Date, end: Date): DateRange; + range(start: Moment, end: Moment): DateRange; + range(range: [Date, Date]): DateRange; + range(range: [Moment, Moment]): DateRange; + range(range: string): DateRange; + + rangeFromInterval(interval: unitOfTime.Diff, count?: number, date?: Date | Moment): DateRange; +} + +export interface MomentRange extends MomentRangeStaticMethods { + (...args: any[]): MomentRangeStaticMethods & Moment; +} + +declare module 'moment' { + export interface Moment { + isRange(range: any): boolean; + + within(range: DateRange): boolean; + } +} + +export function extendMoment(momentClass: Moment | typeof moment): MomentRange & Moment; diff --git a/package.json b/package.json index 693d3d8..40de353 100644 --- a/package.json +++ b/package.json @@ -38,14 +38,17 @@ ], "scripts": { "build": "webpack -p", + "check": "yarn run typescript-test && yarn run flow", "doctoc": "doctoc README.md --github", "flow": "flow", "lint": "eslint ./lib/", - "prepublishOnly": "yarn run build && cp ./declarations/moment-range.js.flow ./dist", - "preversion": "yarn run flow && yarn run lint && yarn run test", + "prepublishOnly": "yarn run build && cp ./declarations/moment-range.* ./lib/*.d.ts ./dist", + "preversion": "yarn run flow && yarn run typescript-test && yarn run lint && yarn run test", "test": "karma start ./karma.conf.js", - "version": "yarn run build && cp ./declarations/moment-range.js.flow ./dist" + "typescript-test": "tsc --project typing-tests", + "version": "yarn run build && cp ./declarations/moment-range.* ./lib/*.d.ts ./dist" }, + "typings": "./dist/moment-range.d.ts", "devDependencies": { "babel-core": "^6.18.2", "babel-eslint": "^7.1.1", @@ -69,6 +72,7 @@ "karma-webpack": "^2.0.2", "mocha": "^2.5.3", "moment": "^2.17.1", + "typescript": "^2.6.2", "webpack": "^2.2.1" }, "peerDependencies": { diff --git a/typing-tests/moment-range_test.ts b/typing-tests/moment-range_test.ts new file mode 100644 index 0000000..6c69e04 --- /dev/null +++ b/typing-tests/moment-range_test.ts @@ -0,0 +1,125 @@ +import * as M from 'moment'; +import {DateRange, extendMoment} from 'moment-range'; + +const moment = extendMoment(M); + + +//----------------------------------------------------------------------------- +// Typescript Tests +//----------------------------------------------------------------------------- + +moment.parseZoneRange('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); + +moment.range(new Date(), new Date()); +moment.range(moment(), moment()); +moment.range([new Date(), new Date()]); +moment.range([moment(), moment()]); +moment.range('year'); + +moment.rangeFromInterval('day'); +moment.rangeFromInterval('day', 3); +moment.rangeFromInterval('day', 3, moment()); + +moment().isRange(moment.range('hour')); + +moment().within(moment.range('hour')); + +new DateRange(new Date(), new Date()); +new DateRange(moment(), moment()); +new DateRange([new Date(), new Date()]); +new DateRange([moment(), moment()]); +new DateRange('year'); + +// Adjacent +const range001 = new DateRange('year'); +range001.adjacent(new DateRange('month')); + +// Add +const range002 = new DateRange('day'); +range002.add(new DateRange('month')); + +// By +const range003 = new DateRange('year'); +range003.by('months'); +range003.by('months', {exclusive: true}); +range003.by('months', {step: 2}); +range003.by('months', {exclusive: true, step: 2}); + +// By Range +const range004 = new DateRange('year'); +range004.byRange(new DateRange('month')); + +// Center +const range005 = new DateRange('year'); +range005.center(); + +// Clone +const range006 = new DateRange('year'); +range006.clone(); + +// Contains +const range007 = new DateRange('year'); +range007.contains(new Date()); +range007.contains(new DateRange('day')); +range007.contains(moment()); +range007.contains(new Date(), {exclusive: true}); +range007.contains(new DateRange('day'), {exclusive: true}); +range007.contains(moment(), {exclusive: true}); + +// Diff +const range008 = new DateRange('year'); +range008.diff(); +range008.diff('month'); +range008.diff('month', true); + +// Duration +const range009 = new DateRange('year'); +range009.duration(); +range009.duration('month'); +range009.duration('month', true); + +// Intersect +const range010 = new DateRange('year'); +range010.intersect(new DateRange('month')); + +// Is Equal +const range011 = new DateRange('year'); +range011.isEqual(new DateRange('month')); + +// Is Same +const range012 = new DateRange('year'); +range012.isSame(new DateRange('month')); + +// Overlaps +const range013 = new DateRange('year'); +range013.overlaps(new DateRange('month')); +range013.overlaps(new DateRange('month'), {adjacent: true}); + +// Reverse By +const range014 = new DateRange('year'); +range014.reverseBy('months'); +range014.reverseBy('months', {exclusive: true}); +range014.reverseBy('months', {step: 2}); +range014.reverseBy('months', {exclusive: true, step: 2}); + +// Reverse By Range +const range015 = new DateRange('year'); +range015.reverseByRange(new DateRange('month')); + +// Subtract +const range016 = new DateRange('year'); +range016.subtract(new DateRange('month')); + +// To Date +const range017 = new DateRange('year'); +range017.toDate(); + +// To String +const range018 = new DateRange('year'); +range018.toString(); +range018 + ''; + +// Value Of +const range019 = new DateRange('year'); +range019.valueOf(); +// range019 + 1; diff --git a/typing-tests/tsconfig.json b/typing-tests/tsconfig.json new file mode 100644 index 0000000..20272d7 --- /dev/null +++ b/typing-tests/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "allowSyntheticDefaultImports": false, + "baseUrl": ".", + "declaration": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es2015", "es2015.iterable"], + "module": "commonjs", + "moduleResolution": "node", + "noEmit": true, + "noImplicitAny": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "paths": { + "moment-range": ["../lib/moment-range.d.ts", "../lib/moment-range.js"] + } + }, + "files": [ + "../lib/moment-range.d.ts", + "./moment-range_test.ts" + ], + "sourceMap": true, + "strict": true, + "strictNullChecks": true, + "target": "es5" +} diff --git a/yarn.lock b/yarn.lock index c2ceb56..11c6556 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,5 +1,7 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 + + abbrev@1: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" @@ -1145,14 +1147,14 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - co@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/co/-/co-3.1.0.tgz#4ea54ea5a08938153185e15210c68d9092bc1b78" +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -1177,7 +1179,11 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@^2.0.0, commander@2.3.0: +commander@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" + +commander@2.3.0, commander@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" @@ -1187,10 +1193,6 @@ commander@^2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -1215,14 +1217,6 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.0.0, concat-stream@^1.4.6: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - concat-stream@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.0.tgz#53f7d43c51c5e43f81c8fdd03321c631be68d611" @@ -1231,6 +1225,14 @@ concat-stream@1.5.0: readable-stream "~2.0.0" typedarray "~0.0.5" +concat-stream@^1.0.0, concat-stream@^1.4.6: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + connect@^3.3.5: version "3.5.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.5.0.tgz#b357525a0b4c1f50599cd983e1d9efeea9677198" @@ -1338,28 +1340,28 @@ date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" -debug@^2.0.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0, debug@2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" - dependencies: - ms "0.7.2" +debug@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" -debug@~2.2.0, debug@2.2.0: +debug@2.2.0, debug@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" -debug@0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" - debug@2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" dependencies: ms "0.7.2" +debug@2.6.0, debug@^2.0.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" + dependencies: + ms "0.7.2" + decamelize@^1.0.0, decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1463,14 +1465,14 @@ domain-browser@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" -domelementtype@~1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" - domelementtype@1: version "1.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + domhandler@2.2: version "2.2.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.2.1.tgz#59df9dcd227e808b365ae73e1f6684ac3d946fc2" @@ -1563,14 +1565,14 @@ ent@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" -entities@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" - entities@1.0: version "1.0.0" resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + errno@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" @@ -1623,7 +1625,7 @@ es6-set@~0.1.3: es6-symbol "3" event-emitter "~0.3.4" -es6-symbol, es6-symbol@~3.1, es6-symbol@~3.1.0, es6-symbol@3: +es6-symbol, es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" dependencies: @@ -1643,7 +1645,7 @@ escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" -escape-string-regexp@^1.0.2, escape-string-regexp@1.0.2: +escape-string-regexp@1.0.2, escape-string-regexp@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" @@ -2008,6 +2010,13 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob@3.2.11: + version "3.2.11" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" + dependencies: + inherits "2" + minimatch "0.3" + glob@^6.0.1: version "6.0.4" resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" @@ -2029,13 +2038,6 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@3.2.11: - version "3.2.11" - resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" - dependencies: - inherits "2" - minimatch "0.3" - globals@^9.0.0, globals@^9.14.0: version "9.14.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" @@ -2214,7 +2216,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@2, inherits@2.0.3: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -2406,14 +2408,14 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + isbinaryfile@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621" @@ -2769,12 +2771,6 @@ minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" -minimatch@^3.0.0, minimatch@^3.0.2, "minimatch@2 || 3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - minimatch@0.3: version "0.3.0" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" @@ -2782,24 +2778,24 @@ minimatch@0.3: lru-cache "2" sigmund "~1.0.0" -minimist@^1.2.0, minimist@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" -minimist@~0.0.1, minimist@0.0.8: +minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" +minimist@1.2.0, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + minimist@~1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" -mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1, mkdirp@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - mkdirp@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" @@ -2810,6 +2806,12 @@ mkdirp@0.5.0: dependencies: minimist "0.0.8" +mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + mocha@^2.5.3: version "2.5.3" resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.5.3.tgz#161be5bdeb496771eb9b35745050b622b5aefc58" @@ -2943,14 +2945,14 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - object-assign@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + object-component@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" @@ -3209,26 +3211,26 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + qjobs@^1.1.4: version "1.1.5" resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" -qs@~6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" - qs@6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625" +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -3284,6 +3286,15 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" @@ -3328,15 +3339,6 @@ readable-stream@~2.1.4: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@1.1: - version "1.1.13" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" @@ -3527,7 +3529,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^2.2.8, rimraf@^2.3.3, rimraf@~2.5.1, rimraf@~2.5.4, rimraf@2: +rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, rimraf@~2.5.1, rimraf@~2.5.4: version "2.5.4" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" dependencies: @@ -3551,14 +3553,14 @@ safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" +"semver@2 || 3 || 4 || 5", semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + semver@~4.3.3: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" -semver@~5.3.0, "semver@2 || 3 || 4 || 5": - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -3733,10 +3735,6 @@ stream-http@^2.3.1: to-arraybuffer "^1.0.0" xtend "^4.0.0" -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - string-width@^1.0.0, string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3752,6 +3750,10 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" +string_decoder@^0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringify-entities@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-1.3.0.tgz#2244a516c4f1e8e01b73dad01023016776abd917" @@ -3796,6 +3798,10 @@ structured-source@^3.0.2: dependencies: boundary "^1.0.1" +supports-color@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e" + supports-color@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" @@ -3810,10 +3816,6 @@ supports-color@^3.1.0: dependencies: has-flag "^1.0.0" -supports-color@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e" - table@^3.7.8: version "3.8.3" resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" @@ -3947,6 +3949,10 @@ typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" +typescript@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" + uglify-js@^2.7.5: version "2.7.5" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" @@ -4000,7 +4006,7 @@ unist-util-visit@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.1.1.tgz#e917a3b137658b335cb4420c7da2e74d928e4e94" -unpipe@~1.0.0, unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -4037,7 +4043,7 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -util@^0.10.3, util@0.10.3: +util@0.10.3, util@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: @@ -4185,6 +4191,10 @@ window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" @@ -4193,10 +4203,6 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -4285,4 +4291,3 @@ yauzl@2.4.1: yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" - From d06b5e933d90fd7095839c5a4c778a839dd26b89 Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Mon, 18 Dec 2017 23:10:29 -0500 Subject: [PATCH 07/25] Deprecate `exclusive` option of `contains()` method * Deprecated `exclusive` option of `contains()` method in favour of new `excludeStart` and `excludeEnd` options * Add tests * Update both flow and typescript type definitions --- CHANGELOG.md | 6 +++++ README.md | 37 +++++++++++++++++++++++++------ declarations/moment-range.js.flow | 2 ++ lib/moment-range.d.ts | 2 ++ lib/moment-range.js | 13 ++++++++--- lib/moment-range_test.js | 24 +++++++++++++++++--- typing-tests/moment-range_test.ts | 15 ++++++++++--- 7 files changed, 83 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1773b6..16b218b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Deprecated + +* Deprecated `exclusive` option of `contains()` method in favour of new + `excludeStart` and `excludeEnd` options + ### Added * Added Typescript defitions * Added Typescript config and tests * Added `check`, `typescript-test` npm script +* Added `excludeStart` and `excludeEnd` to `contains()` method ### Changed diff --git a/README.md b/README.md index 8d179ad..4686ccf 100644 --- a/README.md +++ b/README.md @@ -227,20 +227,43 @@ const dr = moment.range(start, end); dr.center(); // 1300622400000 ``` - #### Contains -Check to see if your range contains a date/moment: +Check to see if your range contains a date/moment. By default the start and end +dates are included in the search. E.g.: ``` js -const range = moment.range(a, c); +const start = moment('2017-12-01'); +const end = moment('2017-12-15'); +const inside = moment('2017-12-08'); +const outside = moment('2017-12-25'); +const range = moment.range(start, out); -range.contains(b); // true -range.contains(d); // false +range.contains(start); // true +range.contains(end); // true +range.contains(inside); // true +range.contains(outside); // false ``` -The `exclusive` options is used to indicate if the end of the range should be -excluded when testing for inclusion: +You can also control whether the start or end dates should be excluded from the +search with the `excludeStart` and `excludeEnd` options: + +``` js +const start = moment('2017-12-01'); +const end = moment('2017-12-15'); +const range = moment.range(start, out); + +range.contains(start); // true +range.contains(start, { excludeStart: true }); // false +range.contains(end); // true +range.contains(end, { excludeEnd: true; }); // false +``` + +**DEPRECATED**: The `exclusive` options is used to indicate if the start/end of +the range should be excluded when testing for inclusion: + +**Note**: You can obtain the same functionality by setting `{ excludeStart: +true, excludeEnd: true }` ``` js range.contains(c) // true diff --git a/declarations/moment-range.js.flow b/declarations/moment-range.js.flow index f2c6d11..ffa2104 100644 --- a/declarations/moment-range.js.flow +++ b/declarations/moment-range.js.flow @@ -27,7 +27,9 @@ declare module 'moment-range' { clone(): DateRange; + // @deprecated contains(other: Date | DateRange | Moment, options?: { exclusive: bool; }): bool; + contains(other: Date | DateRange | Moment, options?: { excludeStart: bool; excludeEnd: bool; }): bool; diff(unit: ?Shorthand, rounded: ?bool): number; diff --git a/lib/moment-range.d.ts b/lib/moment-range.d.ts index 628e003..f984006 100644 --- a/lib/moment-range.d.ts +++ b/lib/moment-range.d.ts @@ -23,7 +23,9 @@ export class DateRange { clone(): DateRange; + // @deprecated contains(other: Date | DateRange | Moment, options?: { exclusive?: boolean; }): boolean; + contains(other: Date | DateRange | Moment, options?: { excludeStart?: boolean; excludeEnd?: boolean; }): boolean; diff(unit?: unitOfTime.Diff, rounded?: boolean): number; diff --git a/lib/moment-range.js b/lib/moment-range.js index bafd3f5..6874ac0 100644 --- a/lib/moment-range.js +++ b/lib/moment-range.js @@ -1,6 +1,7 @@ import moment from 'moment'; import Symbol from 'es6-symbol'; + //----------------------------------------------------------------------------- // Constants //----------------------------------------------------------------------------- @@ -126,19 +127,25 @@ export class DateRange { return new this.constructor(this.start, this.end); } - contains(other, options = { exclusive: false }) { + contains(other, options = { excludeStart: false, excludeEnd: false }) { const start = this.start.valueOf(); const end = this.end.valueOf(); let oStart = other.valueOf(); let oEnd = other.valueOf(); + let excludeStart = options.excludeStart || false; + let excludeEnd = options.excludeEnd || false; + + if (options.hasOwnProperty('exclusive')) { + excludeStart = excludeEnd = options.exclusive; + } if (other instanceof DateRange) { oStart = other.start.valueOf(); oEnd = other.end.valueOf(); } - const startInRange = (start < oStart) || ((start <= oStart) && !options.exclusive); - const endInRange = (end > oEnd) || ((end >= oEnd) && !options.exclusive); + const startInRange = (start < oStart) || ((start <= oStart) && !excludeStart); + const endInRange = (end > oEnd) || ((end >= oEnd) && !excludeEnd); return (startInRange && endInRange); } diff --git a/lib/moment-range_test.js b/lib/moment-range_test.js index 2e7155c..4af7944 100644 --- a/lib/moment-range_test.js +++ b/lib/moment-range_test.js @@ -136,8 +136,8 @@ describe('DateRange', function() { it('should allow initialization with Jan 1 1970', function() { let dr = moment.range(0, 0); - expect(dr.start.year()).to.be(1970); - expect(dr.end.year()).to.be(1970); + expect(dr.start.utc().year()).to.be(1970); + expect(dr.end.utc().year()).to.be(1970); dr = moment.range(m1, false); @@ -713,7 +713,7 @@ describe('DateRange', function() { expect(dr1.contains(dr1)).to.be(true); }); - it('should be exlusive when the exclusive param is set', function() { + it('should be exlusive when the exclusive param is set (DEPRECATED)', function() { const dr1 = moment.range(m1, m2); expect(dr1.contains(dr1, { exclusive: true })).to.be(false); @@ -723,6 +723,24 @@ describe('DateRange', function() { expect(dr1.contains(m2, { exclusive: false })).to.be(true); expect(dr1.contains(m2)).to.be(true); }); + + it('should exclude the start date when `excludeStart` is set to `true`', function() { + const start = moment('2017-12-01'); + const end = moment('2017-12-01'); + const range = moment.range(start, end); + + expect(range.contains(start)).to.be(true); + expect(range.contains(start, { excludeStart: true })).to.be(false); + }); + + it('should exclude the end date when `excludeEnd` is set to `true`', function() { + const start = moment('2017-12-01'); + const end = moment('2017-12-01'); + const range = moment.range(start, end); + + expect(range.contains(end)).to.be(true); + expect(range.contains(end, { excludeEnd: true })).to.be(false); + }); }); describe('#overlaps()', function() { diff --git a/typing-tests/moment-range_test.ts b/typing-tests/moment-range_test.ts index 6c69e04..98c85c0 100644 --- a/typing-tests/moment-range_test.ts +++ b/typing-tests/moment-range_test.ts @@ -62,9 +62,18 @@ const range007 = new DateRange('year'); range007.contains(new Date()); range007.contains(new DateRange('day')); range007.contains(moment()); -range007.contains(new Date(), {exclusive: true}); -range007.contains(new DateRange('day'), {exclusive: true}); -range007.contains(moment(), {exclusive: true}); +range007.contains(new Date(), {excludeStart: true}); +range007.contains(new DateRange('day'), {excludeStart: true}); +range007.contains(moment(), {excludeStart: true}); +range007.contains(new Date(), {excludeEnd: true}); +range007.contains(new DateRange('day'), {excludeEnd: true}); +range007.contains(moment(), {excludeEnd: true}); +range007.contains(new Date(), {excludeStart: true, excludeEnd: true}); +range007.contains(new DateRange('day'), {excludeStart: true, excludeEnd: true}); +range007.contains(moment(), {excludeStart: true, excludeEnd: true}); +range007.contains(new Date(), {exclusive: true}); // DEPRECATED +range007.contains(new DateRange('day'), {exclusive: true}); // DEPRECATED +range007.contains(moment(), {exclusive: true}); // DEPRECATED // Diff const range008 = new DateRange('year'); From 53169045c922fd3de22ba88cb8230488ced61eaa Mon Sep 17 00:00:00 2001 From: TristanJM Date: Mon, 15 Jan 2018 22:39:42 +0000 Subject: [PATCH 08/25] Removed tests for DateRange instance --- lib/moment-range_test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/moment-range_test.js b/lib/moment-range_test.js index 4af7944..8f8dcda 100644 --- a/lib/moment-range_test.js +++ b/lib/moment-range_test.js @@ -813,7 +813,6 @@ describe('DateRange', function() { const d6 = new Date(Date.UTC(2011, 4, 4)); const d7 = new Date(Date.UTC(2011, 6, 6)); const d8 = new Date(Date.UTC(2011, 8, 8)); - const v = Symbol(); it('should work with [---{==]---} overlaps where (a=[], b={})', function() { const dr1 = moment.range(d5, d7); From 9879055ffa9e166f2af313cf5ae90994d546506a Mon Sep 17 00:00:00 2001 From: TristanJM Date: Mon, 15 Jan 2018 22:49:09 +0000 Subject: [PATCH 09/25] Changelog: Fixed instersect not creating daterange in every case --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16b218b..e1f70be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * Changed `prepublish`, `preversion`, `version` scripts to support typescript definitions * Changed CircleCI config to also run typescript tests +### Fixed + +* Fixed `intersect` not creating a new DateRange instance in all cases + ## [3.1.1] ### Fixed * Fixed intersection rules for zero-length ranges on start/end boundaries From 6666dcec59cb0684d61c3f23f2d47bd87e48f698 Mon Sep 17 00:00:00 2001 From: TristanJM Date: Mon, 15 Jan 2018 23:12:54 +0000 Subject: [PATCH 10/25] Simplified examples in docs for contains() --- README.md | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 4686ccf..4c0de73 100644 --- a/README.md +++ b/README.md @@ -233,30 +233,24 @@ Check to see if your range contains a date/moment. By default the start and end dates are included in the search. E.g.: ``` js -const start = moment('2017-12-01'); -const end = moment('2017-12-15'); -const inside = moment('2017-12-08'); -const outside = moment('2017-12-25'); -const range = moment.range(start, out); +const range = moment.range(a, c); -range.contains(start); // true -range.contains(end); // true -range.contains(inside); // true -range.contains(outside); // false +range.contains(a); // true +range.contains(b); // true +range.contains(c); // true +range.contains(d); // false ``` You can also control whether the start or end dates should be excluded from the search with the `excludeStart` and `excludeEnd` options: ``` js -const start = moment('2017-12-01'); -const end = moment('2017-12-15'); -const range = moment.range(start, out); +const range = moment.range(a, c); -range.contains(start); // true -range.contains(start, { excludeStart: true }); // false -range.contains(end); // true -range.contains(end, { excludeEnd: true; }); // false +range.contains(a); // true +range.contains(a, { excludeStart: true }); // false +range.contains(c); // true +range.contains(c, { excludeEnd: true; }); // false ``` **DEPRECATED**: The `exclusive` options is used to indicate if the start/end of @@ -266,9 +260,9 @@ the range should be excluded when testing for inclusion: true, excludeEnd: true }` ``` js -range.contains(c) // true -range.contains(c, { exclusive: false }) // true -range.contains(c, { exclusive: true }) // false +range.contains(c); // true +range.contains(c, { exclusive: false }); // true +range.contains(c, { exclusive: true }); // false ``` #### Within From b052ae9ea67def30c72c6031b3ebc809e12bb7f4 Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Fri, 19 Jan 2018 14:13:56 -0500 Subject: [PATCH 11/25] Deprecate `exclusive` option in methods * Added `excludeEnd` to `by()` method, deprecate `exclusive` * Added `excludeEnd` to `byRange()` method, deprecate `exclusive` * Added `excludeStart` to `reverseBy()` method, deprecate `exclusive` * Added `excludeStart` to `reverseByRange()` method, deprecate `exclusive` * Update type files * Add tests * Add docs --- CHANGELOG.md | 8 +++ README.md | 48 ++++++++++++----- declarations/moment-range.js.flow | 12 ++++- lib/moment-range.d.ts | 12 ++++- lib/moment-range.js | 40 ++++++++++----- lib/moment-range_test.js | 85 ++++++++++++++++++++++--------- typing-tests/moment-range_test.ts | 22 +++++--- 7 files changed, 169 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1f70be..8412773 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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 ### Added @@ -17,6 +21,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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 ### Changed diff --git a/README.md b/README.md index 4c0de73..b5ebe79 100644 --- a/README.md +++ b/README.md @@ -253,7 +253,7 @@ range.contains(c); // true range.contains(c, { excludeEnd: true; }); // false ``` -**DEPRECATED**: The `exclusive` options is used to indicate if the start/end of +**DEPRECATED** in `4.0.0`: The `exclusive` options is used to indicate if the start/end of the range should be excluded when testing for inclusion: **Note**: You can obtain the same functionality by setting `{ excludeStart: @@ -396,14 +396,14 @@ years.map(m => m.format('YYYY')) // ['2010', '2011', '2012', '2013', '2014', '20 ``` Iteration also supports excluding the end value of the range by setting the -`exclusive` option to `true`. +`excludeEnd` option to `true`. ``` js const start = new Date(2012, 2, 1); const end = new Date(2012, 2, 5); const range1 = moment.range(start, end); -const acc = Array.from(range1.by('day', { exclusive: true })); +const acc = Array.from(range1.by('day', { excludeEnd: true })); acc.length == 4 // true ``` @@ -419,11 +419,17 @@ let acc = Array.from(range1.by('day', { step: 2 })); acc.map(m => m.format('DD')) // ['02', '04', '06'] -acc = Array.from(range1.by('day', { exclusive: true, step: 2 })); +acc = Array.from(range1.by('day', { excludeEnd: true, step: 2 })); acc.map(m => m.format('DD')) // ['02', '04'] ``` +**DEPRECATED** in `4.0.0`: The `exclusive` options is used to indicate if the +end of the range should be excluded when testing for inclusion: + +**Note**: You can obtain the same functionality by setting `{ excludeEnd: true }` + + #### byRange ``` js @@ -445,7 +451,7 @@ acc.length == 5 // true Exclude the end value: ``` js -const acc = Array.from(range1.by(range2, { exclusive: true })); +const acc = Array.from(range1.by(range2, { excludeEnd: true })); acc.length == 4 // true ``` @@ -457,11 +463,17 @@ let acc = Array.from(range1.by(range2, { step: 2 })); acc.map(m => m.format('DD')) // ['01', '03', '05'] -acc = Array.from(range1.by(range2, { exlusive, true, step: 2 })); +acc = Array.from(range1.by(range2, { excludeEnd, true, step: 2 })); acc.map(m => m.format('DD')) // ['01', '03'] ``` +**DEPRECATED** in `4.0.0`: The `exclusive` options is used to indicate if the +end of the range should be excluded when testing for inclusion: + +**Note**: You can obtain the same functionality by setting `{ excludeEnd: true }` + + #### reverseBy Iterate over a range in reverse: @@ -472,11 +484,11 @@ const acc = Array.from(range.reverseBy('years')); acc.map(m => m.format('YYYY')) // ['2015', '2014', '2013', '2012'] ``` -Exclude the end value: +Exclude the start value: ``` js const range = moment.range('2012-01-01', '2015-01-01'); -const acc = Array.from(range.reverseBy('years', { exclusive: true })); +const acc = Array.from(range.reverseBy('years', { excludeStart: true })); acc.map(m => m.format('YYYY')) // ['2015', '2014', '2013'] ``` @@ -491,11 +503,17 @@ let acc = Array.from(range1.reverseBy('day', { step: 2 })); acc.map(m => m.format('DD')) // ['06', '04', '02'] -acc = Array.from(range1.reverseBy('day', { exclusive: true, step: 2 })); +acc = Array.from(range1.reverseBy('day', { excludeStart: true, step: 2 })); acc.map(m => m.format('DD')) // ['06', '04'] ``` +**DEPRECATED** in `4.0.0`: The `exclusive` options is used to indicate if the +start of the range should be excluded when testing for inclusion: + +**Note**: You can obtain the same functionality by setting `{ excludeStart: true }` + + #### reverseByRange ``` js @@ -515,10 +533,10 @@ acc.length == 5 // true acc.map(m => m.format('DD')) // ['05', '04', '03', '02', '01'] ``` -Exclude the end value: +Exclude the start value: ``` js -const acc = Array.from(range1.by(range2, { exclusive: true })); +const acc = Array.from(range1.by(range2, { excludeStart: true })); acc.length == 4 // true acc.map(m => m.format('DD')) // ['05', '04', '03', '02'] @@ -531,11 +549,17 @@ let acc = Array.from(range1.reverseByRange(range2, { step: 2 })); acc.map(m => m.format('DD')) // ['05', '03', '01'] -acc = Array.from(range1.reverseByRange(range2, { exlusive, true, step: 2 })); +acc = Array.from(range1.reverseByRange(range2, { excludeStart: true, step: 2 })); acc.map(m => m.format('DD')) // ['05', '03'] ``` +**DEPRECATED** in `4.0.0`: The `exclusive` options is used to indicate if the +start of the range should be excluded when testing for inclusion: + +**Note**: You can obtain the same functionality by setting `{ excludeStart: true }` + + ### Compare Compare range lengths or add them together with simple math: diff --git a/declarations/moment-range.js.flow b/declarations/moment-range.js.flow index ffa2104..b550206 100644 --- a/declarations/moment-range.js.flow +++ b/declarations/moment-range.js.flow @@ -19,17 +19,21 @@ declare module 'moment-range' { add(other: DateRange): ?DateRange; + by(interval: Shorthand, options?: { excludeEnd: bool; step: number; }): Iterable; + // @deprecated 4.0.0 by(interval: Shorthand, options?: { exclusive: bool; step: number; }): Iterable; + byRange(interval: DateRange, options?: { excludeEnd: bool; step: number; }): Iterable; + // @deprecated 4.0.0 byRange(interval: DateRange, options?: { exclusive: bool; step: number; }): Iterable; center(): Moment; clone(): DateRange; - // @deprecated - contains(other: Date | DateRange | Moment, options?: { exclusive: bool; }): bool; contains(other: Date | DateRange | Moment, options?: { excludeStart: bool; excludeEnd: bool; }): bool; + // @deprecated 4.0.0 + contains(other: Date | DateRange | Moment, options?: { exclusive: bool; }): bool; diff(unit: ?Shorthand, rounded: ?bool): number; @@ -43,8 +47,12 @@ declare module 'moment-range' { overlaps(other: DateRange, options: { adjacent: bool; }): bool; + reverseBy(interval: Shorthand, options?: { excludeStart: bool; step: number; }): Iterable; + // @deprecated 4.0.0 reverseBy(interval: Shorthand, options?: { exclusive: bool; step: number; }): Iterable; + reverseByRange(interval: DateRange, options?: { excludeStart: bool; step: number; }): Iterable; + // @deprecated 4.0.0 reverseByRange(interval: DateRange, options?: { exclusive: bool; step: number; }): Iterable; subtract(other: DateRange): Array; diff --git a/lib/moment-range.d.ts b/lib/moment-range.d.ts index f984006..bffc39a 100644 --- a/lib/moment-range.d.ts +++ b/lib/moment-range.d.ts @@ -15,17 +15,21 @@ export class DateRange { add(other: DateRange): DateRange | undefined; + by(interval: unitOfTime.Diff, options?: { excludeEnd?: boolean; step?: number; }): Iterable; + // @deprecated 4.0.0 by(interval: unitOfTime.Diff, options?: { exclusive?: boolean; step?: number; }): Iterable; + byRange(interval: DateRange, options?: { excludeEnd?: boolean; step?: number; }): Iterable; + // @deprecated 4.0.0 byRange(interval: DateRange, options?: { exclusive?: boolean; step?: number; }): Iterable; center(): Moment; clone(): DateRange; - // @deprecated - contains(other: Date | DateRange | Moment, options?: { exclusive?: boolean; }): boolean; contains(other: Date | DateRange | Moment, options?: { excludeStart?: boolean; excludeEnd?: boolean; }): boolean; + // @deprecated 4.0.0 + contains(other: Date | DateRange | Moment, options?: { exclusive?: boolean; }): boolean; diff(unit?: unitOfTime.Diff, rounded?: boolean): number; @@ -39,8 +43,12 @@ export class DateRange { overlaps(other: DateRange, options?: { adjacent?: boolean; }): boolean; + reverseBy(interval: unitOfTime.Diff, options?: { excludeStart?: boolean; step?: number; }): Iterable; + // @deprecated 4.0.0 reverseBy(interval: unitOfTime.Diff, options?: { exclusive?: boolean; step?: number; }): Iterable; + reverseByRange(interval: DateRange, options?: { excludeStart?: boolean; step?: number; }): Iterable; + // @deprecated 4.0.0 reverseByRange(interval: DateRange, options?: { exclusive?: boolean; step?: number; }): Iterable; subtract(other: DateRange): DateRange[]; diff --git a/lib/moment-range.js b/lib/moment-range.js index 6874ac0..c85eb1b 100644 --- a/lib/moment-range.js +++ b/lib/moment-range.js @@ -55,20 +55,24 @@ export class DateRange { return null; } - by(interval, options = { exclusive: false, step: 1 }) { + by(interval, options = { excludeEnd: false, step: 1 }) { const range = this; return { [Symbol.iterator]() { - const exclusive = options.exclusive || false; const step = options.step || 1; const diff = Math.abs(range.start.diff(range.end, interval)) / step; + let excludeEnd = options.excludeEnd || false; let iteration = 0; + if (options.hasOwnProperty('exclusive')) { + excludeEnd = options.exclusive; + } + return { next() { const current = range.start.clone().add((iteration * step), interval); - const done = exclusive + const done = excludeEnd ? !(iteration < diff) : !(iteration <= diff); @@ -84,14 +88,18 @@ export class DateRange { }; } - byRange(interval, options = { exclusive: false, step: 1 }) { + byRange(interval, options = { excludeEnd: false, step: 1 }) { const range = this; const step = options.step || 1; const diff = this.valueOf() / interval.valueOf() / step; - const exclusive = options.exclusive || false; const unit = Math.floor(diff); + let excludeEnd = options.excludeEnd || false; let iteration = 0; + if (options.hasOwnProperty('exclusive')) { + excludeEnd = options.exclusive; + } + return { [Symbol.iterator]() { if (unit === Infinity) { @@ -101,7 +109,7 @@ export class DateRange { return { next() { const current = moment(range.start.valueOf() + (interval.valueOf() * iteration * step)); - const done = ((unit === diff) && exclusive) + const done = ((unit === diff) && excludeEnd) ? !(iteration < unit) : !(iteration <= unit); @@ -223,20 +231,24 @@ export class DateRange { return intersect; } - reverseBy(interval, options = { exclusive: false, step: 1 }) { + reverseBy(interval, options = { excludeStart: false, step: 1 }) { const range = this; return { [Symbol.iterator]() { - const exclusive = options.exclusive || false; const step = options.step || 1; const diff = Math.abs(range.start.diff(range.end, interval)) / step; + let excludeStart = options.excludeStart || false; let iteration = 0; + if (options.hasOwnProperty('exclusive')) { + excludeStart = options.exclusive; + } + return { next() { const current = range.end.clone().subtract((iteration * step), interval); - const done = exclusive + const done = excludeStart ? !(iteration < diff) : !(iteration <= diff); @@ -252,14 +264,18 @@ export class DateRange { }; } - reverseByRange(interval, options = { exclusive: false, step: 1 }) { + reverseByRange(interval, options = { excludeStart: false, step: 1 }) { const range = this; const step = options.step || 1; const diff = this.valueOf() / interval.valueOf() / step; - const exclusive = options.exclusive || false; const unit = Math.floor(diff); + let excludeStart = options.excludeStart || false; let iteration = 0; + if (options.hasOwnProperty('exclusive')) { + excludeStart = options.exclusive; + } + return { [Symbol.iterator]() { if (unit === Infinity) { @@ -269,7 +285,7 @@ export class DateRange { return { next() { const current = moment(range.end.valueOf() - (interval.valueOf() * iteration * step)); - const done = ((unit === diff) && exclusive) + const done = ((unit === diff) && excludeStart) ? !(iteration < unit) : !(iteration <= unit); diff --git a/lib/moment-range_test.js b/lib/moment-range_test.js index 8f8dcda..d615798 100644 --- a/lib/moment-range_test.js +++ b/lib/moment-range_test.js @@ -316,11 +316,11 @@ describe('DateRange', function() { expect(acc).to.eql(['2012-01', '2012-02', '2012-03']); }); - it('should not include .end in the iteration if exclusive is set to true when iterating by string', function() { + it('should not include .end in the iteration if `excludeEnd` is set to `true` when iterating by string', function() { const my1 = moment('2014-04-02T00:00:00.000Z'); const my2 = moment('2014-04-04T00:00:00.000Z'); const dr1 = moment.range(my1, my2); - const options = { exclusive: true }; + const options = { excludeEnd: true }; let acc; acc = Array.from(dr1.by('d', options)).map(m => m.utc().format('YYYY-MM-DD')); @@ -330,11 +330,11 @@ describe('DateRange', function() { expect(acc).to.eql(['2014-04-02', '2014-04-03', '2014-04-04']); }); - it('should be exlusive when using by with minutes as well', function() { + it('should `excludeEnd` when using by with minutes as well', function() { const d1 = moment('2014-01-01T00:00:00.000Z'); const d2 = moment('2014-01-01T00:06:00.000Z'); const dr = moment.range(d1, d2); - const options = { exclusive: true }; + const options = { excludeEnd: true }; let acc; acc = Array.from(dr.by('m')).map(m => m.utc().format('mm')); @@ -353,14 +353,24 @@ describe('DateRange', function() { expect(acc).to.eql(['02', '04', '06', '08']); }); - it('should correctly iterate by a given step when exclusive', function() { + it('should correctly iterate by a given step when `excludeEnd` is true', function() { const my1 = moment('2014-04-02T00:00:00.000Z'); const my2 = moment('2014-04-08T00:00:00.000Z'); const dr1 = moment.range(my1, my2); - const acc = Array.from(dr1.by('days', { exclusive: true, step: 2 })).map(m => m.utc().format('DD')); + const acc = Array.from(dr1.by('days', { excludeEnd: true, step: 2 })).map(m => m.utc().format('DD')); expect(acc).to.eql(['02', '04', '06']); }); + + it('should alias `exclusive` to `excludeEnd`', function() { + const d1 = moment('2014-01-01T00:00:00.000Z'); + const d2 = moment('2014-01-01T00:06:00.000Z'); + const dr = moment.range(d1, d2); + const acc1 = Array.from(dr.by('m', { excludeEnd: true })).map(m => m.utc().format('mm')); + const acc2 = Array.from(dr.by('m', { exclusive: true })).map(m => m.utc().format('mm')); + + expect(acc2).to.eql(acc1); + }); }); describe('#reverseBy', function() { @@ -443,11 +453,11 @@ describe('DateRange', function() { expect(acc).to.eql(['2012-03', '2012-02', '2012-01']); }); - it('should not include .start in the iteration if exclusive is set to true when iterating by string', function() { + it('should not include .start in the iteration if `excludeStart` is set to `true` when iterating by string', function() { const my1 = moment.utc('2014-04-02T00:00:00'); const my2 = moment.utc('2014-04-04T23:59:59'); const dr1 = moment.range(my1, my2); - const options = { exclusive: true }; + const options = { excludeStart: true }; let acc; acc = Array.from(dr1.reverseBy('d', options)).map(m => m.utc().format('YYYY-MM-DD')); @@ -457,11 +467,11 @@ describe('DateRange', function() { expect(acc).to.eql(['2014-04-04', '2014-04-03', '2014-04-02']); }); - it('should be exlusive when using by with minutes as well', function() { + it('should `excludeStart` when using by with minutes as well', function() { const d1 = moment('2014-01-01T00:00:00.000Z'); const d2 = moment('2014-01-01T00:06:00.000Z'); const dr = moment.range(d1, d2); - const options = { exclusive: true }; + const options = { excludeStart: true }; let acc; acc = Array.from(dr.reverseBy('m')).map(m => m.utc().format('mm')); @@ -480,14 +490,23 @@ describe('DateRange', function() { expect(acc).to.eql(['08', '06', '04', '02']); }); - it('should correctly iterate by a given step when exclusive', function() { + it('should correctly iterate by a given step when `excludeStart` is `true`', function() { const my1 = moment('2014-04-02T00:00:00.000Z'); const my2 = moment('2014-04-08T00:00:00.000Z'); const dr1 = moment.range(my1, my2); - const acc = Array.from(dr1.reverseBy('days', { exclusive: true, step: 2 })).map(m => m.utc().format('DD')); + const acc = Array.from(dr1.reverseBy('days', { excludeStart: true, step: 2 })).map(m => m.utc().format('DD')); expect(acc).to.eql(['08', '06', '04']); }); + + it('should alias `exclusive` to `excludeStart`', function() { + const d1 = moment('2014-01-01T00:00:00.000Z'); + const d2 = moment('2014-01-01T00:06:00.000Z'); + const dr = moment.range(d1, d2); + const acc1 = Array.from(dr.reverseBy('m', { excludeStart: true })).map(m => m.utc().format('mm')); + const acc2 = Array.from(dr.reverseBy('m', { exclusive: true })).map(m => m.utc().format('mm')); + expect(acc2).to.eql(acc1); + }); }); describe('#byRange', function() { @@ -546,7 +565,7 @@ describe('DateRange', function() { expect(acc[95].minute()).to.eql(45); }); - it('should not include .end in the iteration if exclusive is set to true when iterating by range', function() { + it('should not include .end in the iteration if `excludeEnd` is set to `true` when iterating by range', function() { const my1 = moment('2014-04-02T00:00:00.000Z'); const my2 = moment('2014-04-04T00:00:00.000Z'); const dr1 = moment.range(my1, my2); @@ -556,10 +575,10 @@ describe('DateRange', function() { acc = Array.from(dr1.byRange(dr2)).map(m => m.utc().format('YYYY-MM-DD')); expect(acc).to.eql(['2014-04-02', '2014-04-03', '2014-04-04']); - acc = Array.from(dr1.byRange(dr2, { exclusive: false })).map(m => m.utc().format('YYYY-MM-DD')); + acc = Array.from(dr1.byRange(dr2, { excludeEnd: false })).map(m => m.utc().format('YYYY-MM-DD')); expect(acc).to.eql(['2014-04-02', '2014-04-03', '2014-04-04']); - acc = Array.from(dr1.byRange(dr2, { exclusive: true })).map(m => m.utc().format('YYYY-MM-DD')); + acc = Array.from(dr1.byRange(dr2, { excludeEnd: true })).map(m => m.utc().format('YYYY-MM-DD')); expect(acc).to.eql(['2014-04-02', '2014-04-03']); }); @@ -574,16 +593,26 @@ describe('DateRange', function() { expect(acc).to.eql(['02', '04', '06']); }); - it('should iterate correctly by a given step when exclusive', function() { + it('should iterate correctly by a given step when `excludeEnd` is `true`', function() { const d1 = new Date(Date.UTC(2012, 2, 2)); const d2 = new Date(Date.UTC(2012, 2, 6)); const dr1 = moment.range(d1, d2); const dr2 = 1000 * 60 * 60 * 24; - const acc = Array.from(dr1.byRange(dr2, { exclusive: true, step: 2 })).map(m => m.utc().format('DD')); + const acc = Array.from(dr1.byRange(dr2, { excludeEnd: true, step: 2 })).map(m => m.utc().format('DD')); expect(acc).to.eql(['02', '04']); }); + + it('should alias `exclusive` to `excludeEnd`', function() { + const my1 = moment('2014-04-02T00:00:00.000Z'); + const my2 = moment('2014-04-04T00:00:00.000Z'); + const dr1 = moment.range(my1, my2); + const dr2 = moment.range(my1, moment('2014-04-03T00:00:00.000Z')); + const acc1 = Array.from(dr1.byRange(dr2, { excludeEnd: true })).map(m => m.utc().format('YYYY-MM-DD')); + const acc2 = Array.from(dr1.byRange(dr2, { exclusive: true })).map(m => m.utc().format('YYYY-MM-DD')); + expect(acc2).to.eql(acc1); + }); }); describe('#reverseByRange', function() { @@ -642,7 +671,7 @@ describe('DateRange', function() { expect(acc[95].minute()).to.eql(15); }); - it('should not include .start in the iteration if exclusive is set to true when iterating by range', function() { + it('should not include .start in the iteration if `excludeStart` is set to `true` when iterating by range', function() { const my1 = moment('2014-04-02T00:00:00.000Z'); const my2 = moment('2014-04-04T00:00:00.000Z'); const dr1 = moment.range(my1, my2); @@ -652,10 +681,10 @@ describe('DateRange', function() { acc = Array.from(dr1.reverseByRange(dr2)).map(m => m.utc().format('YYYY-MM-DD')); expect(acc).to.eql(['2014-04-04', '2014-04-03', '2014-04-02']); - acc = Array.from(dr1.reverseByRange(dr2, { exclusive: false })).map(m => m.utc().format('YYYY-MM-DD')); + acc = Array.from(dr1.reverseByRange(dr2, { excludeStart: false })).map(m => m.utc().format('YYYY-MM-DD')); expect(acc).to.eql(['2014-04-04', '2014-04-03', '2014-04-02']); - acc = Array.from(dr1.reverseByRange(dr2, { exclusive: true })).map(m => m.utc().format('YYYY-MM-DD')); + acc = Array.from(dr1.reverseByRange(dr2, { excludeStart: true })).map(m => m.utc().format('YYYY-MM-DD')); expect(acc).to.eql(['2014-04-04', '2014-04-03']); }); @@ -670,16 +699,26 @@ describe('DateRange', function() { expect(acc).to.eql(['06', '04', '02']); }); - it('should iterate correctly by a given step when exclusive', function() { + it('should iterate correctly by a given step when `excludeStart` is `true`', function() { const d1 = new Date(Date.UTC(2012, 2, 2)); const d2 = new Date(Date.UTC(2012, 2, 6)); const dr1 = moment.range(d1, d2); const dr2 = 1000 * 60 * 60 * 24; - const acc = Array.from(dr1.reverseByRange(dr2, { exclusive: true, step: 2 })).map(m => m.utc().format('DD')); + const acc = Array.from(dr1.reverseByRange(dr2, { excludeStart: true, step: 2 })).map(m => m.utc().format('DD')); expect(acc).to.eql(['06', '04']); }); + + it('should alias `exclusive` to `excludeEnd`', function() { + const my1 = moment('2014-04-02T00:00:00.000Z'); + const my2 = moment('2014-04-04T00:00:00.000Z'); + const dr1 = moment.range(my1, my2); + const dr2 = moment.range(my1, moment('2014-04-03T00:00:00.000Z')); + const acc1 = Array.from(dr1.reverseByRange(dr2, { excludeStart: true })).map(m => m.utc().format('YYYY-MM-DD')); + const acc2 = Array.from(dr1.reverseByRange(dr2, { exclusive: true })).map(m => m.utc().format('YYYY-MM-DD')); + expect(acc2).to.eql(acc1); + }); }); describe('#contains()', function() { @@ -713,7 +752,7 @@ describe('DateRange', function() { expect(dr1.contains(dr1)).to.be(true); }); - it('should be exlusive when the exclusive param is set (DEPRECATED)', function() { + it('should exclude the start and end values when the exclusive param is set (DEPRECATED)', function() { const dr1 = moment.range(m1, m2); expect(dr1.contains(dr1, { exclusive: true })).to.be(false); diff --git a/typing-tests/moment-range_test.ts b/typing-tests/moment-range_test.ts index 98c85c0..701f836 100644 --- a/typing-tests/moment-range_test.ts +++ b/typing-tests/moment-range_test.ts @@ -41,13 +41,17 @@ range002.add(new DateRange('month')); // By const range003 = new DateRange('year'); range003.by('months'); -range003.by('months', {exclusive: true}); +range003.by('months', {excludeEnd: true}); +range003.by('months', {exclusive: true}); // DEPRECATED 4.0.0 range003.by('months', {step: 2}); -range003.by('months', {exclusive: true, step: 2}); +range003.by('months', {excludeEnd: true, step: 2}); +range003.by('months', {exclusive: true, step: 2}); // DEPRECATED 4.0.0 // By Range const range004 = new DateRange('year'); range004.byRange(new DateRange('month')); +range004.byRange(new DateRange('month'), {excludeEnd: true}); +range004.byRange(new DateRange('month'), {exclusive: true}); // DEPRECATED 4.0.0 // Center const range005 = new DateRange('year'); @@ -71,9 +75,9 @@ range007.contains(moment(), {excludeEnd: true}); range007.contains(new Date(), {excludeStart: true, excludeEnd: true}); range007.contains(new DateRange('day'), {excludeStart: true, excludeEnd: true}); range007.contains(moment(), {excludeStart: true, excludeEnd: true}); -range007.contains(new Date(), {exclusive: true}); // DEPRECATED -range007.contains(new DateRange('day'), {exclusive: true}); // DEPRECATED -range007.contains(moment(), {exclusive: true}); // DEPRECATED +range007.contains(new Date(), {exclusive: true}); // DEPRECATED 4.0.0 +range007.contains(new DateRange('day'), {exclusive: true}); // DEPRECATED 4.0.0 +range007.contains(moment(), {exclusive: true}); // DEPRECATED 4.0.0 // Diff const range008 = new DateRange('year'); @@ -107,13 +111,17 @@ range013.overlaps(new DateRange('month'), {adjacent: true}); // Reverse By const range014 = new DateRange('year'); range014.reverseBy('months'); -range014.reverseBy('months', {exclusive: true}); +range014.reverseBy('months', {excludeStart: true}); +range014.reverseBy('months', {exclusive: true}); // DEPRECATED 4.0.0 range014.reverseBy('months', {step: 2}); -range014.reverseBy('months', {exclusive: true, step: 2}); +range014.reverseBy('months', {excludeStart: true, step: 2}); +range014.reverseBy('months', {exclusive: true, step: 2}); // DEPRECATED 4.0.0 // Reverse By Range const range015 = new DateRange('year'); range015.reverseByRange(new DateRange('month')); +range015.reverseByRange(new DateRange('month'), {excludeStart: true}); +range015.reverseByRange(new DateRange('month'), {exclusive: true}); // DEPRECATED 4.0.0 // Subtract const range016 = new DateRange('year'); From 95d1d4a450fa3938d3025e35f1602e770a419e1d Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Thu, 18 Jan 2018 16:40:44 -0500 Subject: [PATCH 12/25] Add README note about supporting older browsers --- CHANGELOG.md | 1 + README.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8412773..ea092db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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 ### Changed diff --git a/README.md b/README.md index b5ebe79..723e510 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Fancy date ranges for [Moment.js][moment]. - [Installation](#installation) - [Node / NPM](#node--npm) - [Browser](#browser) + - [Older browsers and IE11](#older-browsers-and-ie11) - [Examples](#examples) - [Create](#create) - [rangeFromInterval](#rangefrominterval) @@ -92,6 +93,18 @@ Thanks to the fine people at [cdnjs][cdnjs], you can link to moment-range from the [cdnjs servers][cdnjs-moment-range]. +### Older browsers and IE11 + +This library makes use of `Symbol.iterator` to provide the [iteration +protocols] now that there is [broad support] for them, if you need to support +older browsers (specifically IE11) you will need to include a polyfill. Any of +the following should work, depending on your project configuration: + +* [babel runtime transform plugin] +* [babel polyfill] +* https://github.com/medikoo/es6-iterator +* https://github.com/zloirock/core-js + ## Examples @@ -711,10 +724,14 @@ yarn run lint moment-range is [UNLICENSED][unlicense]. [add]: http://momentjs.com/docs/#/manipulating/add/ +[babel runtime transform plugin]: https://babeljs.io/docs/plugins/transform-runtime +[babel polyfill]: https://babeljs.io/docs/usage/polyfill +[broad support]: http://kangax.github.io/compat-table/es6/#test-well-known_symbols_Symbol.iterator,_existence_a_href=_https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator_title=_MDN_documentation_img_src=_../mdn.png_alt=_MDN_(Mozilla_Development_Network)_logo_width=_15_height=_13_/_/a_nbsp; [cdnjs]: https://github.com/cdnjs/cdnjs [cdnjs-moment-range]: https://cdnjs.com/libraries/moment-range [interval]: http://en.wikipedia.org/wiki/ISO_8601#Time_intervals [iterable]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#Syntaxes_expecting_iterables +[iteration protocols]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols [moment]: http://momentjs.com/ [node]: http://nodejs.org/ [unlicense]: http://unlicense.org/ From a4cca0bf6407615dd37f1eaebe783231f46621b7 Mon Sep 17 00:00:00 2001 From: TristanJM Date: Mon, 15 Jan 2018 23:39:29 +0000 Subject: [PATCH 13/25] Deprecating parseZoneRange, changing to rangeFromISOString --- CHANGELOG.md | 2 ++ lib/moment-range.js | 4 +++- lib/moment-range_test.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea092db..9b03352 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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 @@ -26,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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` ### Changed diff --git a/lib/moment-range.js b/lib/moment-range.js index c85eb1b..3e4ddad 100644 --- a/lib/moment-range.js +++ b/lib/moment-range.js @@ -389,13 +389,15 @@ export function extendMoment(moment) { * @param {string} isoTimeInterval the timeInterval to be parsed * @return {DateRange} constructed using moments that will preserve the time zones */ - moment.parseZoneRange = function(isoTimeInterval) { + moment.rangeFromISOString = function(isoTimeInterval) { const momentStrings = isoSplit(isoTimeInterval); const start = moment.parseZone(momentStrings[0]); const end = moment.parseZone(momentStrings[1]); return new DateRange(start, end); }; + moment.parseZoneRange = moment.rangeFromISOString; // DEPRECATED + /** * Alias of static constructor. */ diff --git a/lib/moment-range_test.js b/lib/moment-range_test.js index d615798..a51ab3e 100644 --- a/lib/moment-range_test.js +++ b/lib/moment-range_test.js @@ -112,7 +112,7 @@ describe('DateRange', function() { const start = '2015-01-17T09:50:04+03:00'; const end = '2015-04-17T08:29:55-04:00'; const timeInterval = start + '/' + end; - const range = moment.parseZoneRange(timeInterval); + const range = moment.rangeFromISOString(timeInterval); expect(range.toString()).equal(timeInterval); }); From 3df3cc8e3caa9b10ac73215da7f667aa0ee9e782 Mon Sep 17 00:00:00 2001 From: TristanJM Date: Mon, 15 Jan 2018 23:48:46 +0000 Subject: [PATCH 14/25] Added parseZoneRange deprecation to docs --- CHANGELOG.md | 1 + README.md | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b03352..47da6c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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`. ### Fixed diff --git a/README.md b/README.md index 723e510..ce0f04a 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Fancy date ranges for [Moment.js][moment]. - [Create](#create) - [rangeFromInterval](#rangefrominterval) - [parseZoneRange](#parsezonerange) + - [rangeFromISOString](#rangefromisostring) - [Attributes](#attributes) - [Querying](#querying) - [Adjacent](#adjacent) @@ -180,12 +181,16 @@ When using a negative interval, the date provided will be set as the end of the #### parseZoneRange -Parses an [ISO 8601 time interval][interval] into a date range while +**DEPRECATED**: Replaced by `rangeFromISOString` to follow naming conventions. + +#### rangeFromISOString + +Converts an [ISO 8601 time interval string][interval] into a date range while preserving the time zones using [moment.parseZone][parseZone]. ``` js const interval = '2015-01-17T09:50:00+03:00/2015-04-17T08:29:55-04:00'; -const range = moment.parseZoneRange(interval); +const range = moment.rangeFromISOString(interval); range.toString(); // '2015-01-17T09:50:00+03:00/2015-04-17T08:29:55-04:00' ``` From 8f27c5f89eae60d1568eea8d32a1b9d680439b3c Mon Sep 17 00:00:00 2001 From: TristanJM Date: Tue, 16 Jan 2018 00:05:14 +0000 Subject: [PATCH 15/25] Added deprecations to flow/typescript --- declarations/moment.js.flow | 5 ++++- lib/moment-range.d.ts | 6 ++++-- typing-tests/moment-range_test.ts | 5 +++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/declarations/moment.js.flow b/declarations/moment.js.flow index 594fe53..17b4931 100644 --- a/declarations/moment.js.flow +++ b/declarations/moment.js.flow @@ -241,8 +241,11 @@ declare class moment$Moment { range(start: Date, end: Date): DateRange; range(start: Moment, end: Moment): DateRange; rangeFromInterval(interval: string, count?: number, date?: Date|Moment|string): DateRange; - parseZoneRange(isoTimeInterval: string): DateRange; + rangeFromISOString(isoTimeInterval: string): DateRange; within(range: DateRange): bool; + + // @deprecated + parseZoneRange(isoTimeInterval: string): DateRange; } declare module 'moment' { diff --git a/lib/moment-range.d.ts b/lib/moment-range.d.ts index bffc39a..1291b6f 100644 --- a/lib/moment-range.d.ts +++ b/lib/moment-range.d.ts @@ -61,8 +61,6 @@ export class DateRange { } export interface MomentRangeStaticMethods { - parseZoneRange(isoTimeInterval: string): DateRange; - range(start: Date, end: Date): DateRange; range(start: Moment, end: Moment): DateRange; range(range: [Date, Date]): DateRange; @@ -70,6 +68,10 @@ export interface MomentRangeStaticMethods { range(range: string): DateRange; rangeFromInterval(interval: unitOfTime.Diff, count?: number, date?: Date | Moment): DateRange; + rangeFromISOString(isoTimeInterval: string): DateRange; + + // @deprecated + parseZoneRange(isoTimeInterval: string): DateRange; } export interface MomentRange extends MomentRangeStaticMethods { diff --git a/typing-tests/moment-range_test.ts b/typing-tests/moment-range_test.ts index 701f836..2d39de4 100644 --- a/typing-tests/moment-range_test.ts +++ b/typing-tests/moment-range_test.ts @@ -8,8 +8,6 @@ const moment = extendMoment(M); // Typescript Tests //----------------------------------------------------------------------------- -moment.parseZoneRange('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); - moment.range(new Date(), new Date()); moment.range(moment(), moment()); moment.range([new Date(), new Date()]); @@ -20,6 +18,9 @@ moment.rangeFromInterval('day'); moment.rangeFromInterval('day', 3); moment.rangeFromInterval('day', 3, moment()); +moment.rangeFromISOString('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); +moment.parseZoneRange('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); // DEPRECATED + moment().isRange(moment.range('hour')); moment().within(moment.range('hour')); From 9169647bf4bb5172eb0fd672c4151009955e5358 Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Fri, 19 Jan 2018 18:09:48 -0500 Subject: [PATCH 16/25] Add version number to deprecation string --- README.md | 2 +- lib/moment-range.d.ts | 2 +- lib/moment-range.js | 2 +- typing-tests/moment-range_test.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce0f04a..72ee634 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ When using a negative interval, the date provided will be set as the end of the #### parseZoneRange -**DEPRECATED**: Replaced by `rangeFromISOString` to follow naming conventions. +**DEPRECATED** in `4.0.0`: Replaced by `rangeFromISOString` to follow naming conventions. #### rangeFromISOString diff --git a/lib/moment-range.d.ts b/lib/moment-range.d.ts index 1291b6f..6851490 100644 --- a/lib/moment-range.d.ts +++ b/lib/moment-range.d.ts @@ -70,7 +70,7 @@ export interface MomentRangeStaticMethods { rangeFromInterval(interval: unitOfTime.Diff, count?: number, date?: Date | Moment): DateRange; rangeFromISOString(isoTimeInterval: string): DateRange; - // @deprecated + // @deprecated 4.0.0 parseZoneRange(isoTimeInterval: string): DateRange; } diff --git a/lib/moment-range.js b/lib/moment-range.js index 3e4ddad..718058c 100644 --- a/lib/moment-range.js +++ b/lib/moment-range.js @@ -396,7 +396,7 @@ export function extendMoment(moment) { return new DateRange(start, end); }; - moment.parseZoneRange = moment.rangeFromISOString; // DEPRECATED + moment.parseZoneRange = moment.rangeFromISOString; // DEPRECATED 4.0.0 /** * Alias of static constructor. diff --git a/typing-tests/moment-range_test.ts b/typing-tests/moment-range_test.ts index 2d39de4..d1c0528 100644 --- a/typing-tests/moment-range_test.ts +++ b/typing-tests/moment-range_test.ts @@ -19,7 +19,7 @@ moment.rangeFromInterval('day', 3); moment.rangeFromInterval('day', 3, moment()); moment.rangeFromISOString('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); -moment.parseZoneRange('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); // DEPRECATED +moment.parseZoneRange('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); // DEPRECATED 4.0.0 moment().isRange(moment.range('hour')); From 7bb19a06eb468aa439bdb9f2623313af74f8ad97 Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Mon, 5 Mar 2018 18:21:03 -0500 Subject: [PATCH 17/25] Remove notice from README --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 72ee634..16de75b 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ Fancy date ranges for [Moment.js][moment]. -> Hey there! After 5 months of inactivity, we're reviewing pull requests and issues to bring moment-range up to date. Get in touch with us [in this thread](https://github.com/rotaready/moment-range/issues/177) if you have any feedback. - From 5cf21da67f3b4fac4e71be1d48db2a21227f2ac8 Mon Sep 17 00:00:00 2001 From: Tristan Murfitt Date: Mon, 5 Mar 2018 23:28:17 +0000 Subject: [PATCH 18/25] Added snapTo() method (#220) * Added snapTo() * Added snapTo() tests * Creates new date range instance * Added defs * Added docs for snapTo() * Updated doc ToC * Fixed doc link * Neatened example * Fix snapTo() test, add extra clones on start/end in clone() * Small documentation fix --- CHANGELOG.md | 3 ++- README.md | 28 ++++++++++++++++++++++++++++ declarations/moment-range.js.flow | 2 ++ lib/moment-range.d.ts | 2 ++ lib/moment-range.js | 16 +++++++++++++++- lib/moment-range_test.js | 29 +++++++++++++++++++++++++++++ typing-tests/moment-range_test.ts | 22 +++++++++++++--------- 7 files changed, 91 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47da6c3..38af29e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added -* Added Typescript defitions +* Added Typescript definitions * Added Typescript config and tests * Added `check`, `typescript-test` npm script * Added `excludeStart` and `excludeEnd` to `contains()` method @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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 ### Changed diff --git a/README.md b/README.md index 16de75b..a3d340d 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Fancy date ranges for [Moment.js][moment]. - [Manipulation](#manipulation) - [Add](#add) - [Clone](#clone) + - [SnapTo](#snapto) - [Subtract](#subtract) - [Iteration](#iteration) - [by](#by) @@ -371,6 +372,21 @@ range2.start.add(2, 'days'); range1.start.toDate().getTime() === range2.start.toDate().getTime() // false ``` +#### SnapTo + +Snap the start and end of a range to a given interval. + +``` js +const start = moment('2018-01-25 17:05:33'); +const end = moment('2018-01-28 06:10:00'); + +const range1 = moment.range(start, end); +const range2 = range1.snapTo('day'); // 2018-01-25T00:00:00 -> 2018-01-28T23:59:59 + +range1.diff('days'); // 2 +range2.diff('days'); // 3 +``` + #### Subtract Subtracting one range from another. @@ -440,6 +456,18 @@ acc = Array.from(range1.by('day', { excludeEnd: true, step: 2 })); acc.map(m => m.format('DD')) // ['02', '04'] ``` +You can iterate over the span of a range for a period that is entered but not complete by using the [snapTo()](#snapto) method: + +``` js +const start = moment("2017-01-01T13:30:00"); +const end = moment("2017-01-05T01:45:12"); +const r1 = moment.range(start, end); +const r2 = r1.snapTo('day'); + +Array.from(r1.by('days')).map(m => m.format('DD')); // ['01', '02', '03', '04'] +Array.from(r2.by('days')).map(m => m.format('DD')); // ['01', '02', '03', '04', '05'] +``` + **DEPRECATED** in `4.0.0`: The `exclusive` options is used to indicate if the end of the range should be excluded when testing for inclusion: diff --git a/declarations/moment-range.js.flow b/declarations/moment-range.js.flow index b550206..4a2d703 100644 --- a/declarations/moment-range.js.flow +++ b/declarations/moment-range.js.flow @@ -55,6 +55,8 @@ declare module 'moment-range' { // @deprecated 4.0.0 reverseByRange(interval: DateRange, options?: { exclusive: bool; step: number; }): Iterable; + snapTo(interval: Shorthand): DateRange; + subtract(other: DateRange): Array; toDate(): Array; diff --git a/lib/moment-range.d.ts b/lib/moment-range.d.ts index 6851490..721ccd6 100644 --- a/lib/moment-range.d.ts +++ b/lib/moment-range.d.ts @@ -51,6 +51,8 @@ export class DateRange { // @deprecated 4.0.0 reverseByRange(interval: DateRange, options?: { exclusive?: boolean; step?: number; }): Iterable; + snapTo(interval: unitOfTime.Diff): DateRange; + subtract(other: DateRange): DateRange[]; toDate(): [Date, Date]; diff --git a/lib/moment-range.js b/lib/moment-range.js index 718058c..87b741b 100644 --- a/lib/moment-range.js +++ b/lib/moment-range.js @@ -132,7 +132,7 @@ export class DateRange { } clone() { - return new this.constructor(this.start, this.end); + return new this.constructor(this.start.clone(), this.end.clone()); } contains(other, options = { excludeStart: false, excludeEnd: false }) { @@ -301,6 +301,20 @@ export class DateRange { }; } + snapTo(interval) { + const r = this.clone(); + + // Snap if not open-ended range + if (!r.start.isSame(moment(-8640000000000000))) { + r.start = r.start.startOf(interval); + } + if (!r.end.isSame(moment(8640000000000000))) { + r.end = r.end.endOf(interval); + } + + return r; + } + subtract(other) { const start = this.start.valueOf(); const end = this.end.valueOf(); diff --git a/lib/moment-range_test.js b/lib/moment-range_test.js index a51ab3e..2ffc4e7 100644 --- a/lib/moment-range_test.js +++ b/lib/moment-range_test.js @@ -1103,6 +1103,35 @@ describe('DateRange', function() { }); }); + describe('#snapTo()', function() { + const d1 = moment('2018-02-01T03:00:00'); + const d2 = moment('2018-03-01T13:00:00'); + + it('should snap start and end of range to given interval', function() { + const dr1 = moment.range(d1, d2).snapTo('day'); + + expect(dr1.start.isSame(d1.startOf('day'))).to.be(true); + expect(dr1.end.isSame(d2.endOf('day'))).to.be(true); + }); + + it('should provide valid dates if open-ended range', function() { + const dr2 = moment.range(false, false).snapTo('week'); + + expect(dr2).to.eql(moment.range(false, false)); + expect(moment.isMoment(dr2.start)).to.be(true); + expect(moment.isMoment(dr2.end)).to.be(true); + }); + + it('should create a new date range', function() { + const d1 = moment('2018-02-01T03:00:00'); + const d2 = moment('2018-03-01T13:00:00'); + const dr3 = moment.range(d1, d2); + const dr4 = dr3.snapTo('day'); + + expect(dr3.isSame(dr4)).to.be(false); + }); + }); + describe('#subtract()', function() { const d5 = new Date(Date.UTC(2011, 2, 2)); const d6 = new Date(Date.UTC(2011, 4, 4)); diff --git a/typing-tests/moment-range_test.ts b/typing-tests/moment-range_test.ts index d1c0528..d4d3347 100644 --- a/typing-tests/moment-range_test.ts +++ b/typing-tests/moment-range_test.ts @@ -124,20 +124,24 @@ range015.reverseByRange(new DateRange('month')); range015.reverseByRange(new DateRange('month'), {excludeStart: true}); range015.reverseByRange(new DateRange('month'), {exclusive: true}); // DEPRECATED 4.0.0 -// Subtract +// SnapTo const range016 = new DateRange('year'); -range016.subtract(new DateRange('month')); +range016.snapTo('month'); -// To Date +// Subtract const range017 = new DateRange('year'); -range017.toDate(); +range017.subtract(new DateRange('month')); -// To String +// To Date const range018 = new DateRange('year'); -range018.toString(); -range018 + ''; +range018.toDate(); -// Value Of +// To String const range019 = new DateRange('year'); -range019.valueOf(); +range019.toString(); +range019 + ''; + +// Value Of +const range020 = new DateRange('year'); +range020.valueOf(); // range019 + 1; From 9c0fa1ff3ebf3b044fa7c84009bd116d96a4fd5e Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Mon, 5 Mar 2018 18:50:57 -0500 Subject: [PATCH 19/25] Ignore more stuff in the npm package --- .npmignore | 6 +++ declarations/moment-range.js.flow | 68 ------------------------------- 2 files changed, 6 insertions(+), 68 deletions(-) delete mode 100644 declarations/moment-range.js.flow diff --git a/.npmignore b/.npmignore index e02f723..428c8c7 100644 --- a/.npmignore +++ b/.npmignore @@ -3,3 +3,9 @@ flow-typed/ lib/moment-range_test.js typing-tests/ package-lock.json +karma.conf.js +circle.yml +.flowconfig +.eslintrc +.tern-project +webpack.config.js diff --git a/declarations/moment-range.js.flow b/declarations/moment-range.js.flow deleted file mode 100644 index 4a2d703..0000000 --- a/declarations/moment-range.js.flow +++ /dev/null @@ -1,68 +0,0 @@ -import type Moment from 'moment'; - -declare module 'moment-range' { - declare type Shorthand = 'years' | 'quarters' | 'months' | 'weeks' | 'days' | 'hours' | 'minutes' | 'seconds' | 'milliseconds'; - - declare function extendMoment(moment: Class): Class; - - declare class DateRange { - start: Moment; - end: Moment; - - constructor(start: Date, end: Date): void; - constructor(start: Moment, end: Moment): void; - constructor(range: [Date, Date]): void; - constructor(range: [Moment, Moment]): void; - constructor(range: string): void; - - adjacent(other: DateRange): bool; - - add(other: DateRange): ?DateRange; - - by(interval: Shorthand, options?: { excludeEnd: bool; step: number; }): Iterable; - // @deprecated 4.0.0 - by(interval: Shorthand, options?: { exclusive: bool; step: number; }): Iterable; - - byRange(interval: DateRange, options?: { excludeEnd: bool; step: number; }): Iterable; - // @deprecated 4.0.0 - byRange(interval: DateRange, options?: { exclusive: bool; step: number; }): Iterable; - - center(): Moment; - - clone(): DateRange; - - contains(other: Date | DateRange | Moment, options?: { excludeStart: bool; excludeEnd: bool; }): bool; - // @deprecated 4.0.0 - contains(other: Date | DateRange | Moment, options?: { exclusive: bool; }): bool; - - diff(unit: ?Shorthand, rounded: ?bool): number; - - duration(unit: ?Shorthand, rounded: ?bool): number; - - intersect(other: DateRange): ?DateRange; - - isEqual(other: DateRange): bool; - - isSame(other: DateRange): bool; - - overlaps(other: DateRange, options: { adjacent: bool; }): bool; - - reverseBy(interval: Shorthand, options?: { excludeStart: bool; step: number; }): Iterable; - // @deprecated 4.0.0 - reverseBy(interval: Shorthand, options?: { exclusive: bool; step: number; }): Iterable; - - reverseByRange(interval: DateRange, options?: { excludeStart: bool; step: number; }): Iterable; - // @deprecated 4.0.0 - reverseByRange(interval: DateRange, options?: { exclusive: bool; step: number; }): Iterable; - - snapTo(interval: Shorthand): DateRange; - - subtract(other: DateRange): Array; - - toDate(): Array; - - toString(): string; - - valueOf(): number; - } -}; From ea6a1f6676c6ff986d9be99091125ea710fffd97 Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Tue, 6 Mar 2018 13:19:25 -0500 Subject: [PATCH 20/25] Cleanup Flow typings * Add explicit Flow typings alongside Typescript typings * Changed test file suffix * Changed test file location * Changed package.json script names for type checking * Changed Flow config to actually work * Changed CircleCI config * Fixed Flow declaration to provide correct and stricter typings * Removed `lib/` from package.json files * Removed a bunch of unused Flow types --- .flowconfig | 3 +- .npmignore | 3 +- CHANGELOG.md | 17 + README.md | 1 + circle.yml | 14 +- declarations/moment-range.js.flow | 1 + declarations/moment.js.flow | 6 +- flow-typed/npm/babel-core_vx.x.x.js | 192 -- flow-typed/npm/babel-eslint_vx.x.x.js | 73 - flow-typed/npm/babel-loader_vx.x.x.js | 67 - ...lugin-transform-flow-strip-types_vx.x.x.js | 32 - flow-typed/npm/babel-preset-es2015_vx.x.x.js | 32 - flow-typed/npm/babel-preset-stage-0_vx.x.x.js | 32 - flow-typed/npm/eslint-loader_vx.x.x.js | 33 - flow-typed/npm/eslint_vx.x.x.js | 2146 ----------------- flow-typed/npm/expect.js_vx.x.x.js | 33 - flow-typed/npm/flow-bin_v0.x.x.js | 6 - flow-typed/npm/grunt-text-replace_vx.x.x.js | 67 - .../npm/karma-chrome-launcher_vx.x.x.js | 59 - .../npm/karma-phantomjs-launcher_vx.x.x.js | 59 - .../npm/karma-sourcemap-loader_vx.x.x.js | 33 - flow-typed/npm/karma-webpack_vx.x.x.js | 45 - flow-typed/npm/webpack_vx.x.x.js | 1523 ------------ karma.conf.js | 4 +- lib/moment-range.js.flow | 68 + .../moment-range.test.js} | 6 +- package.json | 17 +- typing-tests/flow/moment-range.test.js | 154 ++ .../moment-range.test.ts} | 0 typing-tests/{ => typescript}/tsconfig.json | 6 +- webpack.config.js | 2 +- yarn.lock | 6 +- 32 files changed, 275 insertions(+), 4465 deletions(-) create mode 120000 declarations/moment-range.js.flow delete mode 100644 flow-typed/npm/babel-core_vx.x.x.js delete mode 100644 flow-typed/npm/babel-eslint_vx.x.x.js delete mode 100644 flow-typed/npm/babel-loader_vx.x.x.js delete mode 100644 flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js delete mode 100644 flow-typed/npm/babel-preset-es2015_vx.x.x.js delete mode 100644 flow-typed/npm/babel-preset-stage-0_vx.x.x.js delete mode 100644 flow-typed/npm/eslint-loader_vx.x.x.js delete mode 100644 flow-typed/npm/eslint_vx.x.x.js delete mode 100644 flow-typed/npm/expect.js_vx.x.x.js delete mode 100644 flow-typed/npm/flow-bin_v0.x.x.js delete mode 100644 flow-typed/npm/grunt-text-replace_vx.x.x.js delete mode 100644 flow-typed/npm/karma-chrome-launcher_vx.x.x.js delete mode 100644 flow-typed/npm/karma-phantomjs-launcher_vx.x.x.js delete mode 100644 flow-typed/npm/karma-sourcemap-loader_vx.x.x.js delete mode 100644 flow-typed/npm/karma-webpack_vx.x.x.js delete mode 100644 flow-typed/npm/webpack_vx.x.x.js create mode 100644 lib/moment-range.js.flow rename lib/{moment-range_test.js => tests/moment-range.test.js} (99%) create mode 100644 typing-tests/flow/moment-range.test.js rename typing-tests/{moment-range_test.ts => typescript/moment-range.test.ts} (100%) rename typing-tests/{ => typescript}/tsconfig.json (78%) diff --git a/.flowconfig b/.flowconfig index 5101143..a441d30 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,12 +1,13 @@ [ignore] [include] -declarations/ [libs] +declarations/ [options] esproposal.class_instance_fields=enable esproposal.class_static_fields=enable suppress_comment=.*\\$FlowFixMe suppress_comment=.*\\$FlowIssue +module.name_mapper='^moment-range$' -> '/lib/moment-range' diff --git a/.npmignore b/.npmignore index 428c8c7..3f00b46 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,7 @@ declarations/ flow-typed/ -lib/moment-range_test.js +lib/tests/* +*.test.js typing-tests/ package-lock.json karma.conf.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 38af29e..0b487f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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 @@ -40,10 +41,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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: + - `flow` → `check:flow` + - `typescript-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 `intersect` not creating a new DateRange instance in all cases +* Fixed Flow declaration to provide correct and stricter typings + +### Removed + +* Removed `lib/` from package.json files +* Removed a bunch of unused Flow types ## [3.1.1] ### Fixed diff --git a/README.md b/README.md index a3d340d..5944e47 100644 --- a/README.md +++ b/README.md @@ -722,6 +722,7 @@ yarn install Do all the things! ``` sh +yarn run check yarn run test yarn run lint ``` diff --git a/circle.yml b/circle.yml index 1220ef3..0ad5146 100644 --- a/circle.yml +++ b/circle.yml @@ -1,11 +1,13 @@ machine: node: - version: 6.1.0 + version: 8.2.0 dependencies: - pre: - - npm install --global flow-bin + override: + - yarn test: + override: + - yarn test pre: - - npm run lint - - npm run flow - - npm run typescript-test + - yarn lint + - yarn check:flow + - yarn check:typescript diff --git a/declarations/moment-range.js.flow b/declarations/moment-range.js.flow new file mode 120000 index 0000000..6d82cb7 --- /dev/null +++ b/declarations/moment-range.js.flow @@ -0,0 +1 @@ +../lib/moment-range.js.flow \ No newline at end of file diff --git a/declarations/moment.js.flow b/declarations/moment.js.flow index 17b4931..040a540 100644 --- a/declarations/moment.js.flow +++ b/declarations/moment.js.flow @@ -235,12 +235,12 @@ declare class moment$Moment { fn: Object; static range(interval: string): DateRange; static range(start: Date, end: Date): DateRange; - static range(start: Moment, end: Moment): DateRange; + static range(start: moment$Moment, end: moment$Moment): DateRange; static isRange(range: any): bool; range(interval: string): DateRange; range(start: Date, end: Date): DateRange; - range(start: Moment, end: Moment): DateRange; - rangeFromInterval(interval: string, count?: number, date?: Date|Moment|string): DateRange; + range(start: moment$Moment, end: moment$Moment): DateRange; + rangeFromInterval(interval: string, count?: number, date?: Date|moment$Moment|string): DateRange; rangeFromISOString(isoTimeInterval: string): DateRange; within(range: DateRange): bool; diff --git a/flow-typed/npm/babel-core_vx.x.x.js b/flow-typed/npm/babel-core_vx.x.x.js deleted file mode 100644 index 627bfe7..0000000 --- a/flow-typed/npm/babel-core_vx.x.x.js +++ /dev/null @@ -1,192 +0,0 @@ -// flow-typed signature: d1ff8647331487e90db4f0320a5cd122 -// flow-typed version: <>/babel-core_v^6.18.2/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-core' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'babel-core' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'babel-core/lib/api/browser' { - declare module.exports: any; -} - -declare module 'babel-core/lib/api/node' { - declare module.exports: any; -} - -declare module 'babel-core/lib/helpers/merge' { - declare module.exports: any; -} - -declare module 'babel-core/lib/helpers/normalize-ast' { - declare module.exports: any; -} - -declare module 'babel-core/lib/helpers/resolve' { - declare module.exports: any; -} - -declare module 'babel-core/lib/store' { - declare module.exports: any; -} - -declare module 'babel-core/lib/tools/build-external-helpers' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/index' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/logger' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/metadata' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/options/build-config-chain' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/options/config' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/options/index' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/options/option-manager' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/options/parsers' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/file/options/removed' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/internal-plugins/block-hoist' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/internal-plugins/shadow-functions' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/pipeline' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/plugin-pass' { - declare module.exports: any; -} - -declare module 'babel-core/lib/transformation/plugin' { - declare module.exports: any; -} - -declare module 'babel-core/lib/util' { - declare module.exports: any; -} - -declare module 'babel-core/register' { - declare module.exports: any; -} - -// Filename aliases -declare module 'babel-core/index' { - declare module.exports: $Exports<'babel-core'>; -} -declare module 'babel-core/index.js' { - declare module.exports: $Exports<'babel-core'>; -} -declare module 'babel-core/lib/api/browser.js' { - declare module.exports: $Exports<'babel-core/lib/api/browser'>; -} -declare module 'babel-core/lib/api/node.js' { - declare module.exports: $Exports<'babel-core/lib/api/node'>; -} -declare module 'babel-core/lib/helpers/merge.js' { - declare module.exports: $Exports<'babel-core/lib/helpers/merge'>; -} -declare module 'babel-core/lib/helpers/normalize-ast.js' { - declare module.exports: $Exports<'babel-core/lib/helpers/normalize-ast'>; -} -declare module 'babel-core/lib/helpers/resolve.js' { - declare module.exports: $Exports<'babel-core/lib/helpers/resolve'>; -} -declare module 'babel-core/lib/store.js' { - declare module.exports: $Exports<'babel-core/lib/store'>; -} -declare module 'babel-core/lib/tools/build-external-helpers.js' { - declare module.exports: $Exports<'babel-core/lib/tools/build-external-helpers'>; -} -declare module 'babel-core/lib/transformation/file/index.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/index'>; -} -declare module 'babel-core/lib/transformation/file/logger.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/logger'>; -} -declare module 'babel-core/lib/transformation/file/metadata.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/metadata'>; -} -declare module 'babel-core/lib/transformation/file/options/build-config-chain.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/options/build-config-chain'>; -} -declare module 'babel-core/lib/transformation/file/options/config.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/options/config'>; -} -declare module 'babel-core/lib/transformation/file/options/index.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/options/index'>; -} -declare module 'babel-core/lib/transformation/file/options/option-manager.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/options/option-manager'>; -} -declare module 'babel-core/lib/transformation/file/options/parsers.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/options/parsers'>; -} -declare module 'babel-core/lib/transformation/file/options/removed.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/file/options/removed'>; -} -declare module 'babel-core/lib/transformation/internal-plugins/block-hoist.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/internal-plugins/block-hoist'>; -} -declare module 'babel-core/lib/transformation/internal-plugins/shadow-functions.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/internal-plugins/shadow-functions'>; -} -declare module 'babel-core/lib/transformation/pipeline.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/pipeline'>; -} -declare module 'babel-core/lib/transformation/plugin-pass.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/plugin-pass'>; -} -declare module 'babel-core/lib/transformation/plugin.js' { - declare module.exports: $Exports<'babel-core/lib/transformation/plugin'>; -} -declare module 'babel-core/lib/util.js' { - declare module.exports: $Exports<'babel-core/lib/util'>; -} -declare module 'babel-core/register.js' { - declare module.exports: $Exports<'babel-core/register'>; -} diff --git a/flow-typed/npm/babel-eslint_vx.x.x.js b/flow-typed/npm/babel-eslint_vx.x.x.js deleted file mode 100644 index c6dce86..0000000 --- a/flow-typed/npm/babel-eslint_vx.x.x.js +++ /dev/null @@ -1,73 +0,0 @@ -// flow-typed signature: 042641e2e9184922bee0dad8cdf6692c -// flow-typed version: <>/babel-eslint_v^7.1.1/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-eslint' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'babel-eslint' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'babel-eslint/babylon-to-espree/attachComments' { - declare module.exports: any; -} - -declare module 'babel-eslint/babylon-to-espree/convertTemplateType' { - declare module.exports: any; -} - -declare module 'babel-eslint/babylon-to-espree/index' { - declare module.exports: any; -} - -declare module 'babel-eslint/babylon-to-espree/toAST' { - declare module.exports: any; -} - -declare module 'babel-eslint/babylon-to-espree/toToken' { - declare module.exports: any; -} - -declare module 'babel-eslint/babylon-to-espree/toTokens' { - declare module.exports: any; -} - -// Filename aliases -declare module 'babel-eslint/babylon-to-espree/attachComments.js' { - declare module.exports: $Exports<'babel-eslint/babylon-to-espree/attachComments'>; -} -declare module 'babel-eslint/babylon-to-espree/convertTemplateType.js' { - declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertTemplateType'>; -} -declare module 'babel-eslint/babylon-to-espree/index.js' { - declare module.exports: $Exports<'babel-eslint/babylon-to-espree/index'>; -} -declare module 'babel-eslint/babylon-to-espree/toAST.js' { - declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toAST'>; -} -declare module 'babel-eslint/babylon-to-espree/toToken.js' { - declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toToken'>; -} -declare module 'babel-eslint/babylon-to-espree/toTokens.js' { - declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toTokens'>; -} -declare module 'babel-eslint/index' { - declare module.exports: $Exports<'babel-eslint'>; -} -declare module 'babel-eslint/index.js' { - declare module.exports: $Exports<'babel-eslint'>; -} diff --git a/flow-typed/npm/babel-loader_vx.x.x.js b/flow-typed/npm/babel-loader_vx.x.x.js deleted file mode 100644 index 72e3b90..0000000 --- a/flow-typed/npm/babel-loader_vx.x.x.js +++ /dev/null @@ -1,67 +0,0 @@ -// flow-typed signature: a1d69ba19b0c9743ca5719f6b7dd1107 -// flow-typed version: <>/babel-loader_v^6.2.8/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-loader' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'babel-loader' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'babel-loader/lib/fs-cache' { - declare module.exports: any; -} - -declare module 'babel-loader/lib/index' { - declare module.exports: any; -} - -declare module 'babel-loader/lib/resolve-rc' { - declare module.exports: any; -} - -declare module 'babel-loader/lib/utils/exists' { - declare module.exports: any; -} - -declare module 'babel-loader/lib/utils/read' { - declare module.exports: any; -} - -declare module 'babel-loader/lib/utils/relative' { - declare module.exports: any; -} - -// Filename aliases -declare module 'babel-loader/lib/fs-cache.js' { - declare module.exports: $Exports<'babel-loader/lib/fs-cache'>; -} -declare module 'babel-loader/lib/index.js' { - declare module.exports: $Exports<'babel-loader/lib/index'>; -} -declare module 'babel-loader/lib/resolve-rc.js' { - declare module.exports: $Exports<'babel-loader/lib/resolve-rc'>; -} -declare module 'babel-loader/lib/utils/exists.js' { - declare module.exports: $Exports<'babel-loader/lib/utils/exists'>; -} -declare module 'babel-loader/lib/utils/read.js' { - declare module.exports: $Exports<'babel-loader/lib/utils/read'>; -} -declare module 'babel-loader/lib/utils/relative.js' { - declare module.exports: $Exports<'babel-loader/lib/utils/relative'>; -} diff --git a/flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js deleted file mode 100644 index d910a48..0000000 --- a/flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js +++ /dev/null @@ -1,32 +0,0 @@ -// flow-typed signature: 855ea31ab2c7db08a247b6cee0c102cd -// flow-typed version: <>/babel-plugin-transform-flow-strip-types_v^6.18.0/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-plugin-transform-flow-strip-types' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'babel-plugin-transform-flow-strip-types' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'babel-plugin-transform-flow-strip-types/lib/index' { - declare module.exports: any; -} - -// Filename aliases -declare module 'babel-plugin-transform-flow-strip-types/lib/index.js' { - declare module.exports: $Exports<'babel-plugin-transform-flow-strip-types/lib/index'>; -} diff --git a/flow-typed/npm/babel-preset-es2015_vx.x.x.js b/flow-typed/npm/babel-preset-es2015_vx.x.x.js deleted file mode 100644 index b9ccd4f..0000000 --- a/flow-typed/npm/babel-preset-es2015_vx.x.x.js +++ /dev/null @@ -1,32 +0,0 @@ -// flow-typed signature: bf7573d40f6e30c6231567a9e265e245 -// flow-typed version: <>/babel-preset-es2015_v^6.18.0/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-preset-es2015' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'babel-preset-es2015' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'babel-preset-es2015/lib/index' { - declare module.exports: any; -} - -// Filename aliases -declare module 'babel-preset-es2015/lib/index.js' { - declare module.exports: $Exports<'babel-preset-es2015/lib/index'>; -} diff --git a/flow-typed/npm/babel-preset-stage-0_vx.x.x.js b/flow-typed/npm/babel-preset-stage-0_vx.x.x.js deleted file mode 100644 index c41fb90..0000000 --- a/flow-typed/npm/babel-preset-stage-0_vx.x.x.js +++ /dev/null @@ -1,32 +0,0 @@ -// flow-typed signature: 68a4a1833ec567bfcc5f4d305267d912 -// flow-typed version: <>/babel-preset-stage-0_v^6.16.0/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'babel-preset-stage-0' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'babel-preset-stage-0' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'babel-preset-stage-0/lib/index' { - declare module.exports: any; -} - -// Filename aliases -declare module 'babel-preset-stage-0/lib/index.js' { - declare module.exports: $Exports<'babel-preset-stage-0/lib/index'>; -} diff --git a/flow-typed/npm/eslint-loader_vx.x.x.js b/flow-typed/npm/eslint-loader_vx.x.x.js deleted file mode 100644 index 645ce29..0000000 --- a/flow-typed/npm/eslint-loader_vx.x.x.js +++ /dev/null @@ -1,33 +0,0 @@ -// flow-typed signature: f7d54913ec532c24745d61f9a9b5b31f -// flow-typed version: <>/eslint-loader_v^1.6.1/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'eslint-loader' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'eslint-loader' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ - - -// Filename aliases -declare module 'eslint-loader/index' { - declare module.exports: $Exports<'eslint-loader'>; -} -declare module 'eslint-loader/index.js' { - declare module.exports: $Exports<'eslint-loader'>; -} diff --git a/flow-typed/npm/eslint_vx.x.x.js b/flow-typed/npm/eslint_vx.x.x.js deleted file mode 100644 index 65c3bf6..0000000 --- a/flow-typed/npm/eslint_vx.x.x.js +++ /dev/null @@ -1,2146 +0,0 @@ -// flow-typed signature: 26725807d6ad4033003c9e8fd0cb9007 -// flow-typed version: <>/eslint_v^3.11.1/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'eslint' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'eslint' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'eslint/bin/eslint' { - declare module.exports: any; -} - -declare module 'eslint/conf/cli-options' { - declare module.exports: any; -} - -declare module 'eslint/conf/environments' { - declare module.exports: any; -} - -declare module 'eslint/conf/eslint-all' { - declare module.exports: any; -} - -declare module 'eslint/lib/api' { - declare module.exports: any; -} - -declare module 'eslint/lib/ast-utils' { - declare module.exports: any; -} - -declare module 'eslint/lib/cli-engine' { - declare module.exports: any; -} - -declare module 'eslint/lib/cli' { - declare module.exports: any; -} - -declare module 'eslint/lib/code-path-analysis/code-path-analyzer' { - declare module.exports: any; -} - -declare module 'eslint/lib/code-path-analysis/code-path-segment' { - declare module.exports: any; -} - -declare module 'eslint/lib/code-path-analysis/code-path-state' { - declare module.exports: any; -} - -declare module 'eslint/lib/code-path-analysis/code-path' { - declare module.exports: any; -} - -declare module 'eslint/lib/code-path-analysis/debug-helpers' { - declare module.exports: any; -} - -declare module 'eslint/lib/code-path-analysis/fork-context' { - declare module.exports: any; -} - -declare module 'eslint/lib/code-path-analysis/id-generator' { - declare module.exports: any; -} - -declare module 'eslint/lib/config' { - declare module.exports: any; -} - -declare module 'eslint/lib/config/autoconfig' { - declare module.exports: any; -} - -declare module 'eslint/lib/config/config-file' { - declare module.exports: any; -} - -declare module 'eslint/lib/config/config-initializer' { - declare module.exports: any; -} - -declare module 'eslint/lib/config/config-ops' { - declare module.exports: any; -} - -declare module 'eslint/lib/config/config-rule' { - declare module.exports: any; -} - -declare module 'eslint/lib/config/config-validator' { - declare module.exports: any; -} - -declare module 'eslint/lib/config/environments' { - declare module.exports: any; -} - -declare module 'eslint/lib/config/plugins' { - declare module.exports: any; -} - -declare module 'eslint/lib/eslint' { - declare module.exports: any; -} - -declare module 'eslint/lib/file-finder' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/checkstyle' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/codeframe' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/compact' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/html' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/jslint-xml' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/json' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/junit' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/stylish' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/table' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/tap' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/unix' { - declare module.exports: any; -} - -declare module 'eslint/lib/formatters/visualstudio' { - declare module.exports: any; -} - -declare module 'eslint/lib/ignored-paths' { - declare module.exports: any; -} - -declare module 'eslint/lib/internal-rules/internal-consistent-docs-description' { - declare module.exports: any; -} - -declare module 'eslint/lib/internal-rules/internal-no-invalid-meta' { - declare module.exports: any; -} - -declare module 'eslint/lib/load-rules' { - declare module.exports: any; -} - -declare module 'eslint/lib/logging' { - declare module.exports: any; -} - -declare module 'eslint/lib/options' { - declare module.exports: any; -} - -declare module 'eslint/lib/rule-context' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/accessor-pairs' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/array-bracket-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/array-callback-return' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/arrow-body-style' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/arrow-parens' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/arrow-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/block-scoped-var' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/block-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/brace-style' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/callback-return' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/camelcase' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/capitalized-comments' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/class-methods-use-this' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/comma-dangle' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/comma-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/comma-style' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/complexity' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/computed-property-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/consistent-return' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/consistent-this' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/constructor-super' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/curly' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/default-case' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/dot-location' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/dot-notation' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/eol-last' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/eqeqeq' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/func-call-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/func-name-matching' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/func-names' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/func-style' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/generator-star-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/global-require' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/guard-for-in' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/handle-callback-err' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/id-blacklist' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/id-length' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/id-match' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/indent' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/init-declarations' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/jsx-quotes' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/key-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/keyword-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/line-comment-position' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/linebreak-style' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/lines-around-comment' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/lines-around-directive' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/max-depth' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/max-len' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/max-lines' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/max-nested-callbacks' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/max-params' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/max-statements-per-line' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/max-statements' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/multiline-ternary' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/new-cap' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/new-parens' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/newline-after-var' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/newline-before-return' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/newline-per-chained-call' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-alert' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-array-constructor' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-bitwise' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-caller' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-case-declarations' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-catch-shadow' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-class-assign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-cond-assign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-confusing-arrow' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-console' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-const-assign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-constant-condition' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-continue' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-control-regex' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-debugger' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-delete-var' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-div-regex' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-dupe-args' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-dupe-class-members' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-dupe-keys' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-duplicate-case' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-duplicate-imports' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-else-return' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-empty-character-class' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-empty-function' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-empty-pattern' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-empty' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-eq-null' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-eval' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-ex-assign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-extend-native' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-extra-bind' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-extra-boolean-cast' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-extra-label' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-extra-parens' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-extra-semi' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-fallthrough' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-floating-decimal' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-func-assign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-global-assign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-implicit-coercion' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-implicit-globals' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-implied-eval' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-inline-comments' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-inner-declarations' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-invalid-regexp' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-invalid-this' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-irregular-whitespace' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-iterator' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-label-var' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-labels' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-lone-blocks' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-lonely-if' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-loop-func' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-magic-numbers' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-mixed-operators' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-mixed-requires' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-mixed-spaces-and-tabs' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-multi-spaces' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-multi-str' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-multiple-empty-lines' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-native-reassign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-negated-condition' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-negated-in-lhs' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-nested-ternary' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-new-func' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-new-object' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-new-require' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-new-symbol' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-new-wrappers' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-new' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-obj-calls' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-octal-escape' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-octal' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-param-reassign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-path-concat' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-plusplus' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-process-env' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-process-exit' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-proto' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-prototype-builtins' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-redeclare' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-regex-spaces' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-restricted-globals' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-restricted-imports' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-restricted-modules' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-restricted-properties' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-restricted-syntax' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-return-assign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-return-await' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-script-url' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-self-assign' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-self-compare' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-sequences' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-shadow-restricted-names' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-shadow' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-spaced-func' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-sparse-arrays' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-sync' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-tabs' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-template-curly-in-string' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-ternary' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-this-before-super' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-throw-literal' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-trailing-spaces' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-undef-init' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-undef' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-undefined' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-underscore-dangle' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unexpected-multiline' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unmodified-loop-condition' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unneeded-ternary' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unreachable' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unsafe-finally' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unsafe-negation' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unused-expressions' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unused-labels' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-unused-vars' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-use-before-define' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-useless-call' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-useless-computed-key' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-useless-concat' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-useless-constructor' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-useless-escape' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-useless-rename' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-useless-return' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-var' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-void' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-warning-comments' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-whitespace-before-property' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/no-with' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/object-curly-newline' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/object-curly-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/object-property-newline' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/object-shorthand' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/one-var-declaration-per-line' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/one-var' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/operator-assignment' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/operator-linebreak' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/padded-blocks' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/prefer-arrow-callback' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/prefer-const' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/prefer-numeric-literals' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/prefer-reflect' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/prefer-rest-params' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/prefer-spread' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/prefer-template' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/quote-props' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/quotes' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/radix' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/require-await' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/require-jsdoc' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/require-yield' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/rest-spread-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/semi-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/semi' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/sort-imports' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/sort-keys' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/sort-vars' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/space-before-blocks' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/space-before-function-paren' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/space-in-parens' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/space-infix-ops' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/space-unary-ops' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/spaced-comment' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/strict' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/symbol-description' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/template-curly-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/unicode-bom' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/use-isnan' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/valid-jsdoc' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/valid-typeof' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/vars-on-top' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/wrap-iife' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/wrap-regex' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/yield-star-spacing' { - declare module.exports: any; -} - -declare module 'eslint/lib/rules/yoda' { - declare module.exports: any; -} - -declare module 'eslint/lib/testers/event-generator-tester' { - declare module.exports: any; -} - -declare module 'eslint/lib/testers/rule-tester' { - declare module.exports: any; -} - -declare module 'eslint/lib/timing' { - declare module.exports: any; -} - -declare module 'eslint/lib/token-store' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/comment-event-generator' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/glob-util' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/glob' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/hash' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/keywords' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/module-resolver' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/node-event-generator' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/npm-util' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/path-util' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/patterns/letters' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/rule-fixer' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/source-code-fixer' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/source-code-util' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/source-code' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/traverser' { - declare module.exports: any; -} - -declare module 'eslint/lib/util/xml-escape' { - declare module.exports: any; -} - -// Filename aliases -declare module 'eslint/bin/eslint.js' { - declare module.exports: $Exports<'eslint/bin/eslint'>; -} -declare module 'eslint/conf/cli-options.js' { - declare module.exports: $Exports<'eslint/conf/cli-options'>; -} -declare module 'eslint/conf/environments.js' { - declare module.exports: $Exports<'eslint/conf/environments'>; -} -declare module 'eslint/conf/eslint-all.js' { - declare module.exports: $Exports<'eslint/conf/eslint-all'>; -} -declare module 'eslint/lib/api.js' { - declare module.exports: $Exports<'eslint/lib/api'>; -} -declare module 'eslint/lib/ast-utils.js' { - declare module.exports: $Exports<'eslint/lib/ast-utils'>; -} -declare module 'eslint/lib/cli-engine.js' { - declare module.exports: $Exports<'eslint/lib/cli-engine'>; -} -declare module 'eslint/lib/cli.js' { - declare module.exports: $Exports<'eslint/lib/cli'>; -} -declare module 'eslint/lib/code-path-analysis/code-path-analyzer.js' { - declare module.exports: $Exports<'eslint/lib/code-path-analysis/code-path-analyzer'>; -} -declare module 'eslint/lib/code-path-analysis/code-path-segment.js' { - declare module.exports: $Exports<'eslint/lib/code-path-analysis/code-path-segment'>; -} -declare module 'eslint/lib/code-path-analysis/code-path-state.js' { - declare module.exports: $Exports<'eslint/lib/code-path-analysis/code-path-state'>; -} -declare module 'eslint/lib/code-path-analysis/code-path.js' { - declare module.exports: $Exports<'eslint/lib/code-path-analysis/code-path'>; -} -declare module 'eslint/lib/code-path-analysis/debug-helpers.js' { - declare module.exports: $Exports<'eslint/lib/code-path-analysis/debug-helpers'>; -} -declare module 'eslint/lib/code-path-analysis/fork-context.js' { - declare module.exports: $Exports<'eslint/lib/code-path-analysis/fork-context'>; -} -declare module 'eslint/lib/code-path-analysis/id-generator.js' { - declare module.exports: $Exports<'eslint/lib/code-path-analysis/id-generator'>; -} -declare module 'eslint/lib/config.js' { - declare module.exports: $Exports<'eslint/lib/config'>; -} -declare module 'eslint/lib/config/autoconfig.js' { - declare module.exports: $Exports<'eslint/lib/config/autoconfig'>; -} -declare module 'eslint/lib/config/config-file.js' { - declare module.exports: $Exports<'eslint/lib/config/config-file'>; -} -declare module 'eslint/lib/config/config-initializer.js' { - declare module.exports: $Exports<'eslint/lib/config/config-initializer'>; -} -declare module 'eslint/lib/config/config-ops.js' { - declare module.exports: $Exports<'eslint/lib/config/config-ops'>; -} -declare module 'eslint/lib/config/config-rule.js' { - declare module.exports: $Exports<'eslint/lib/config/config-rule'>; -} -declare module 'eslint/lib/config/config-validator.js' { - declare module.exports: $Exports<'eslint/lib/config/config-validator'>; -} -declare module 'eslint/lib/config/environments.js' { - declare module.exports: $Exports<'eslint/lib/config/environments'>; -} -declare module 'eslint/lib/config/plugins.js' { - declare module.exports: $Exports<'eslint/lib/config/plugins'>; -} -declare module 'eslint/lib/eslint.js' { - declare module.exports: $Exports<'eslint/lib/eslint'>; -} -declare module 'eslint/lib/file-finder.js' { - declare module.exports: $Exports<'eslint/lib/file-finder'>; -} -declare module 'eslint/lib/formatters/checkstyle.js' { - declare module.exports: $Exports<'eslint/lib/formatters/checkstyle'>; -} -declare module 'eslint/lib/formatters/codeframe.js' { - declare module.exports: $Exports<'eslint/lib/formatters/codeframe'>; -} -declare module 'eslint/lib/formatters/compact.js' { - declare module.exports: $Exports<'eslint/lib/formatters/compact'>; -} -declare module 'eslint/lib/formatters/html.js' { - declare module.exports: $Exports<'eslint/lib/formatters/html'>; -} -declare module 'eslint/lib/formatters/jslint-xml.js' { - declare module.exports: $Exports<'eslint/lib/formatters/jslint-xml'>; -} -declare module 'eslint/lib/formatters/json.js' { - declare module.exports: $Exports<'eslint/lib/formatters/json'>; -} -declare module 'eslint/lib/formatters/junit.js' { - declare module.exports: $Exports<'eslint/lib/formatters/junit'>; -} -declare module 'eslint/lib/formatters/stylish.js' { - declare module.exports: $Exports<'eslint/lib/formatters/stylish'>; -} -declare module 'eslint/lib/formatters/table.js' { - declare module.exports: $Exports<'eslint/lib/formatters/table'>; -} -declare module 'eslint/lib/formatters/tap.js' { - declare module.exports: $Exports<'eslint/lib/formatters/tap'>; -} -declare module 'eslint/lib/formatters/unix.js' { - declare module.exports: $Exports<'eslint/lib/formatters/unix'>; -} -declare module 'eslint/lib/formatters/visualstudio.js' { - declare module.exports: $Exports<'eslint/lib/formatters/visualstudio'>; -} -declare module 'eslint/lib/ignored-paths.js' { - declare module.exports: $Exports<'eslint/lib/ignored-paths'>; -} -declare module 'eslint/lib/internal-rules/internal-consistent-docs-description.js' { - declare module.exports: $Exports<'eslint/lib/internal-rules/internal-consistent-docs-description'>; -} -declare module 'eslint/lib/internal-rules/internal-no-invalid-meta.js' { - declare module.exports: $Exports<'eslint/lib/internal-rules/internal-no-invalid-meta'>; -} -declare module 'eslint/lib/load-rules.js' { - declare module.exports: $Exports<'eslint/lib/load-rules'>; -} -declare module 'eslint/lib/logging.js' { - declare module.exports: $Exports<'eslint/lib/logging'>; -} -declare module 'eslint/lib/options.js' { - declare module.exports: $Exports<'eslint/lib/options'>; -} -declare module 'eslint/lib/rule-context.js' { - declare module.exports: $Exports<'eslint/lib/rule-context'>; -} -declare module 'eslint/lib/rules.js' { - declare module.exports: $Exports<'eslint/lib/rules'>; -} -declare module 'eslint/lib/rules/accessor-pairs.js' { - declare module.exports: $Exports<'eslint/lib/rules/accessor-pairs'>; -} -declare module 'eslint/lib/rules/array-bracket-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/array-bracket-spacing'>; -} -declare module 'eslint/lib/rules/array-callback-return.js' { - declare module.exports: $Exports<'eslint/lib/rules/array-callback-return'>; -} -declare module 'eslint/lib/rules/arrow-body-style.js' { - declare module.exports: $Exports<'eslint/lib/rules/arrow-body-style'>; -} -declare module 'eslint/lib/rules/arrow-parens.js' { - declare module.exports: $Exports<'eslint/lib/rules/arrow-parens'>; -} -declare module 'eslint/lib/rules/arrow-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/arrow-spacing'>; -} -declare module 'eslint/lib/rules/block-scoped-var.js' { - declare module.exports: $Exports<'eslint/lib/rules/block-scoped-var'>; -} -declare module 'eslint/lib/rules/block-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/block-spacing'>; -} -declare module 'eslint/lib/rules/brace-style.js' { - declare module.exports: $Exports<'eslint/lib/rules/brace-style'>; -} -declare module 'eslint/lib/rules/callback-return.js' { - declare module.exports: $Exports<'eslint/lib/rules/callback-return'>; -} -declare module 'eslint/lib/rules/camelcase.js' { - declare module.exports: $Exports<'eslint/lib/rules/camelcase'>; -} -declare module 'eslint/lib/rules/capitalized-comments.js' { - declare module.exports: $Exports<'eslint/lib/rules/capitalized-comments'>; -} -declare module 'eslint/lib/rules/class-methods-use-this.js' { - declare module.exports: $Exports<'eslint/lib/rules/class-methods-use-this'>; -} -declare module 'eslint/lib/rules/comma-dangle.js' { - declare module.exports: $Exports<'eslint/lib/rules/comma-dangle'>; -} -declare module 'eslint/lib/rules/comma-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/comma-spacing'>; -} -declare module 'eslint/lib/rules/comma-style.js' { - declare module.exports: $Exports<'eslint/lib/rules/comma-style'>; -} -declare module 'eslint/lib/rules/complexity.js' { - declare module.exports: $Exports<'eslint/lib/rules/complexity'>; -} -declare module 'eslint/lib/rules/computed-property-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/computed-property-spacing'>; -} -declare module 'eslint/lib/rules/consistent-return.js' { - declare module.exports: $Exports<'eslint/lib/rules/consistent-return'>; -} -declare module 'eslint/lib/rules/consistent-this.js' { - declare module.exports: $Exports<'eslint/lib/rules/consistent-this'>; -} -declare module 'eslint/lib/rules/constructor-super.js' { - declare module.exports: $Exports<'eslint/lib/rules/constructor-super'>; -} -declare module 'eslint/lib/rules/curly.js' { - declare module.exports: $Exports<'eslint/lib/rules/curly'>; -} -declare module 'eslint/lib/rules/default-case.js' { - declare module.exports: $Exports<'eslint/lib/rules/default-case'>; -} -declare module 'eslint/lib/rules/dot-location.js' { - declare module.exports: $Exports<'eslint/lib/rules/dot-location'>; -} -declare module 'eslint/lib/rules/dot-notation.js' { - declare module.exports: $Exports<'eslint/lib/rules/dot-notation'>; -} -declare module 'eslint/lib/rules/eol-last.js' { - declare module.exports: $Exports<'eslint/lib/rules/eol-last'>; -} -declare module 'eslint/lib/rules/eqeqeq.js' { - declare module.exports: $Exports<'eslint/lib/rules/eqeqeq'>; -} -declare module 'eslint/lib/rules/func-call-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/func-call-spacing'>; -} -declare module 'eslint/lib/rules/func-name-matching.js' { - declare module.exports: $Exports<'eslint/lib/rules/func-name-matching'>; -} -declare module 'eslint/lib/rules/func-names.js' { - declare module.exports: $Exports<'eslint/lib/rules/func-names'>; -} -declare module 'eslint/lib/rules/func-style.js' { - declare module.exports: $Exports<'eslint/lib/rules/func-style'>; -} -declare module 'eslint/lib/rules/generator-star-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/generator-star-spacing'>; -} -declare module 'eslint/lib/rules/global-require.js' { - declare module.exports: $Exports<'eslint/lib/rules/global-require'>; -} -declare module 'eslint/lib/rules/guard-for-in.js' { - declare module.exports: $Exports<'eslint/lib/rules/guard-for-in'>; -} -declare module 'eslint/lib/rules/handle-callback-err.js' { - declare module.exports: $Exports<'eslint/lib/rules/handle-callback-err'>; -} -declare module 'eslint/lib/rules/id-blacklist.js' { - declare module.exports: $Exports<'eslint/lib/rules/id-blacklist'>; -} -declare module 'eslint/lib/rules/id-length.js' { - declare module.exports: $Exports<'eslint/lib/rules/id-length'>; -} -declare module 'eslint/lib/rules/id-match.js' { - declare module.exports: $Exports<'eslint/lib/rules/id-match'>; -} -declare module 'eslint/lib/rules/indent.js' { - declare module.exports: $Exports<'eslint/lib/rules/indent'>; -} -declare module 'eslint/lib/rules/init-declarations.js' { - declare module.exports: $Exports<'eslint/lib/rules/init-declarations'>; -} -declare module 'eslint/lib/rules/jsx-quotes.js' { - declare module.exports: $Exports<'eslint/lib/rules/jsx-quotes'>; -} -declare module 'eslint/lib/rules/key-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/key-spacing'>; -} -declare module 'eslint/lib/rules/keyword-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/keyword-spacing'>; -} -declare module 'eslint/lib/rules/line-comment-position.js' { - declare module.exports: $Exports<'eslint/lib/rules/line-comment-position'>; -} -declare module 'eslint/lib/rules/linebreak-style.js' { - declare module.exports: $Exports<'eslint/lib/rules/linebreak-style'>; -} -declare module 'eslint/lib/rules/lines-around-comment.js' { - declare module.exports: $Exports<'eslint/lib/rules/lines-around-comment'>; -} -declare module 'eslint/lib/rules/lines-around-directive.js' { - declare module.exports: $Exports<'eslint/lib/rules/lines-around-directive'>; -} -declare module 'eslint/lib/rules/max-depth.js' { - declare module.exports: $Exports<'eslint/lib/rules/max-depth'>; -} -declare module 'eslint/lib/rules/max-len.js' { - declare module.exports: $Exports<'eslint/lib/rules/max-len'>; -} -declare module 'eslint/lib/rules/max-lines.js' { - declare module.exports: $Exports<'eslint/lib/rules/max-lines'>; -} -declare module 'eslint/lib/rules/max-nested-callbacks.js' { - declare module.exports: $Exports<'eslint/lib/rules/max-nested-callbacks'>; -} -declare module 'eslint/lib/rules/max-params.js' { - declare module.exports: $Exports<'eslint/lib/rules/max-params'>; -} -declare module 'eslint/lib/rules/max-statements-per-line.js' { - declare module.exports: $Exports<'eslint/lib/rules/max-statements-per-line'>; -} -declare module 'eslint/lib/rules/max-statements.js' { - declare module.exports: $Exports<'eslint/lib/rules/max-statements'>; -} -declare module 'eslint/lib/rules/multiline-ternary.js' { - declare module.exports: $Exports<'eslint/lib/rules/multiline-ternary'>; -} -declare module 'eslint/lib/rules/new-cap.js' { - declare module.exports: $Exports<'eslint/lib/rules/new-cap'>; -} -declare module 'eslint/lib/rules/new-parens.js' { - declare module.exports: $Exports<'eslint/lib/rules/new-parens'>; -} -declare module 'eslint/lib/rules/newline-after-var.js' { - declare module.exports: $Exports<'eslint/lib/rules/newline-after-var'>; -} -declare module 'eslint/lib/rules/newline-before-return.js' { - declare module.exports: $Exports<'eslint/lib/rules/newline-before-return'>; -} -declare module 'eslint/lib/rules/newline-per-chained-call.js' { - declare module.exports: $Exports<'eslint/lib/rules/newline-per-chained-call'>; -} -declare module 'eslint/lib/rules/no-alert.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-alert'>; -} -declare module 'eslint/lib/rules/no-array-constructor.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-array-constructor'>; -} -declare module 'eslint/lib/rules/no-bitwise.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-bitwise'>; -} -declare module 'eslint/lib/rules/no-caller.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-caller'>; -} -declare module 'eslint/lib/rules/no-case-declarations.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-case-declarations'>; -} -declare module 'eslint/lib/rules/no-catch-shadow.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-catch-shadow'>; -} -declare module 'eslint/lib/rules/no-class-assign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-class-assign'>; -} -declare module 'eslint/lib/rules/no-cond-assign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-cond-assign'>; -} -declare module 'eslint/lib/rules/no-confusing-arrow.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-confusing-arrow'>; -} -declare module 'eslint/lib/rules/no-console.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-console'>; -} -declare module 'eslint/lib/rules/no-const-assign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-const-assign'>; -} -declare module 'eslint/lib/rules/no-constant-condition.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-constant-condition'>; -} -declare module 'eslint/lib/rules/no-continue.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-continue'>; -} -declare module 'eslint/lib/rules/no-control-regex.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-control-regex'>; -} -declare module 'eslint/lib/rules/no-debugger.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-debugger'>; -} -declare module 'eslint/lib/rules/no-delete-var.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-delete-var'>; -} -declare module 'eslint/lib/rules/no-div-regex.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-div-regex'>; -} -declare module 'eslint/lib/rules/no-dupe-args.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-dupe-args'>; -} -declare module 'eslint/lib/rules/no-dupe-class-members.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-dupe-class-members'>; -} -declare module 'eslint/lib/rules/no-dupe-keys.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-dupe-keys'>; -} -declare module 'eslint/lib/rules/no-duplicate-case.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-duplicate-case'>; -} -declare module 'eslint/lib/rules/no-duplicate-imports.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-duplicate-imports'>; -} -declare module 'eslint/lib/rules/no-else-return.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-else-return'>; -} -declare module 'eslint/lib/rules/no-empty-character-class.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-empty-character-class'>; -} -declare module 'eslint/lib/rules/no-empty-function.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-empty-function'>; -} -declare module 'eslint/lib/rules/no-empty-pattern.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-empty-pattern'>; -} -declare module 'eslint/lib/rules/no-empty.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-empty'>; -} -declare module 'eslint/lib/rules/no-eq-null.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-eq-null'>; -} -declare module 'eslint/lib/rules/no-eval.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-eval'>; -} -declare module 'eslint/lib/rules/no-ex-assign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-ex-assign'>; -} -declare module 'eslint/lib/rules/no-extend-native.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-extend-native'>; -} -declare module 'eslint/lib/rules/no-extra-bind.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-extra-bind'>; -} -declare module 'eslint/lib/rules/no-extra-boolean-cast.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-extra-boolean-cast'>; -} -declare module 'eslint/lib/rules/no-extra-label.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-extra-label'>; -} -declare module 'eslint/lib/rules/no-extra-parens.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-extra-parens'>; -} -declare module 'eslint/lib/rules/no-extra-semi.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-extra-semi'>; -} -declare module 'eslint/lib/rules/no-fallthrough.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-fallthrough'>; -} -declare module 'eslint/lib/rules/no-floating-decimal.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-floating-decimal'>; -} -declare module 'eslint/lib/rules/no-func-assign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-func-assign'>; -} -declare module 'eslint/lib/rules/no-global-assign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-global-assign'>; -} -declare module 'eslint/lib/rules/no-implicit-coercion.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-implicit-coercion'>; -} -declare module 'eslint/lib/rules/no-implicit-globals.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-implicit-globals'>; -} -declare module 'eslint/lib/rules/no-implied-eval.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-implied-eval'>; -} -declare module 'eslint/lib/rules/no-inline-comments.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-inline-comments'>; -} -declare module 'eslint/lib/rules/no-inner-declarations.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-inner-declarations'>; -} -declare module 'eslint/lib/rules/no-invalid-regexp.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-invalid-regexp'>; -} -declare module 'eslint/lib/rules/no-invalid-this.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-invalid-this'>; -} -declare module 'eslint/lib/rules/no-irregular-whitespace.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-irregular-whitespace'>; -} -declare module 'eslint/lib/rules/no-iterator.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-iterator'>; -} -declare module 'eslint/lib/rules/no-label-var.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-label-var'>; -} -declare module 'eslint/lib/rules/no-labels.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-labels'>; -} -declare module 'eslint/lib/rules/no-lone-blocks.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-lone-blocks'>; -} -declare module 'eslint/lib/rules/no-lonely-if.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-lonely-if'>; -} -declare module 'eslint/lib/rules/no-loop-func.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-loop-func'>; -} -declare module 'eslint/lib/rules/no-magic-numbers.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-magic-numbers'>; -} -declare module 'eslint/lib/rules/no-mixed-operators.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-mixed-operators'>; -} -declare module 'eslint/lib/rules/no-mixed-requires.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-mixed-requires'>; -} -declare module 'eslint/lib/rules/no-mixed-spaces-and-tabs.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-mixed-spaces-and-tabs'>; -} -declare module 'eslint/lib/rules/no-multi-spaces.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-multi-spaces'>; -} -declare module 'eslint/lib/rules/no-multi-str.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-multi-str'>; -} -declare module 'eslint/lib/rules/no-multiple-empty-lines.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-multiple-empty-lines'>; -} -declare module 'eslint/lib/rules/no-native-reassign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-native-reassign'>; -} -declare module 'eslint/lib/rules/no-negated-condition.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-negated-condition'>; -} -declare module 'eslint/lib/rules/no-negated-in-lhs.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-negated-in-lhs'>; -} -declare module 'eslint/lib/rules/no-nested-ternary.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-nested-ternary'>; -} -declare module 'eslint/lib/rules/no-new-func.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-new-func'>; -} -declare module 'eslint/lib/rules/no-new-object.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-new-object'>; -} -declare module 'eslint/lib/rules/no-new-require.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-new-require'>; -} -declare module 'eslint/lib/rules/no-new-symbol.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-new-symbol'>; -} -declare module 'eslint/lib/rules/no-new-wrappers.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-new-wrappers'>; -} -declare module 'eslint/lib/rules/no-new.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-new'>; -} -declare module 'eslint/lib/rules/no-obj-calls.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-obj-calls'>; -} -declare module 'eslint/lib/rules/no-octal-escape.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-octal-escape'>; -} -declare module 'eslint/lib/rules/no-octal.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-octal'>; -} -declare module 'eslint/lib/rules/no-param-reassign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-param-reassign'>; -} -declare module 'eslint/lib/rules/no-path-concat.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-path-concat'>; -} -declare module 'eslint/lib/rules/no-plusplus.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-plusplus'>; -} -declare module 'eslint/lib/rules/no-process-env.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-process-env'>; -} -declare module 'eslint/lib/rules/no-process-exit.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-process-exit'>; -} -declare module 'eslint/lib/rules/no-proto.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-proto'>; -} -declare module 'eslint/lib/rules/no-prototype-builtins.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-prototype-builtins'>; -} -declare module 'eslint/lib/rules/no-redeclare.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-redeclare'>; -} -declare module 'eslint/lib/rules/no-regex-spaces.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-regex-spaces'>; -} -declare module 'eslint/lib/rules/no-restricted-globals.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-restricted-globals'>; -} -declare module 'eslint/lib/rules/no-restricted-imports.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-restricted-imports'>; -} -declare module 'eslint/lib/rules/no-restricted-modules.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-restricted-modules'>; -} -declare module 'eslint/lib/rules/no-restricted-properties.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-restricted-properties'>; -} -declare module 'eslint/lib/rules/no-restricted-syntax.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-restricted-syntax'>; -} -declare module 'eslint/lib/rules/no-return-assign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-return-assign'>; -} -declare module 'eslint/lib/rules/no-return-await.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-return-await'>; -} -declare module 'eslint/lib/rules/no-script-url.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-script-url'>; -} -declare module 'eslint/lib/rules/no-self-assign.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-self-assign'>; -} -declare module 'eslint/lib/rules/no-self-compare.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-self-compare'>; -} -declare module 'eslint/lib/rules/no-sequences.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-sequences'>; -} -declare module 'eslint/lib/rules/no-shadow-restricted-names.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-shadow-restricted-names'>; -} -declare module 'eslint/lib/rules/no-shadow.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-shadow'>; -} -declare module 'eslint/lib/rules/no-spaced-func.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-spaced-func'>; -} -declare module 'eslint/lib/rules/no-sparse-arrays.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-sparse-arrays'>; -} -declare module 'eslint/lib/rules/no-sync.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-sync'>; -} -declare module 'eslint/lib/rules/no-tabs.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-tabs'>; -} -declare module 'eslint/lib/rules/no-template-curly-in-string.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-template-curly-in-string'>; -} -declare module 'eslint/lib/rules/no-ternary.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-ternary'>; -} -declare module 'eslint/lib/rules/no-this-before-super.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-this-before-super'>; -} -declare module 'eslint/lib/rules/no-throw-literal.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-throw-literal'>; -} -declare module 'eslint/lib/rules/no-trailing-spaces.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-trailing-spaces'>; -} -declare module 'eslint/lib/rules/no-undef-init.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-undef-init'>; -} -declare module 'eslint/lib/rules/no-undef.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-undef'>; -} -declare module 'eslint/lib/rules/no-undefined.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-undefined'>; -} -declare module 'eslint/lib/rules/no-underscore-dangle.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-underscore-dangle'>; -} -declare module 'eslint/lib/rules/no-unexpected-multiline.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unexpected-multiline'>; -} -declare module 'eslint/lib/rules/no-unmodified-loop-condition.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unmodified-loop-condition'>; -} -declare module 'eslint/lib/rules/no-unneeded-ternary.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unneeded-ternary'>; -} -declare module 'eslint/lib/rules/no-unreachable.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unreachable'>; -} -declare module 'eslint/lib/rules/no-unsafe-finally.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unsafe-finally'>; -} -declare module 'eslint/lib/rules/no-unsafe-negation.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unsafe-negation'>; -} -declare module 'eslint/lib/rules/no-unused-expressions.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unused-expressions'>; -} -declare module 'eslint/lib/rules/no-unused-labels.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unused-labels'>; -} -declare module 'eslint/lib/rules/no-unused-vars.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-unused-vars'>; -} -declare module 'eslint/lib/rules/no-use-before-define.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-use-before-define'>; -} -declare module 'eslint/lib/rules/no-useless-call.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-useless-call'>; -} -declare module 'eslint/lib/rules/no-useless-computed-key.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-useless-computed-key'>; -} -declare module 'eslint/lib/rules/no-useless-concat.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-useless-concat'>; -} -declare module 'eslint/lib/rules/no-useless-constructor.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-useless-constructor'>; -} -declare module 'eslint/lib/rules/no-useless-escape.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-useless-escape'>; -} -declare module 'eslint/lib/rules/no-useless-rename.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-useless-rename'>; -} -declare module 'eslint/lib/rules/no-useless-return.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-useless-return'>; -} -declare module 'eslint/lib/rules/no-var.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-var'>; -} -declare module 'eslint/lib/rules/no-void.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-void'>; -} -declare module 'eslint/lib/rules/no-warning-comments.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-warning-comments'>; -} -declare module 'eslint/lib/rules/no-whitespace-before-property.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-whitespace-before-property'>; -} -declare module 'eslint/lib/rules/no-with.js' { - declare module.exports: $Exports<'eslint/lib/rules/no-with'>; -} -declare module 'eslint/lib/rules/object-curly-newline.js' { - declare module.exports: $Exports<'eslint/lib/rules/object-curly-newline'>; -} -declare module 'eslint/lib/rules/object-curly-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/object-curly-spacing'>; -} -declare module 'eslint/lib/rules/object-property-newline.js' { - declare module.exports: $Exports<'eslint/lib/rules/object-property-newline'>; -} -declare module 'eslint/lib/rules/object-shorthand.js' { - declare module.exports: $Exports<'eslint/lib/rules/object-shorthand'>; -} -declare module 'eslint/lib/rules/one-var-declaration-per-line.js' { - declare module.exports: $Exports<'eslint/lib/rules/one-var-declaration-per-line'>; -} -declare module 'eslint/lib/rules/one-var.js' { - declare module.exports: $Exports<'eslint/lib/rules/one-var'>; -} -declare module 'eslint/lib/rules/operator-assignment.js' { - declare module.exports: $Exports<'eslint/lib/rules/operator-assignment'>; -} -declare module 'eslint/lib/rules/operator-linebreak.js' { - declare module.exports: $Exports<'eslint/lib/rules/operator-linebreak'>; -} -declare module 'eslint/lib/rules/padded-blocks.js' { - declare module.exports: $Exports<'eslint/lib/rules/padded-blocks'>; -} -declare module 'eslint/lib/rules/prefer-arrow-callback.js' { - declare module.exports: $Exports<'eslint/lib/rules/prefer-arrow-callback'>; -} -declare module 'eslint/lib/rules/prefer-const.js' { - declare module.exports: $Exports<'eslint/lib/rules/prefer-const'>; -} -declare module 'eslint/lib/rules/prefer-numeric-literals.js' { - declare module.exports: $Exports<'eslint/lib/rules/prefer-numeric-literals'>; -} -declare module 'eslint/lib/rules/prefer-reflect.js' { - declare module.exports: $Exports<'eslint/lib/rules/prefer-reflect'>; -} -declare module 'eslint/lib/rules/prefer-rest-params.js' { - declare module.exports: $Exports<'eslint/lib/rules/prefer-rest-params'>; -} -declare module 'eslint/lib/rules/prefer-spread.js' { - declare module.exports: $Exports<'eslint/lib/rules/prefer-spread'>; -} -declare module 'eslint/lib/rules/prefer-template.js' { - declare module.exports: $Exports<'eslint/lib/rules/prefer-template'>; -} -declare module 'eslint/lib/rules/quote-props.js' { - declare module.exports: $Exports<'eslint/lib/rules/quote-props'>; -} -declare module 'eslint/lib/rules/quotes.js' { - declare module.exports: $Exports<'eslint/lib/rules/quotes'>; -} -declare module 'eslint/lib/rules/radix.js' { - declare module.exports: $Exports<'eslint/lib/rules/radix'>; -} -declare module 'eslint/lib/rules/require-await.js' { - declare module.exports: $Exports<'eslint/lib/rules/require-await'>; -} -declare module 'eslint/lib/rules/require-jsdoc.js' { - declare module.exports: $Exports<'eslint/lib/rules/require-jsdoc'>; -} -declare module 'eslint/lib/rules/require-yield.js' { - declare module.exports: $Exports<'eslint/lib/rules/require-yield'>; -} -declare module 'eslint/lib/rules/rest-spread-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/rest-spread-spacing'>; -} -declare module 'eslint/lib/rules/semi-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/semi-spacing'>; -} -declare module 'eslint/lib/rules/semi.js' { - declare module.exports: $Exports<'eslint/lib/rules/semi'>; -} -declare module 'eslint/lib/rules/sort-imports.js' { - declare module.exports: $Exports<'eslint/lib/rules/sort-imports'>; -} -declare module 'eslint/lib/rules/sort-keys.js' { - declare module.exports: $Exports<'eslint/lib/rules/sort-keys'>; -} -declare module 'eslint/lib/rules/sort-vars.js' { - declare module.exports: $Exports<'eslint/lib/rules/sort-vars'>; -} -declare module 'eslint/lib/rules/space-before-blocks.js' { - declare module.exports: $Exports<'eslint/lib/rules/space-before-blocks'>; -} -declare module 'eslint/lib/rules/space-before-function-paren.js' { - declare module.exports: $Exports<'eslint/lib/rules/space-before-function-paren'>; -} -declare module 'eslint/lib/rules/space-in-parens.js' { - declare module.exports: $Exports<'eslint/lib/rules/space-in-parens'>; -} -declare module 'eslint/lib/rules/space-infix-ops.js' { - declare module.exports: $Exports<'eslint/lib/rules/space-infix-ops'>; -} -declare module 'eslint/lib/rules/space-unary-ops.js' { - declare module.exports: $Exports<'eslint/lib/rules/space-unary-ops'>; -} -declare module 'eslint/lib/rules/spaced-comment.js' { - declare module.exports: $Exports<'eslint/lib/rules/spaced-comment'>; -} -declare module 'eslint/lib/rules/strict.js' { - declare module.exports: $Exports<'eslint/lib/rules/strict'>; -} -declare module 'eslint/lib/rules/symbol-description.js' { - declare module.exports: $Exports<'eslint/lib/rules/symbol-description'>; -} -declare module 'eslint/lib/rules/template-curly-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/template-curly-spacing'>; -} -declare module 'eslint/lib/rules/unicode-bom.js' { - declare module.exports: $Exports<'eslint/lib/rules/unicode-bom'>; -} -declare module 'eslint/lib/rules/use-isnan.js' { - declare module.exports: $Exports<'eslint/lib/rules/use-isnan'>; -} -declare module 'eslint/lib/rules/valid-jsdoc.js' { - declare module.exports: $Exports<'eslint/lib/rules/valid-jsdoc'>; -} -declare module 'eslint/lib/rules/valid-typeof.js' { - declare module.exports: $Exports<'eslint/lib/rules/valid-typeof'>; -} -declare module 'eslint/lib/rules/vars-on-top.js' { - declare module.exports: $Exports<'eslint/lib/rules/vars-on-top'>; -} -declare module 'eslint/lib/rules/wrap-iife.js' { - declare module.exports: $Exports<'eslint/lib/rules/wrap-iife'>; -} -declare module 'eslint/lib/rules/wrap-regex.js' { - declare module.exports: $Exports<'eslint/lib/rules/wrap-regex'>; -} -declare module 'eslint/lib/rules/yield-star-spacing.js' { - declare module.exports: $Exports<'eslint/lib/rules/yield-star-spacing'>; -} -declare module 'eslint/lib/rules/yoda.js' { - declare module.exports: $Exports<'eslint/lib/rules/yoda'>; -} -declare module 'eslint/lib/testers/event-generator-tester.js' { - declare module.exports: $Exports<'eslint/lib/testers/event-generator-tester'>; -} -declare module 'eslint/lib/testers/rule-tester.js' { - declare module.exports: $Exports<'eslint/lib/testers/rule-tester'>; -} -declare module 'eslint/lib/timing.js' { - declare module.exports: $Exports<'eslint/lib/timing'>; -} -declare module 'eslint/lib/token-store.js' { - declare module.exports: $Exports<'eslint/lib/token-store'>; -} -declare module 'eslint/lib/util/comment-event-generator.js' { - declare module.exports: $Exports<'eslint/lib/util/comment-event-generator'>; -} -declare module 'eslint/lib/util/glob-util.js' { - declare module.exports: $Exports<'eslint/lib/util/glob-util'>; -} -declare module 'eslint/lib/util/glob.js' { - declare module.exports: $Exports<'eslint/lib/util/glob'>; -} -declare module 'eslint/lib/util/hash.js' { - declare module.exports: $Exports<'eslint/lib/util/hash'>; -} -declare module 'eslint/lib/util/keywords.js' { - declare module.exports: $Exports<'eslint/lib/util/keywords'>; -} -declare module 'eslint/lib/util/module-resolver.js' { - declare module.exports: $Exports<'eslint/lib/util/module-resolver'>; -} -declare module 'eslint/lib/util/node-event-generator.js' { - declare module.exports: $Exports<'eslint/lib/util/node-event-generator'>; -} -declare module 'eslint/lib/util/npm-util.js' { - declare module.exports: $Exports<'eslint/lib/util/npm-util'>; -} -declare module 'eslint/lib/util/path-util.js' { - declare module.exports: $Exports<'eslint/lib/util/path-util'>; -} -declare module 'eslint/lib/util/patterns/letters.js' { - declare module.exports: $Exports<'eslint/lib/util/patterns/letters'>; -} -declare module 'eslint/lib/util/rule-fixer.js' { - declare module.exports: $Exports<'eslint/lib/util/rule-fixer'>; -} -declare module 'eslint/lib/util/source-code-fixer.js' { - declare module.exports: $Exports<'eslint/lib/util/source-code-fixer'>; -} -declare module 'eslint/lib/util/source-code-util.js' { - declare module.exports: $Exports<'eslint/lib/util/source-code-util'>; -} -declare module 'eslint/lib/util/source-code.js' { - declare module.exports: $Exports<'eslint/lib/util/source-code'>; -} -declare module 'eslint/lib/util/traverser.js' { - declare module.exports: $Exports<'eslint/lib/util/traverser'>; -} -declare module 'eslint/lib/util/xml-escape.js' { - declare module.exports: $Exports<'eslint/lib/util/xml-escape'>; -} diff --git a/flow-typed/npm/expect.js_vx.x.x.js b/flow-typed/npm/expect.js_vx.x.x.js deleted file mode 100644 index ad80374..0000000 --- a/flow-typed/npm/expect.js_vx.x.x.js +++ /dev/null @@ -1,33 +0,0 @@ -// flow-typed signature: 954e28b6915c334bd78907531624ef6f -// flow-typed version: <>/expect.js_v^0.3.1/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'expect.js' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'expect.js' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ - - -// Filename aliases -declare module 'expect.js/index' { - declare module.exports: $Exports<'expect.js'>; -} -declare module 'expect.js/index.js' { - declare module.exports: $Exports<'expect.js'>; -} diff --git a/flow-typed/npm/flow-bin_v0.x.x.js b/flow-typed/npm/flow-bin_v0.x.x.js deleted file mode 100644 index c538e20..0000000 --- a/flow-typed/npm/flow-bin_v0.x.x.js +++ /dev/null @@ -1,6 +0,0 @@ -// flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 -// flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x - -declare module "flow-bin" { - declare module.exports: string; -} diff --git a/flow-typed/npm/grunt-text-replace_vx.x.x.js b/flow-typed/npm/grunt-text-replace_vx.x.x.js deleted file mode 100644 index 41bf555..0000000 --- a/flow-typed/npm/grunt-text-replace_vx.x.x.js +++ /dev/null @@ -1,67 +0,0 @@ -// flow-typed signature: 28957f4b8a3d6bcddef036c32739b207 -// flow-typed version: <>/grunt-text-replace_v^0.4.0/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'grunt-text-replace' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'grunt-text-replace' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'grunt-text-replace/Gruntfile' { - declare module.exports: any; -} - -declare module 'grunt-text-replace/lib/grunt-text-replace' { - declare module.exports: any; -} - -declare module 'grunt-text-replace/tasks/text-replace' { - declare module.exports: any; -} - -declare module 'grunt-text-replace/test/text-replace-error-tests' { - declare module.exports: any; -} - -declare module 'grunt-text-replace/test/text-replace-functional-tests' { - declare module.exports: any; -} - -declare module 'grunt-text-replace/test/text-replace-unit-tests' { - declare module.exports: any; -} - -// Filename aliases -declare module 'grunt-text-replace/Gruntfile.js' { - declare module.exports: $Exports<'grunt-text-replace/Gruntfile'>; -} -declare module 'grunt-text-replace/lib/grunt-text-replace.js' { - declare module.exports: $Exports<'grunt-text-replace/lib/grunt-text-replace'>; -} -declare module 'grunt-text-replace/tasks/text-replace.js' { - declare module.exports: $Exports<'grunt-text-replace/tasks/text-replace'>; -} -declare module 'grunt-text-replace/test/text-replace-error-tests.js' { - declare module.exports: $Exports<'grunt-text-replace/test/text-replace-error-tests'>; -} -declare module 'grunt-text-replace/test/text-replace-functional-tests.js' { - declare module.exports: $Exports<'grunt-text-replace/test/text-replace-functional-tests'>; -} -declare module 'grunt-text-replace/test/text-replace-unit-tests.js' { - declare module.exports: $Exports<'grunt-text-replace/test/text-replace-unit-tests'>; -} diff --git a/flow-typed/npm/karma-chrome-launcher_vx.x.x.js b/flow-typed/npm/karma-chrome-launcher_vx.x.x.js deleted file mode 100644 index 7963936..0000000 --- a/flow-typed/npm/karma-chrome-launcher_vx.x.x.js +++ /dev/null @@ -1,59 +0,0 @@ -// flow-typed signature: c1d81b8fdc5efacba7d19c146eb709d3 -// flow-typed version: <>/karma-chrome-launcher_v^2.0.0/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'karma-chrome-launcher' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'karma-chrome-launcher' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'karma-chrome-launcher/examples/simple/index.spec' { - declare module.exports: any; -} - -declare module 'karma-chrome-launcher/examples/simple/karma.conf' { - declare module.exports: any; -} - -declare module 'karma-chrome-launcher/gruntfile' { - declare module.exports: any; -} - -declare module 'karma-chrome-launcher/test/jsflags.spec' { - declare module.exports: any; -} - -// Filename aliases -declare module 'karma-chrome-launcher/examples/simple/index.spec.js' { - declare module.exports: $Exports<'karma-chrome-launcher/examples/simple/index.spec'>; -} -declare module 'karma-chrome-launcher/examples/simple/karma.conf.js' { - declare module.exports: $Exports<'karma-chrome-launcher/examples/simple/karma.conf'>; -} -declare module 'karma-chrome-launcher/gruntfile.js' { - declare module.exports: $Exports<'karma-chrome-launcher/gruntfile'>; -} -declare module 'karma-chrome-launcher/index' { - declare module.exports: $Exports<'karma-chrome-launcher'>; -} -declare module 'karma-chrome-launcher/index.js' { - declare module.exports: $Exports<'karma-chrome-launcher'>; -} -declare module 'karma-chrome-launcher/test/jsflags.spec.js' { - declare module.exports: $Exports<'karma-chrome-launcher/test/jsflags.spec'>; -} diff --git a/flow-typed/npm/karma-phantomjs-launcher_vx.x.x.js b/flow-typed/npm/karma-phantomjs-launcher_vx.x.x.js deleted file mode 100644 index f06479d..0000000 --- a/flow-typed/npm/karma-phantomjs-launcher_vx.x.x.js +++ /dev/null @@ -1,59 +0,0 @@ -// flow-typed signature: c8b11ea1c10d1269cd3a6680e1fc722e -// flow-typed version: <>/karma-phantomjs-launcher_v^1.0.2/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'karma-phantomjs-launcher' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'karma-phantomjs-launcher' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'karma-phantomjs-launcher/capture.template' { - declare module.exports: any; -} - -declare module 'karma-phantomjs-launcher/gruntfile' { - declare module.exports: any; -} - -declare module 'karma-phantomjs-launcher/karma.conf' { - declare module.exports: any; -} - -declare module 'karma-phantomjs-launcher/test/add.spec' { - declare module.exports: any; -} - -// Filename aliases -declare module 'karma-phantomjs-launcher/capture.template.js' { - declare module.exports: $Exports<'karma-phantomjs-launcher/capture.template'>; -} -declare module 'karma-phantomjs-launcher/gruntfile.js' { - declare module.exports: $Exports<'karma-phantomjs-launcher/gruntfile'>; -} -declare module 'karma-phantomjs-launcher/index' { - declare module.exports: $Exports<'karma-phantomjs-launcher'>; -} -declare module 'karma-phantomjs-launcher/index.js' { - declare module.exports: $Exports<'karma-phantomjs-launcher'>; -} -declare module 'karma-phantomjs-launcher/karma.conf.js' { - declare module.exports: $Exports<'karma-phantomjs-launcher/karma.conf'>; -} -declare module 'karma-phantomjs-launcher/test/add.spec.js' { - declare module.exports: $Exports<'karma-phantomjs-launcher/test/add.spec'>; -} diff --git a/flow-typed/npm/karma-sourcemap-loader_vx.x.x.js b/flow-typed/npm/karma-sourcemap-loader_vx.x.x.js deleted file mode 100644 index 6137109..0000000 --- a/flow-typed/npm/karma-sourcemap-loader_vx.x.x.js +++ /dev/null @@ -1,33 +0,0 @@ -// flow-typed signature: 5838f95537a53c6ac95d058556cafa46 -// flow-typed version: <>/karma-sourcemap-loader_v^0.3.7/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'karma-sourcemap-loader' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'karma-sourcemap-loader' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ - - -// Filename aliases -declare module 'karma-sourcemap-loader/index' { - declare module.exports: $Exports<'karma-sourcemap-loader'>; -} -declare module 'karma-sourcemap-loader/index.js' { - declare module.exports: $Exports<'karma-sourcemap-loader'>; -} diff --git a/flow-typed/npm/karma-webpack_vx.x.x.js b/flow-typed/npm/karma-webpack_vx.x.x.js deleted file mode 100644 index c298ff8..0000000 --- a/flow-typed/npm/karma-webpack_vx.x.x.js +++ /dev/null @@ -1,45 +0,0 @@ -// flow-typed signature: e7224b0d577cecebef8c5890968e1773 -// flow-typed version: <>/karma-webpack_v^1.8.0/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'karma-webpack' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'karma-webpack' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'karma-webpack/lib/karma-webpack' { - declare module.exports: any; -} - -declare module 'karma-webpack/lib/mocha-env-loader' { - declare module.exports: any; -} - -// Filename aliases -declare module 'karma-webpack/index' { - declare module.exports: $Exports<'karma-webpack'>; -} -declare module 'karma-webpack/index.js' { - declare module.exports: $Exports<'karma-webpack'>; -} -declare module 'karma-webpack/lib/karma-webpack.js' { - declare module.exports: $Exports<'karma-webpack/lib/karma-webpack'>; -} -declare module 'karma-webpack/lib/mocha-env-loader.js' { - declare module.exports: $Exports<'karma-webpack/lib/mocha-env-loader'>; -} diff --git a/flow-typed/npm/webpack_vx.x.x.js b/flow-typed/npm/webpack_vx.x.x.js deleted file mode 100644 index 5d6af6f..0000000 --- a/flow-typed/npm/webpack_vx.x.x.js +++ /dev/null @@ -1,1523 +0,0 @@ -// flow-typed signature: 3ef95588441ce565bf8cf9a72e0ac17d -// flow-typed version: <>/webpack_v^1.13.3/flow_v0.36.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'webpack' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'webpack' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'webpack/bin/config-optimist' { - declare module.exports: any; -} - -declare module 'webpack/bin/convert-argv' { - declare module.exports: any; -} - -declare module 'webpack/bin/webpack' { - declare module.exports: any; -} - -declare module 'webpack/buildin/amd-define' { - declare module.exports: any; -} - -declare module 'webpack/buildin/amd-options' { - declare module.exports: any; -} - -declare module 'webpack/buildin/module' { - declare module.exports: any; -} - -declare module 'webpack/buildin/return-require' { - declare module.exports: any; -} - -declare module 'webpack/hot/dev-server' { - declare module.exports: any; -} - -declare module 'webpack/hot/log-apply-result' { - declare module.exports: any; -} - -declare module 'webpack/hot/only-dev-server' { - declare module.exports: any; -} - -declare module 'webpack/hot/poll' { - declare module.exports: any; -} - -declare module 'webpack/hot/signal' { - declare module.exports: any; -} - -declare module 'webpack/lib/AbstractPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/AmdMainTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/APIPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/ArrayMap' { - declare module.exports: any; -} - -declare module 'webpack/lib/AsyncDependenciesBlock' { - declare module.exports: any; -} - -declare module 'webpack/lib/AutomaticPrefetchPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/BannerPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/BasicEvaluatedExpression' { - declare module.exports: any; -} - -declare module 'webpack/lib/CachePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/CaseSensitiveModulesWarning' { - declare module.exports: any; -} - -declare module 'webpack/lib/Chunk' { - declare module.exports: any; -} - -declare module 'webpack/lib/ChunkRenderError' { - declare module.exports: any; -} - -declare module 'webpack/lib/ChunkTemplate' { - declare module.exports: any; -} - -declare module 'webpack/lib/CompatibilityPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/Compilation' { - declare module.exports: any; -} - -declare module 'webpack/lib/Compiler' { - declare module.exports: any; -} - -declare module 'webpack/lib/ConcatSource' { - declare module.exports: any; -} - -declare module 'webpack/lib/ConstPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/ContextModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/ContextModuleFactory' { - declare module.exports: any; -} - -declare module 'webpack/lib/ContextReplacementPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/CriticalDependenciesWarning' { - declare module.exports: any; -} - -declare module 'webpack/lib/DefinePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/DelegatedModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/DelegatedModuleFactoryPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/DelegatedPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDDefineDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDDefineDependencyParserPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDRequireArrayDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDRequireContextDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDRequireDependenciesBlock' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDRequireDependenciesBlockParserPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDRequireDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/AMDRequireItemDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/CommonJsPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/CommonJsRequireContextDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/CommonJsRequireDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/CommonJsRequireDependencyParserPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ConstDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ContextDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ContextDependencyHelpers' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ContextDependencyTemplateAsId' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ContextDependencyTemplateAsRequireCall' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ContextElementDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/DelegatedSourceDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/DepBlockHelpers' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/DllEntryDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/getFunctionExpression' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LabeledExportsDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LabeledModuleDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LabeledModuleDependencyParserPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LabeledModulesPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LoaderDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LoaderPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LocalModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LocalModuleDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/LocalModulesHelpers' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ModuleDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ModuleDependencyTemplateAsId' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ModuleDependencyTemplateAsRequireId' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ModuleHotAcceptDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/ModuleHotDeclineDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/MultiEntryDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/NullDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/NullDependencyTemplate' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/PrefetchDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireContextDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireContextDependencyParserPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireContextPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireEnsureDependenciesBlock' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireEnsureDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireEnsureItemDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireEnsurePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireHeaderDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireIncludeDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireIncludeDependencyParserPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireIncludePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireResolveContextDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireResolveDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireResolveDependencyParserPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/RequireResolveHeaderDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/SingleEntryDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/TemplateArgumentDependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/dependencies/WebpackMissingModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/DependenciesBlock' { - declare module.exports: any; -} - -declare module 'webpack/lib/DependenciesBlockVariable' { - declare module.exports: any; -} - -declare module 'webpack/lib/Dependency' { - declare module.exports: any; -} - -declare module 'webpack/lib/DllEntryPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/DllModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/DllModuleFactory' { - declare module.exports: any; -} - -declare module 'webpack/lib/DllPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/DllReferencePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/EntryModuleNotFoundError' { - declare module.exports: any; -} - -declare module 'webpack/lib/EntryOptionPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/EnvironmentPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/EvalDevToolModulePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/EvalDevToolModuleTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/EvalSourceMapDevToolModuleTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/EvalSourceMapDevToolPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/ExtendedAPIPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/ExternalModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/ExternalModuleFactoryPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/ExternalsPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/FunctionModulePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/FunctionModuleTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/HotModuleReplacement.runtime' { - declare module.exports: any; -} - -declare module 'webpack/lib/HotModuleReplacementPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/HotUpdateChunkTemplate' { - declare module.exports: any; -} - -declare module 'webpack/lib/IgnorePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/JsonpChunkTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/JsonpExportMainTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/JsonpHotUpdateChunkTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/JsonpMainTemplate.runtime' { - declare module.exports: any; -} - -declare module 'webpack/lib/JsonpMainTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/JsonpTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/LibManifestPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/LibraryTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/LoaderTargetPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/MainTemplate' { - declare module.exports: any; -} - -declare module 'webpack/lib/MemoryOutputFileSystem' { - declare module.exports: any; -} - -declare module 'webpack/lib/Module' { - declare module.exports: any; -} - -declare module 'webpack/lib/ModuleFilenameHelpers' { - declare module.exports: any; -} - -declare module 'webpack/lib/ModuleNotFoundError' { - declare module.exports: any; -} - -declare module 'webpack/lib/ModuleParseError' { - declare module.exports: any; -} - -declare module 'webpack/lib/ModuleParserHelpers' { - declare module.exports: any; -} - -declare module 'webpack/lib/ModuleReason' { - declare module.exports: any; -} - -declare module 'webpack/lib/ModuleTemplate' { - declare module.exports: any; -} - -declare module 'webpack/lib/MovedToPluginWarningPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/MultiCompiler' { - declare module.exports: any; -} - -declare module 'webpack/lib/MultiEntryPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/MultiModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/MultiModuleFactory' { - declare module.exports: any; -} - -declare module 'webpack/lib/NamedModulesPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/NewWatchingPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeChunkTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeEnvironmentPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeHotUpdateChunkTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeMainTemplate.runtime' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeMainTemplateAsync.runtime' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeMainTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeOutputFileSystem' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeSourcePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeTargetPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/NodeWatchFileSystem' { - declare module.exports: any; -} - -declare module 'webpack/lib/node/OldNodeWatchFileSystem' { - declare module.exports: any; -} - -declare module 'webpack/lib/NodeStuffPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/NoErrorsPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/NormalModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/NormalModuleFactory' { - declare module.exports: any; -} - -declare module 'webpack/lib/NormalModuleReplacementPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/NullFactory' { - declare module.exports: any; -} - -declare module 'webpack/lib/OldWatchingPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/AggressiveMergingPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/CommonsChunkPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/DedupePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/FlagIncludedChunksPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/LimitChunkCountPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/MergeDuplicateChunksPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/MinChunkSizePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/OccurenceOrderPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/OccurrenceOrderPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/RemoveEmptyChunksPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/RemoveParentModulesPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/optimize/UglifyJsPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/OptionsApply' { - declare module.exports: any; -} - -declare module 'webpack/lib/OriginalSource' { - declare module.exports: any; -} - -declare module 'webpack/lib/Parser' { - declare module.exports: any; -} - -declare module 'webpack/lib/PrefetchPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/ProgressPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/ProvidePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/RawModule' { - declare module.exports: any; -} - -declare module 'webpack/lib/RawSource' { - declare module.exports: any; -} - -declare module 'webpack/lib/RecordIdsPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/removeAndDo' { - declare module.exports: any; -} - -declare module 'webpack/lib/RequestShortener' { - declare module.exports: any; -} - -declare module 'webpack/lib/RequireJsStuffPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/ResolverPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/SetVarMainTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/SingleEntryPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/Source' { - declare module.exports: any; -} - -declare module 'webpack/lib/SourceMapDevToolModuleOptionsPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/SourceMapDevToolPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/SourceMapSource' { - declare module.exports: any; -} - -declare module 'webpack/lib/Stats' { - declare module.exports: any; -} - -declare module 'webpack/lib/Template' { - declare module.exports: any; -} - -declare module 'webpack/lib/TemplatedPathPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/UmdMainTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/UnsupportedFeatureWarning' { - declare module.exports: any; -} - -declare module 'webpack/lib/WarnCaseSensitiveModulesPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/WatchIgnorePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/web/WebEnvironmentPlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/webpack' { - declare module.exports: any; -} - -declare module 'webpack/lib/webpack.web' { - declare module.exports: any; -} - -declare module 'webpack/lib/WebpackOptionsApply' { - declare module.exports: any; -} - -declare module 'webpack/lib/WebpackOptionsDefaulter' { - declare module.exports: any; -} - -declare module 'webpack/lib/webworker/WebWorkerChunkTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/webworker/WebWorkerMainTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/lib/webworker/WebWorkerTemplatePlugin' { - declare module.exports: any; -} - -declare module 'webpack/web_modules/node-libs-browser' { - declare module.exports: any; -} - -// Filename aliases -declare module 'webpack/bin/config-optimist.js' { - declare module.exports: $Exports<'webpack/bin/config-optimist'>; -} -declare module 'webpack/bin/convert-argv.js' { - declare module.exports: $Exports<'webpack/bin/convert-argv'>; -} -declare module 'webpack/bin/webpack.js' { - declare module.exports: $Exports<'webpack/bin/webpack'>; -} -declare module 'webpack/buildin/amd-define.js' { - declare module.exports: $Exports<'webpack/buildin/amd-define'>; -} -declare module 'webpack/buildin/amd-options.js' { - declare module.exports: $Exports<'webpack/buildin/amd-options'>; -} -declare module 'webpack/buildin/module.js' { - declare module.exports: $Exports<'webpack/buildin/module'>; -} -declare module 'webpack/buildin/return-require.js' { - declare module.exports: $Exports<'webpack/buildin/return-require'>; -} -declare module 'webpack/hot/dev-server.js' { - declare module.exports: $Exports<'webpack/hot/dev-server'>; -} -declare module 'webpack/hot/log-apply-result.js' { - declare module.exports: $Exports<'webpack/hot/log-apply-result'>; -} -declare module 'webpack/hot/only-dev-server.js' { - declare module.exports: $Exports<'webpack/hot/only-dev-server'>; -} -declare module 'webpack/hot/poll.js' { - declare module.exports: $Exports<'webpack/hot/poll'>; -} -declare module 'webpack/hot/signal.js' { - declare module.exports: $Exports<'webpack/hot/signal'>; -} -declare module 'webpack/lib/AbstractPlugin.js' { - declare module.exports: $Exports<'webpack/lib/AbstractPlugin'>; -} -declare module 'webpack/lib/AmdMainTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/AmdMainTemplatePlugin'>; -} -declare module 'webpack/lib/APIPlugin.js' { - declare module.exports: $Exports<'webpack/lib/APIPlugin'>; -} -declare module 'webpack/lib/ArrayMap.js' { - declare module.exports: $Exports<'webpack/lib/ArrayMap'>; -} -declare module 'webpack/lib/AsyncDependenciesBlock.js' { - declare module.exports: $Exports<'webpack/lib/AsyncDependenciesBlock'>; -} -declare module 'webpack/lib/AutomaticPrefetchPlugin.js' { - declare module.exports: $Exports<'webpack/lib/AutomaticPrefetchPlugin'>; -} -declare module 'webpack/lib/BannerPlugin.js' { - declare module.exports: $Exports<'webpack/lib/BannerPlugin'>; -} -declare module 'webpack/lib/BasicEvaluatedExpression.js' { - declare module.exports: $Exports<'webpack/lib/BasicEvaluatedExpression'>; -} -declare module 'webpack/lib/CachePlugin.js' { - declare module.exports: $Exports<'webpack/lib/CachePlugin'>; -} -declare module 'webpack/lib/CaseSensitiveModulesWarning.js' { - declare module.exports: $Exports<'webpack/lib/CaseSensitiveModulesWarning'>; -} -declare module 'webpack/lib/Chunk.js' { - declare module.exports: $Exports<'webpack/lib/Chunk'>; -} -declare module 'webpack/lib/ChunkRenderError.js' { - declare module.exports: $Exports<'webpack/lib/ChunkRenderError'>; -} -declare module 'webpack/lib/ChunkTemplate.js' { - declare module.exports: $Exports<'webpack/lib/ChunkTemplate'>; -} -declare module 'webpack/lib/CompatibilityPlugin.js' { - declare module.exports: $Exports<'webpack/lib/CompatibilityPlugin'>; -} -declare module 'webpack/lib/Compilation.js' { - declare module.exports: $Exports<'webpack/lib/Compilation'>; -} -declare module 'webpack/lib/Compiler.js' { - declare module.exports: $Exports<'webpack/lib/Compiler'>; -} -declare module 'webpack/lib/ConcatSource.js' { - declare module.exports: $Exports<'webpack/lib/ConcatSource'>; -} -declare module 'webpack/lib/ConstPlugin.js' { - declare module.exports: $Exports<'webpack/lib/ConstPlugin'>; -} -declare module 'webpack/lib/ContextModule.js' { - declare module.exports: $Exports<'webpack/lib/ContextModule'>; -} -declare module 'webpack/lib/ContextModuleFactory.js' { - declare module.exports: $Exports<'webpack/lib/ContextModuleFactory'>; -} -declare module 'webpack/lib/ContextReplacementPlugin.js' { - declare module.exports: $Exports<'webpack/lib/ContextReplacementPlugin'>; -} -declare module 'webpack/lib/CriticalDependenciesWarning.js' { - declare module.exports: $Exports<'webpack/lib/CriticalDependenciesWarning'>; -} -declare module 'webpack/lib/DefinePlugin.js' { - declare module.exports: $Exports<'webpack/lib/DefinePlugin'>; -} -declare module 'webpack/lib/DelegatedModule.js' { - declare module.exports: $Exports<'webpack/lib/DelegatedModule'>; -} -declare module 'webpack/lib/DelegatedModuleFactoryPlugin.js' { - declare module.exports: $Exports<'webpack/lib/DelegatedModuleFactoryPlugin'>; -} -declare module 'webpack/lib/DelegatedPlugin.js' { - declare module.exports: $Exports<'webpack/lib/DelegatedPlugin'>; -} -declare module 'webpack/lib/dependencies/AMDDefineDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDDefineDependency'>; -} -declare module 'webpack/lib/dependencies/AMDDefineDependencyParserPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDDefineDependencyParserPlugin'>; -} -declare module 'webpack/lib/dependencies/AMDPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDPlugin'>; -} -declare module 'webpack/lib/dependencies/AMDRequireArrayDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDRequireArrayDependency'>; -} -declare module 'webpack/lib/dependencies/AMDRequireContextDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDRequireContextDependency'>; -} -declare module 'webpack/lib/dependencies/AMDRequireDependenciesBlock.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDRequireDependenciesBlock'>; -} -declare module 'webpack/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDRequireDependenciesBlockParserPlugin'>; -} -declare module 'webpack/lib/dependencies/AMDRequireDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDRequireDependency'>; -} -declare module 'webpack/lib/dependencies/AMDRequireItemDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/AMDRequireItemDependency'>; -} -declare module 'webpack/lib/dependencies/CommonJsPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/CommonJsPlugin'>; -} -declare module 'webpack/lib/dependencies/CommonJsRequireContextDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/CommonJsRequireContextDependency'>; -} -declare module 'webpack/lib/dependencies/CommonJsRequireDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/CommonJsRequireDependency'>; -} -declare module 'webpack/lib/dependencies/CommonJsRequireDependencyParserPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/CommonJsRequireDependencyParserPlugin'>; -} -declare module 'webpack/lib/dependencies/ConstDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ConstDependency'>; -} -declare module 'webpack/lib/dependencies/ContextDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ContextDependency'>; -} -declare module 'webpack/lib/dependencies/ContextDependencyHelpers.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ContextDependencyHelpers'>; -} -declare module 'webpack/lib/dependencies/ContextDependencyTemplateAsId.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ContextDependencyTemplateAsId'>; -} -declare module 'webpack/lib/dependencies/ContextDependencyTemplateAsRequireCall.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ContextDependencyTemplateAsRequireCall'>; -} -declare module 'webpack/lib/dependencies/ContextElementDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ContextElementDependency'>; -} -declare module 'webpack/lib/dependencies/DelegatedSourceDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/DelegatedSourceDependency'>; -} -declare module 'webpack/lib/dependencies/DepBlockHelpers.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/DepBlockHelpers'>; -} -declare module 'webpack/lib/dependencies/DllEntryDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/DllEntryDependency'>; -} -declare module 'webpack/lib/dependencies/getFunctionExpression.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/getFunctionExpression'>; -} -declare module 'webpack/lib/dependencies/LabeledExportsDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LabeledExportsDependency'>; -} -declare module 'webpack/lib/dependencies/LabeledModuleDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LabeledModuleDependency'>; -} -declare module 'webpack/lib/dependencies/LabeledModuleDependencyParserPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LabeledModuleDependencyParserPlugin'>; -} -declare module 'webpack/lib/dependencies/LabeledModulesPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LabeledModulesPlugin'>; -} -declare module 'webpack/lib/dependencies/LoaderDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LoaderDependency'>; -} -declare module 'webpack/lib/dependencies/LoaderPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LoaderPlugin'>; -} -declare module 'webpack/lib/dependencies/LocalModule.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LocalModule'>; -} -declare module 'webpack/lib/dependencies/LocalModuleDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LocalModuleDependency'>; -} -declare module 'webpack/lib/dependencies/LocalModulesHelpers.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/LocalModulesHelpers'>; -} -declare module 'webpack/lib/dependencies/ModuleDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ModuleDependency'>; -} -declare module 'webpack/lib/dependencies/ModuleDependencyTemplateAsId.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ModuleDependencyTemplateAsId'>; -} -declare module 'webpack/lib/dependencies/ModuleDependencyTemplateAsRequireId.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ModuleDependencyTemplateAsRequireId'>; -} -declare module 'webpack/lib/dependencies/ModuleHotAcceptDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ModuleHotAcceptDependency'>; -} -declare module 'webpack/lib/dependencies/ModuleHotDeclineDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/ModuleHotDeclineDependency'>; -} -declare module 'webpack/lib/dependencies/MultiEntryDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/MultiEntryDependency'>; -} -declare module 'webpack/lib/dependencies/NullDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/NullDependency'>; -} -declare module 'webpack/lib/dependencies/NullDependencyTemplate.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/NullDependencyTemplate'>; -} -declare module 'webpack/lib/dependencies/PrefetchDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/PrefetchDependency'>; -} -declare module 'webpack/lib/dependencies/RequireContextDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireContextDependency'>; -} -declare module 'webpack/lib/dependencies/RequireContextDependencyParserPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireContextDependencyParserPlugin'>; -} -declare module 'webpack/lib/dependencies/RequireContextPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireContextPlugin'>; -} -declare module 'webpack/lib/dependencies/RequireEnsureDependenciesBlock.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireEnsureDependenciesBlock'>; -} -declare module 'webpack/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin'>; -} -declare module 'webpack/lib/dependencies/RequireEnsureDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireEnsureDependency'>; -} -declare module 'webpack/lib/dependencies/RequireEnsureItemDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireEnsureItemDependency'>; -} -declare module 'webpack/lib/dependencies/RequireEnsurePlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireEnsurePlugin'>; -} -declare module 'webpack/lib/dependencies/RequireHeaderDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireHeaderDependency'>; -} -declare module 'webpack/lib/dependencies/RequireIncludeDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireIncludeDependency'>; -} -declare module 'webpack/lib/dependencies/RequireIncludeDependencyParserPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireIncludeDependencyParserPlugin'>; -} -declare module 'webpack/lib/dependencies/RequireIncludePlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireIncludePlugin'>; -} -declare module 'webpack/lib/dependencies/RequireResolveContextDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireResolveContextDependency'>; -} -declare module 'webpack/lib/dependencies/RequireResolveDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireResolveDependency'>; -} -declare module 'webpack/lib/dependencies/RequireResolveDependencyParserPlugin.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireResolveDependencyParserPlugin'>; -} -declare module 'webpack/lib/dependencies/RequireResolveHeaderDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/RequireResolveHeaderDependency'>; -} -declare module 'webpack/lib/dependencies/SingleEntryDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/SingleEntryDependency'>; -} -declare module 'webpack/lib/dependencies/TemplateArgumentDependency.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/TemplateArgumentDependency'>; -} -declare module 'webpack/lib/dependencies/WebpackMissingModule.js' { - declare module.exports: $Exports<'webpack/lib/dependencies/WebpackMissingModule'>; -} -declare module 'webpack/lib/DependenciesBlock.js' { - declare module.exports: $Exports<'webpack/lib/DependenciesBlock'>; -} -declare module 'webpack/lib/DependenciesBlockVariable.js' { - declare module.exports: $Exports<'webpack/lib/DependenciesBlockVariable'>; -} -declare module 'webpack/lib/Dependency.js' { - declare module.exports: $Exports<'webpack/lib/Dependency'>; -} -declare module 'webpack/lib/DllEntryPlugin.js' { - declare module.exports: $Exports<'webpack/lib/DllEntryPlugin'>; -} -declare module 'webpack/lib/DllModule.js' { - declare module.exports: $Exports<'webpack/lib/DllModule'>; -} -declare module 'webpack/lib/DllModuleFactory.js' { - declare module.exports: $Exports<'webpack/lib/DllModuleFactory'>; -} -declare module 'webpack/lib/DllPlugin.js' { - declare module.exports: $Exports<'webpack/lib/DllPlugin'>; -} -declare module 'webpack/lib/DllReferencePlugin.js' { - declare module.exports: $Exports<'webpack/lib/DllReferencePlugin'>; -} -declare module 'webpack/lib/EntryModuleNotFoundError.js' { - declare module.exports: $Exports<'webpack/lib/EntryModuleNotFoundError'>; -} -declare module 'webpack/lib/EntryOptionPlugin.js' { - declare module.exports: $Exports<'webpack/lib/EntryOptionPlugin'>; -} -declare module 'webpack/lib/EnvironmentPlugin.js' { - declare module.exports: $Exports<'webpack/lib/EnvironmentPlugin'>; -} -declare module 'webpack/lib/EvalDevToolModulePlugin.js' { - declare module.exports: $Exports<'webpack/lib/EvalDevToolModulePlugin'>; -} -declare module 'webpack/lib/EvalDevToolModuleTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/EvalDevToolModuleTemplatePlugin'>; -} -declare module 'webpack/lib/EvalSourceMapDevToolModuleTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/EvalSourceMapDevToolModuleTemplatePlugin'>; -} -declare module 'webpack/lib/EvalSourceMapDevToolPlugin.js' { - declare module.exports: $Exports<'webpack/lib/EvalSourceMapDevToolPlugin'>; -} -declare module 'webpack/lib/ExtendedAPIPlugin.js' { - declare module.exports: $Exports<'webpack/lib/ExtendedAPIPlugin'>; -} -declare module 'webpack/lib/ExternalModule.js' { - declare module.exports: $Exports<'webpack/lib/ExternalModule'>; -} -declare module 'webpack/lib/ExternalModuleFactoryPlugin.js' { - declare module.exports: $Exports<'webpack/lib/ExternalModuleFactoryPlugin'>; -} -declare module 'webpack/lib/ExternalsPlugin.js' { - declare module.exports: $Exports<'webpack/lib/ExternalsPlugin'>; -} -declare module 'webpack/lib/FunctionModulePlugin.js' { - declare module.exports: $Exports<'webpack/lib/FunctionModulePlugin'>; -} -declare module 'webpack/lib/FunctionModuleTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/FunctionModuleTemplatePlugin'>; -} -declare module 'webpack/lib/HotModuleReplacement.runtime.js' { - declare module.exports: $Exports<'webpack/lib/HotModuleReplacement.runtime'>; -} -declare module 'webpack/lib/HotModuleReplacementPlugin.js' { - declare module.exports: $Exports<'webpack/lib/HotModuleReplacementPlugin'>; -} -declare module 'webpack/lib/HotUpdateChunkTemplate.js' { - declare module.exports: $Exports<'webpack/lib/HotUpdateChunkTemplate'>; -} -declare module 'webpack/lib/IgnorePlugin.js' { - declare module.exports: $Exports<'webpack/lib/IgnorePlugin'>; -} -declare module 'webpack/lib/JsonpChunkTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/JsonpChunkTemplatePlugin'>; -} -declare module 'webpack/lib/JsonpExportMainTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/JsonpExportMainTemplatePlugin'>; -} -declare module 'webpack/lib/JsonpHotUpdateChunkTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/JsonpHotUpdateChunkTemplatePlugin'>; -} -declare module 'webpack/lib/JsonpMainTemplate.runtime.js' { - declare module.exports: $Exports<'webpack/lib/JsonpMainTemplate.runtime'>; -} -declare module 'webpack/lib/JsonpMainTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/JsonpMainTemplatePlugin'>; -} -declare module 'webpack/lib/JsonpTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/JsonpTemplatePlugin'>; -} -declare module 'webpack/lib/LibManifestPlugin.js' { - declare module.exports: $Exports<'webpack/lib/LibManifestPlugin'>; -} -declare module 'webpack/lib/LibraryTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/LibraryTemplatePlugin'>; -} -declare module 'webpack/lib/LoaderTargetPlugin.js' { - declare module.exports: $Exports<'webpack/lib/LoaderTargetPlugin'>; -} -declare module 'webpack/lib/MainTemplate.js' { - declare module.exports: $Exports<'webpack/lib/MainTemplate'>; -} -declare module 'webpack/lib/MemoryOutputFileSystem.js' { - declare module.exports: $Exports<'webpack/lib/MemoryOutputFileSystem'>; -} -declare module 'webpack/lib/Module.js' { - declare module.exports: $Exports<'webpack/lib/Module'>; -} -declare module 'webpack/lib/ModuleFilenameHelpers.js' { - declare module.exports: $Exports<'webpack/lib/ModuleFilenameHelpers'>; -} -declare module 'webpack/lib/ModuleNotFoundError.js' { - declare module.exports: $Exports<'webpack/lib/ModuleNotFoundError'>; -} -declare module 'webpack/lib/ModuleParseError.js' { - declare module.exports: $Exports<'webpack/lib/ModuleParseError'>; -} -declare module 'webpack/lib/ModuleParserHelpers.js' { - declare module.exports: $Exports<'webpack/lib/ModuleParserHelpers'>; -} -declare module 'webpack/lib/ModuleReason.js' { - declare module.exports: $Exports<'webpack/lib/ModuleReason'>; -} -declare module 'webpack/lib/ModuleTemplate.js' { - declare module.exports: $Exports<'webpack/lib/ModuleTemplate'>; -} -declare module 'webpack/lib/MovedToPluginWarningPlugin.js' { - declare module.exports: $Exports<'webpack/lib/MovedToPluginWarningPlugin'>; -} -declare module 'webpack/lib/MultiCompiler.js' { - declare module.exports: $Exports<'webpack/lib/MultiCompiler'>; -} -declare module 'webpack/lib/MultiEntryPlugin.js' { - declare module.exports: $Exports<'webpack/lib/MultiEntryPlugin'>; -} -declare module 'webpack/lib/MultiModule.js' { - declare module.exports: $Exports<'webpack/lib/MultiModule'>; -} -declare module 'webpack/lib/MultiModuleFactory.js' { - declare module.exports: $Exports<'webpack/lib/MultiModuleFactory'>; -} -declare module 'webpack/lib/NamedModulesPlugin.js' { - declare module.exports: $Exports<'webpack/lib/NamedModulesPlugin'>; -} -declare module 'webpack/lib/NewWatchingPlugin.js' { - declare module.exports: $Exports<'webpack/lib/NewWatchingPlugin'>; -} -declare module 'webpack/lib/node/NodeChunkTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeChunkTemplatePlugin'>; -} -declare module 'webpack/lib/node/NodeEnvironmentPlugin.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeEnvironmentPlugin'>; -} -declare module 'webpack/lib/node/NodeHotUpdateChunkTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeHotUpdateChunkTemplatePlugin'>; -} -declare module 'webpack/lib/node/NodeMainTemplate.runtime.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeMainTemplate.runtime'>; -} -declare module 'webpack/lib/node/NodeMainTemplateAsync.runtime.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeMainTemplateAsync.runtime'>; -} -declare module 'webpack/lib/node/NodeMainTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeMainTemplatePlugin'>; -} -declare module 'webpack/lib/node/NodeOutputFileSystem.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeOutputFileSystem'>; -} -declare module 'webpack/lib/node/NodeSourcePlugin.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeSourcePlugin'>; -} -declare module 'webpack/lib/node/NodeTargetPlugin.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeTargetPlugin'>; -} -declare module 'webpack/lib/node/NodeTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeTemplatePlugin'>; -} -declare module 'webpack/lib/node/NodeWatchFileSystem.js' { - declare module.exports: $Exports<'webpack/lib/node/NodeWatchFileSystem'>; -} -declare module 'webpack/lib/node/OldNodeWatchFileSystem.js' { - declare module.exports: $Exports<'webpack/lib/node/OldNodeWatchFileSystem'>; -} -declare module 'webpack/lib/NodeStuffPlugin.js' { - declare module.exports: $Exports<'webpack/lib/NodeStuffPlugin'>; -} -declare module 'webpack/lib/NoErrorsPlugin.js' { - declare module.exports: $Exports<'webpack/lib/NoErrorsPlugin'>; -} -declare module 'webpack/lib/NormalModule.js' { - declare module.exports: $Exports<'webpack/lib/NormalModule'>; -} -declare module 'webpack/lib/NormalModuleFactory.js' { - declare module.exports: $Exports<'webpack/lib/NormalModuleFactory'>; -} -declare module 'webpack/lib/NormalModuleReplacementPlugin.js' { - declare module.exports: $Exports<'webpack/lib/NormalModuleReplacementPlugin'>; -} -declare module 'webpack/lib/NullFactory.js' { - declare module.exports: $Exports<'webpack/lib/NullFactory'>; -} -declare module 'webpack/lib/OldWatchingPlugin.js' { - declare module.exports: $Exports<'webpack/lib/OldWatchingPlugin'>; -} -declare module 'webpack/lib/optimize/AggressiveMergingPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/AggressiveMergingPlugin'>; -} -declare module 'webpack/lib/optimize/CommonsChunkPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/CommonsChunkPlugin'>; -} -declare module 'webpack/lib/optimize/DedupePlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/DedupePlugin'>; -} -declare module 'webpack/lib/optimize/FlagIncludedChunksPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/FlagIncludedChunksPlugin'>; -} -declare module 'webpack/lib/optimize/LimitChunkCountPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/LimitChunkCountPlugin'>; -} -declare module 'webpack/lib/optimize/MergeDuplicateChunksPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/MergeDuplicateChunksPlugin'>; -} -declare module 'webpack/lib/optimize/MinChunkSizePlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/MinChunkSizePlugin'>; -} -declare module 'webpack/lib/optimize/OccurenceOrderPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/OccurenceOrderPlugin'>; -} -declare module 'webpack/lib/optimize/OccurrenceOrderPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/OccurrenceOrderPlugin'>; -} -declare module 'webpack/lib/optimize/RemoveEmptyChunksPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/RemoveEmptyChunksPlugin'>; -} -declare module 'webpack/lib/optimize/RemoveParentModulesPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/RemoveParentModulesPlugin'>; -} -declare module 'webpack/lib/optimize/UglifyJsPlugin.js' { - declare module.exports: $Exports<'webpack/lib/optimize/UglifyJsPlugin'>; -} -declare module 'webpack/lib/OptionsApply.js' { - declare module.exports: $Exports<'webpack/lib/OptionsApply'>; -} -declare module 'webpack/lib/OriginalSource.js' { - declare module.exports: $Exports<'webpack/lib/OriginalSource'>; -} -declare module 'webpack/lib/Parser.js' { - declare module.exports: $Exports<'webpack/lib/Parser'>; -} -declare module 'webpack/lib/PrefetchPlugin.js' { - declare module.exports: $Exports<'webpack/lib/PrefetchPlugin'>; -} -declare module 'webpack/lib/ProgressPlugin.js' { - declare module.exports: $Exports<'webpack/lib/ProgressPlugin'>; -} -declare module 'webpack/lib/ProvidePlugin.js' { - declare module.exports: $Exports<'webpack/lib/ProvidePlugin'>; -} -declare module 'webpack/lib/RawModule.js' { - declare module.exports: $Exports<'webpack/lib/RawModule'>; -} -declare module 'webpack/lib/RawSource.js' { - declare module.exports: $Exports<'webpack/lib/RawSource'>; -} -declare module 'webpack/lib/RecordIdsPlugin.js' { - declare module.exports: $Exports<'webpack/lib/RecordIdsPlugin'>; -} -declare module 'webpack/lib/removeAndDo.js' { - declare module.exports: $Exports<'webpack/lib/removeAndDo'>; -} -declare module 'webpack/lib/RequestShortener.js' { - declare module.exports: $Exports<'webpack/lib/RequestShortener'>; -} -declare module 'webpack/lib/RequireJsStuffPlugin.js' { - declare module.exports: $Exports<'webpack/lib/RequireJsStuffPlugin'>; -} -declare module 'webpack/lib/ResolverPlugin.js' { - declare module.exports: $Exports<'webpack/lib/ResolverPlugin'>; -} -declare module 'webpack/lib/SetVarMainTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/SetVarMainTemplatePlugin'>; -} -declare module 'webpack/lib/SingleEntryPlugin.js' { - declare module.exports: $Exports<'webpack/lib/SingleEntryPlugin'>; -} -declare module 'webpack/lib/Source.js' { - declare module.exports: $Exports<'webpack/lib/Source'>; -} -declare module 'webpack/lib/SourceMapDevToolModuleOptionsPlugin.js' { - declare module.exports: $Exports<'webpack/lib/SourceMapDevToolModuleOptionsPlugin'>; -} -declare module 'webpack/lib/SourceMapDevToolPlugin.js' { - declare module.exports: $Exports<'webpack/lib/SourceMapDevToolPlugin'>; -} -declare module 'webpack/lib/SourceMapSource.js' { - declare module.exports: $Exports<'webpack/lib/SourceMapSource'>; -} -declare module 'webpack/lib/Stats.js' { - declare module.exports: $Exports<'webpack/lib/Stats'>; -} -declare module 'webpack/lib/Template.js' { - declare module.exports: $Exports<'webpack/lib/Template'>; -} -declare module 'webpack/lib/TemplatedPathPlugin.js' { - declare module.exports: $Exports<'webpack/lib/TemplatedPathPlugin'>; -} -declare module 'webpack/lib/UmdMainTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/UmdMainTemplatePlugin'>; -} -declare module 'webpack/lib/UnsupportedFeatureWarning.js' { - declare module.exports: $Exports<'webpack/lib/UnsupportedFeatureWarning'>; -} -declare module 'webpack/lib/WarnCaseSensitiveModulesPlugin.js' { - declare module.exports: $Exports<'webpack/lib/WarnCaseSensitiveModulesPlugin'>; -} -declare module 'webpack/lib/WatchIgnorePlugin.js' { - declare module.exports: $Exports<'webpack/lib/WatchIgnorePlugin'>; -} -declare module 'webpack/lib/web/WebEnvironmentPlugin.js' { - declare module.exports: $Exports<'webpack/lib/web/WebEnvironmentPlugin'>; -} -declare module 'webpack/lib/webpack.js' { - declare module.exports: $Exports<'webpack/lib/webpack'>; -} -declare module 'webpack/lib/webpack.web.js' { - declare module.exports: $Exports<'webpack/lib/webpack.web'>; -} -declare module 'webpack/lib/WebpackOptionsApply.js' { - declare module.exports: $Exports<'webpack/lib/WebpackOptionsApply'>; -} -declare module 'webpack/lib/WebpackOptionsDefaulter.js' { - declare module.exports: $Exports<'webpack/lib/WebpackOptionsDefaulter'>; -} -declare module 'webpack/lib/webworker/WebWorkerChunkTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/webworker/WebWorkerChunkTemplatePlugin'>; -} -declare module 'webpack/lib/webworker/WebWorkerMainTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/webworker/WebWorkerMainTemplatePlugin'>; -} -declare module 'webpack/lib/webworker/WebWorkerTemplatePlugin.js' { - declare module.exports: $Exports<'webpack/lib/webworker/WebWorkerTemplatePlugin'>; -} -declare module 'webpack/web_modules/node-libs-browser.js' { - declare module.exports: $Exports<'webpack/web_modules/node-libs-browser'>; -} diff --git a/karma.conf.js b/karma.conf.js index b34137a..3c8550f 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -24,7 +24,7 @@ module.exports = function(config) { }, files: [ - { pattern: 'lib/*_test.js', watched: false } + { pattern: 'lib/tests/*\\.test\\.js', watched: false } ], frameworks: ['babel-polyfill', 'mocha', 'expect'], @@ -42,7 +42,7 @@ module.exports = function(config) { ], preprocessors: { - 'lib/*_test.js': ['webpack', 'sourcemap'] + 'lib/tests/*\\.test\\.js': ['webpack', 'sourcemap'] }, reporters: ['dots'], diff --git a/lib/moment-range.js.flow b/lib/moment-range.js.flow new file mode 100644 index 0000000..1b895ca --- /dev/null +++ b/lib/moment-range.js.flow @@ -0,0 +1,68 @@ +import type Moment from "moment"; + +declare module "moment-range" { + declare type Shorthand = 'years' | 'year' | 'quarters' | 'quarter' | 'months' | 'month' | 'weeks' | 'week' | 'days' | 'day' | 'hours' | 'hour' | 'minutes' | 'minute' | 'seconds' | 'second' | 'milliseconds' | 'millisecond'; + + declare function extendMoment(moment: Class): Class; + + declare class DateRange { + start: Moment; + end: Moment; + + constructor(start: Date, end: Date): void; + constructor(start: Moment, end: Moment): void; + constructor(range: [Date, Date]): void; + constructor(range: [Moment, Moment]): void; + constructor(range: string): void; + + adjacent(other: DateRange): bool; + + add(other: DateRange): ?DateRange; + + by(interval: Shorthand, options?: {| excludeEnd?: bool, step?: number, |}): Iterable; + // @deprecated 4.0.0 + by(interval: Shorthand, options?: {| exclusive?: bool, step?: number, |}): Iterable; + + byRange(interval: DateRange, options?: {| excludeEnd?: bool; step?: number, |}): Iterable; + // @deprecated 4.0.0 + byRange(interval: DateRange, options?: {| exclusive?: bool, step?: number, |}): Iterable; + + center(): Moment; + + clone(): DateRange; + + contains(other: Date | DateRange | Moment, options?: {| excludeStart?: bool, excludeEnd?: bool, |}): bool; + // @deprecated 4.0.0 + contains(other: Date | DateRange | Moment, options?: {| exclusive: bool, |}): bool; + + diff(unit: ?Shorthand, rounded: ?bool): number; + + duration(unit: ?Shorthand, rounded: ?bool): number; + + intersect(other: DateRange): ?DateRange; + + isEqual(other: DateRange): bool; + + isSame(other: DateRange): bool; + + overlaps(other: DateRange, options?: {| adjacent: bool, |}): bool; + + reverseBy(interval: Shorthand, options?: {| excludeStart?: bool, step?: number, |}): Iterable; + // @deprecated 4.0.0 + reverseBy(interval: Shorthand, options?: {| exclusive?: bool, step?: number, |}): Iterable; + + reverseByRange(interval: DateRange, options?: {| excludeStart?: bool, step?: number, |}): Iterable; + // @deprecated 4.0.0 + reverseByRange(interval: DateRange, options?: {| exclusive?: bool, step?: number, |}): Iterable; + + snapTo(interval: Shorthand): DateRange; + + subtract(other: DateRange): Array; + + toDate(): Array; + + toString(): string; + + valueOf(): number; + } +} diff --git a/lib/moment-range_test.js b/lib/tests/moment-range.test.js similarity index 99% rename from lib/moment-range_test.js rename to lib/tests/moment-range.test.js index 2ffc4e7..1d1b943 100644 --- a/lib/moment-range_test.js +++ b/lib/tests/moment-range.test.js @@ -1,10 +1,8 @@ -/** - * @flow - */ +// @flow import expect from 'expect.js'; import M from 'moment'; -import { DateRange, extendMoment } from './moment-range'; +import { DateRange, extendMoment } from 'moment-range'; const moment = extendMoment(M); diff --git a/package.json b/package.json index 40de353..d0d2530 100644 --- a/package.json +++ b/package.json @@ -33,20 +33,19 @@ "node": "*" }, "files": [ - "dist/", - "lib/" + "dist/" ], "scripts": { "build": "webpack -p", - "check": "yarn run typescript-test && yarn run flow", + "check": "yarn run check:flow && yarn run check:typescript", + "check:flow": "flow", + "check:typescript": "tsc --project ./typing-tests/typescript", "doctoc": "doctoc README.md --github", - "flow": "flow", "lint": "eslint ./lib/", - "prepublishOnly": "yarn run build && cp ./declarations/moment-range.* ./lib/*.d.ts ./dist", - "preversion": "yarn run flow && yarn run typescript-test && yarn run lint && yarn run test", + "prepublishOnly": "yarn run build && cp ./lib/*.flow ./lib/*.d.ts ./dist", + "preversion": "yarn run check && yarn run lint && yarn run test", "test": "karma start ./karma.conf.js", - "typescript-test": "tsc --project typing-tests", - "version": "yarn run build && cp ./declarations/moment-range.* ./lib/*.d.ts ./dist" + "version": "yarn run build && cp ./lib/*.flow ./lib/*.d.ts ./dist" }, "typings": "./dist/moment-range.d.ts", "devDependencies": { @@ -61,7 +60,7 @@ "eslint": "^3.11.1", "eslint-loader": "^1.6.1", "expect.js": "^0.3.1", - "flow-bin": "^0.36.0", + "flow-bin": "0.66.0", "karma": "^1.3.0", "karma-babel-polyfill": "0.0.5", "karma-chrome-launcher": "^2.0.0", diff --git a/typing-tests/flow/moment-range.test.js b/typing-tests/flow/moment-range.test.js new file mode 100644 index 0000000..e04067d --- /dev/null +++ b/typing-tests/flow/moment-range.test.js @@ -0,0 +1,154 @@ +// @flow + +import M from 'moment'; +import { DateRange, extendMoment } from 'moment-range'; + +const moment = extendMoment(M); + +//----------------------------------------------------------------------------- +// Flow Tests +//----------------------------------------------------------------------------- + +moment.range(new Date(), new Date()); +moment.range(moment(), moment()); +moment.range([new Date(), new Date()]); +moment.range([moment(), moment()]); +moment.range('year'); + +moment.rangeFromInterval('day'); +moment.rangeFromInterval('day', 3); +moment.rangeFromInterval('day', 3, moment()); + +moment.rangeFromISOString('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); +moment.parseZoneRange('2015-01-17T09:50:04+03:00/2015-04-17T08:29:55-04:00'); // DEPRECATED 4.0.0 + +moment().isRange(moment.range('hour')); + +moment().within(moment.range('hour')); + +new DateRange(new Date(), new Date()); +new DateRange(moment(), moment()); +new DateRange([new Date(), new Date()]); +new DateRange([moment(), moment()]); +new DateRange('year'); + +// Adjacent +const range001 = new DateRange('year'); +range001.adjacent(new DateRange('month')); + +// Add +const range002 = new DateRange('day'); +range002.add(new DateRange('month')); + +// By +const range003 = new DateRange('year'); +range003.by('months'); +range003.by('months', { excludeEnd: true }); +range003.by('months', { exclusive: true }); // DEPRECATED 4.0.0 +range003.by('months', { step: 2 }); +range003.by('months', { excludeEnd: true, step: 2 }); +range003.by('months', { exclusive: true, step: 2 }); // DEPRECATED 4.0.0 + +// By Range +const range004 = new DateRange('year'); +range004.byRange(new DateRange('month')); +range004.byRange(new DateRange('month'), { excludeEnd: true }); +range004.byRange(new DateRange('month'), { exclusive: true }); // DEPRECATED 4.0.0 + +// Center +const range005 = new DateRange('year'); +range005.center(); + +// Clone +const range006 = new DateRange('year'); +range006.clone(); + +// Contains +const range007 = new DateRange('year'); +range007.contains(new Date()); +range007.contains(new DateRange('day')); +range007.contains(moment()); +range007.contains(new Date(), { excludeStart: true }); +range007.contains(new DateRange('day'), { excludeStart: true }); +range007.contains(moment(), { excludeStart: true }); +range007.contains(new Date(), { excludeEnd: true }); +range007.contains(new DateRange('day'), { excludeEnd: true }); +range007.contains(moment(), { excludeEnd: true }); +range007.contains(new Date(), { excludeStart: true, excludeEnd: true }); +range007.contains(new DateRange('day'), { + excludeStart: true, + excludeEnd: true +}); +range007.contains(moment(), { excludeStart: true, excludeEnd: true }); +range007.contains(new Date(), { exclusive: true }); // DEPRECATED 4.0.0 +range007.contains(new DateRange('day'), { exclusive: true }); // DEPRECATED 4.0.0 +range007.contains(moment(), { exclusive: true }); // DEPRECATED 4.0.0 + +// Diff +const range008 = new DateRange('year'); +range008.diff(); +range008.diff('month'); +range008.diff('month', true); + +// Duration +const range009 = new DateRange('year'); +range009.duration(); +range009.duration('month'); +range009.duration('month', true); + +// Intersect +const range010 = new DateRange('year'); +range010.intersect(new DateRange('month')); + +// Is Equal +const range011 = new DateRange('year'); +range011.isEqual(new DateRange('month')); + +// Is Same +const range012 = new DateRange('year'); +range012.isSame(new DateRange('month')); + +// Overlaps +const range013 = new DateRange('year'); +range013.overlaps(new DateRange('month')); +range013.overlaps(new DateRange('month'), { adjacent: true }); + +// Reverse By +const range014 = new DateRange('year'); +range014.reverseBy('months'); +range014.reverseBy('months', { excludeStart: true }); +range014.reverseBy('months', { exclusive: true }); // DEPRECATED 4.0.0 +range014.reverseBy('months', { step: 2 }); +range014.reverseBy('months', { excludeStart: true, step: 2 }); +range014.reverseBy('months', { exclusive: true, step: 2 }); // DEPRECATED 4.0.0 + +// Reverse By Range +const range015 = new DateRange('year'); +range015.reverseByRange(new DateRange('month')); +range015.reverseByRange(new DateRange('month'), { excludeStart: true }); +range015.reverseByRange(new DateRange('month'), { exclusive: true }); // DEPRECATED 4.0.0 + +// SnapTo +const range016 = new DateRange('year'); +range016.snapTo('month'); + +// Subtract +const range017 = new DateRange('year'); +range017.subtract(new DateRange('month')); + +// To Date +const range018 = new DateRange('year'); +range018.toDate(); + +// To String +const range019 = new DateRange('year'); +range019.toString(); +/* eslint-disable no-unused-expressions */ +// $FlowIssue: https://github.com/facebook/flow/issues/2814 +range019 + ''; +/* eslint-enable no-unused-expressions */ + +// Value Of +const range020 = new DateRange('year'); +range020.valueOf(); +// range019 + 1; diff --git a/typing-tests/moment-range_test.ts b/typing-tests/typescript/moment-range.test.ts similarity index 100% rename from typing-tests/moment-range_test.ts rename to typing-tests/typescript/moment-range.test.ts diff --git a/typing-tests/tsconfig.json b/typing-tests/typescript/tsconfig.json similarity index 78% rename from typing-tests/tsconfig.json rename to typing-tests/typescript/tsconfig.json index 20272d7..f0aa7f6 100644 --- a/typing-tests/tsconfig.json +++ b/typing-tests/typescript/tsconfig.json @@ -13,12 +13,12 @@ "noUnusedLocals": true, "noUnusedParameters": true, "paths": { - "moment-range": ["../lib/moment-range.d.ts", "../lib/moment-range.js"] + "moment-range": ["../../lib/moment-range.d.ts", "../../lib/moment-range.js"] } }, "files": [ - "../lib/moment-range.d.ts", - "./moment-range_test.ts" + "../../lib/moment-range.d.ts", + "./moment-range.test.ts" ], "sourceMap": true, "strict": true, diff --git a/webpack.config.js b/webpack.config.js index e6f61b9..ea24a03 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -29,7 +29,7 @@ module.exports = { }, resolve: { modules: [ - path.resolve(__dirname, './src'), + path.resolve(__dirname, './lib'), path.resolve(__dirname, './node_modules') ] }, diff --git a/yarn.lock b/yarn.lock index 11c6556..53a1402 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1891,9 +1891,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.36.0: - version "0.36.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.36.0.tgz#557907bd9c2ab0670cfad9e7e906a74b0631e39a" +flow-bin@0.66.0: + version "0.66.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.66.0.tgz#a96dde7015dc3343fd552a7b4963c02be705ca26" for-in@^0.1.5: version "0.1.6" From 9b8796b68c3309c19cd0e1777504a3a2b6113a69 Mon Sep 17 00:00:00 2001 From: Mathias Ducancel Date: Mon, 12 Mar 2018 13:32:19 +0100 Subject: [PATCH 21/25] Fix example using wrong var name --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5944e47..0bccc6e 100644 --- a/README.md +++ b/README.md @@ -659,9 +659,9 @@ const d1 = new Date(Date.UTC(2011, 4, 1)); const d2 = new Date(Date.UTC(2011, 4, 5, 12)); const range = moment.range(d1, d2); -dr.diff('days') // 4 -dr.diff('days', false) // 4 -dr.diff('days', true) // 4.5 +range.diff('days') // 4 +range.diff('days', false) // 4 +range.diff('days', true) // 4.5 ``` `#duration` is an alias for `#diff` and they may be used interchangeably. From 8ac9557791d0149e2a9a18044fba1463eade306e Mon Sep 17 00:00:00 2001 From: Gianni Chiappetta Date: Thu, 15 Mar 2018 13:09:30 -0400 Subject: [PATCH 22/25] =?UTF-8?q?Docs=20`dr`=20=E2=86=92=20`range`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0bccc6e..67718aa 100644 --- a/README.md +++ b/README.md @@ -239,9 +239,9 @@ Calculate the center of a range: ``` js const start = new Date(2011, 2, 5); const end = new Date(2011, 3, 5); -const dr = moment.range(start, end); +const range = moment.range(start, end); -dr.center(); // 1300622400000 +range.center(); // 1300622400000 ``` #### Contains @@ -644,11 +644,11 @@ Any of the units accepted by [moment.js' `add` method][add] may be used. ``` js const start = new Date(2011, 2, 5); const end = new Date(2011, 5, 5); -const dr = moment.range(start, end); +const range = moment.range(start, end); -dr.diff('months'); // 3 -dr.diff('days'); // 92 -dr.diff(); // 7945200000 +range.diff('months'); // 3 +range.diff('days'); // 92 +range.diff(); // 7945200000 ``` Optionally you may specify if the difference should be rounded, by default it @@ -675,9 +675,9 @@ Converts the `DateRange` to an `Array` of the start and end `Date` objects. ``` js const start = new Date(2011, 2, 5); const end = new Date(2011, 5, 5); -const dr = moment.range(start, end); +const range = moment.range(start, end); -dr.toDate(); // [new Date(2011, 2, 5), new Date(2011, 5, 5)] +range.toDate(); // [new Date(2011, 2, 5), new Date(2011, 5, 5)] ``` #### `toString` From 3a17723062c3d9b1b2133d628b1062b40f02163e Mon Sep 17 00:00:00 2001 From: TristanJM Date: Fri, 6 Apr 2018 11:56:26 +0100 Subject: [PATCH 23/25] Clarify iteration exclusion --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 67718aa..241cd8f 100644 --- a/README.md +++ b/README.md @@ -423,21 +423,19 @@ for (let month of range.by('month')) { } const years = Array.from(range.by('year')); -years.length == 5 // true +years.length == 6 // true years.map(m => m.format('YYYY')) // ['2010', '2011', '2012', '2013', '2014', '2015'] ``` -Iteration also supports excluding the end value of the range by setting the -`excludeEnd` option to `true`. +Iteration also supports excluding the final time slice of the range by setting the +`excludeEnd` option to `true`. In the example below, the 5:00 -> 6:00 time slice is omitted. ``` js -const start = new Date(2012, 2, 1); -const end = new Date(2012, 2, 5); -const range1 = moment.range(start, end); - -const acc = Array.from(range1.by('day', { excludeEnd: true })); +const range = moment.range('2018-01-01 00:00', '2018-01-01 05:30'); -acc.length == 4 // true +const hours = Array.from(range.by('hour', { excludeEnd: true })); +hours.length == 5 // true +hours.map(m => m.format('HH:mm')) // ['00:00', '01:00', '02:00', '03:00', '04:00'] ``` Additionally it's possible to iterate by a given step that defaults to `1`: From 6cdcb834c2718012eefbeee0978fad34f91611b3 Mon Sep 17 00:00:00 2001 From: TristanJM Date: Fri, 6 Apr 2018 12:15:55 +0100 Subject: [PATCH 24/25] Doc fixes for iterations --- README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 241cd8f..ec39eb7 100644 --- a/README.md +++ b/README.md @@ -475,9 +475,9 @@ end of the range should be excluded when testing for inclusion: #### byRange ``` js -const start = new Date(2012, 2, 1); -const two = new Date(2012, 2, 2); -const end = new Date(2012, 2, 5); +const start = new Date(2012, 2, 1); // 1st +const two = new Date(2012, 2, 2); // 2nd +const end = new Date(2012, 2, 5); // 5th const range1 = moment.range(start, end); const range2 = moment.range(start, two); // One day ``` @@ -485,27 +485,29 @@ const range2 = moment.range(start, two); // One day Iterate by another range: ``` js -const acc = Array.from(range1.by(range2)); +const acc = Array.from(range1.byRange(range2)); acc.length == 5 // true +acc.map(m => m.format('DD')) // ['01','02','03','04','05'] ``` -Exclude the end value: +Exclude the end time slice: ``` js -const acc = Array.from(range1.by(range2, { excludeEnd: true })); +const acc = Array.from(range1.byRange(range2, { excludeEnd: true })); acc.length == 4 // true +acc.map(m => m.format('DD')) // ['01','02','03','04'] ``` By step: ``` js -let acc = Array.from(range1.by(range2, { step: 2 })); +let acc = Array.from(range1.byRange(range2, { step: 2 })); acc.map(m => m.format('DD')) // ['01', '03', '05'] -acc = Array.from(range1.by(range2, { excludeEnd, true, step: 2 })); +acc = Array.from(range1.byRange(range2, { excludeEnd, true, step: 2 })); acc.map(m => m.format('DD')) // ['01', '03'] ``` @@ -526,7 +528,7 @@ const acc = Array.from(range.reverseBy('years')); acc.map(m => m.format('YYYY')) // ['2015', '2014', '2013', '2012'] ``` -Exclude the start value: +Exclude the start time slice: ``` js const range = moment.range('2012-01-01', '2015-01-01'); @@ -569,7 +571,7 @@ const range2 = moment.range(start, two); // One day Iterate by another range in reverse: ``` js -const acc = Array.from(range1.by(range2)); +const acc = Array.from(range1.reverseByRange(range2)); acc.length == 5 // true acc.map(m => m.format('DD')) // ['05', '04', '03', '02', '01'] @@ -578,7 +580,7 @@ acc.map(m => m.format('DD')) // ['05', '04', '03', '02', '01'] Exclude the start value: ``` js -const acc = Array.from(range1.by(range2, { excludeStart: true })); +const acc = Array.from(range1.reverseByRange(range2, { excludeStart: true })); acc.length == 4 // true acc.map(m => m.format('DD')) // ['05', '04', '03', '02'] From 929b79cb98ae45c9b19156f901a36bdffce622c5 Mon Sep 17 00:00:00 2001 From: TristanJM Date: Fri, 6 Apr 2018 13:28:03 +0100 Subject: [PATCH 25/25] Fixed range constructor poor performance when passed moment obj --- CHANGELOG.md | 1 + lib/moment-range.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b487f2..16b01ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * 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 diff --git a/lib/moment-range.js b/lib/moment-range.js index 87b741b..ab12c02 100644 --- a/lib/moment-range.js +++ b/lib/moment-range.js @@ -369,7 +369,7 @@ export function extendMoment(moment) { moment.range = function range(start, end) { const m = this; - if (INTERVALS.hasOwnProperty(start)) { + if (typeof start === 'string' && INTERVALS.hasOwnProperty(start)) { return new DateRange(moment(m).startOf(start), moment(m).endOf(start)); }