{"action":"created","issue":{"url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2783","repository_url":"https://api.github.com/repos/flow-typed/flow-typed","labels_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2783/labels{/name}","comments_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2783/comments","events_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2783/events","html_url":"https://github.com/flow-typed/flow-typed/pull/2783","id":366225637,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5OTUyMjUw","number":2783,"title":"Merge two competing moment type declarations","user":{"login":"valscion","id":482561,"node_id":"MDQ6VXNlcjQ4MjU2MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/482561?v=4","gravatar_id":"","url":"https://api.github.com/users/valscion","html_url":"https://github.com/valscion","followers_url":"https://api.github.com/users/valscion/followers","following_url":"https://api.github.com/users/valscion/following{/other_user}","gists_url":"https://api.github.com/users/valscion/gists{/gist_id}","starred_url":"https://api.github.com/users/valscion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valscion/subscriptions","organizations_url":"https://api.github.com/users/valscion/orgs","repos_url":"https://api.github.com/users/valscion/repos","events_url":"https://api.github.com/users/valscion/events{/privacy}","received_events_url":"https://api.github.com/users/valscion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-03T08:24:08Z","updated_at":"2018-10-05T08:07:01Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/flow-typed/flow-typed/pulls/2783","html_url":"https://github.com/flow-typed/flow-typed/pull/2783","diff_url":"https://github.com/flow-typed/flow-typed/pull/2783.diff","patch_url":"https://github.com/flow-typed/flow-typed/pull/2783.patch"},"body":"**This PR is now ready for review!**\r\n\r\nI'm fairly confident this PR is backwards-compatible and doesn't cause any breakage for functionally correct code.\r\n\r\nI will happily be on the lookout for the following few weeks if moment types raise any errors. Feel free to ping me to any moment related issue and I can help triage issues, review pull requests and fix obvious bugs.\r\n\r\n---\r\n\r\nThere might be a reason why there's currently two moment types targeting `moment_v2.x.x` and `moment_v2.3.x` but it wasn't immediately obvious to me.\r\n\r\nI'm looking towards improving the moment types and tackling open issues/pull requests related to them, so the first step would be some sort of cleanup.\r\n\r\nThis PR first runs both versions through `prettier` so I could figure out what's the diff between these two.\r\n\r\nAnd the diff after prettier and moving code around is this:\r\n\r\n<details>\r\n\r\n```diff\r\ndiff --git a/definitions/npm/moment_v2.x.x/flow_v0.63.x-/moment_v2.x.x.js b/definitions/npm/moment_v2.3.x/flow_v0.25.x-/moment_v2.3.x.js\r\nindex 57250748..69b957f0 100644\r\n--- a/definitions/npm/moment_v2.x.x/flow_v0.63.x-/moment_v2.x.x.js\r\n+++ b/definitions/npm/moment_v2.3.x/flow_v0.25.x-/moment_v2.3.x.js\r\n@@ -52,8 +52,6 @@ type moment$CalendarFormats = {\r\n   sameElse?: moment$CalendarFormat\r\n };\r\n \r\n-type moment$Inclusivity = \"()\" | \"[)\" | \"()\" | \"(]\" | \"[]\";\r\n-\r\n declare class moment$LocaleData {\r\n   months(moment: moment$Moment): string;\r\n   monthsShort(moment: moment$Moment): string;\r\n@@ -103,6 +101,8 @@ declare class moment$MomentDuration {\r\n   days(): number;\r\n   asDays(): number;\r\n   months(): number;\r\n+  asWeeks(): number;\r\n+  weeks(): number;\r\n   asMonths(): number;\r\n   years(): number;\r\n   asYears(): number;\r\n@@ -116,17 +116,19 @@ declare class moment$MomentDuration {\r\n }\r\n declare class moment$Moment {\r\n   static ISO_8601: string;\r\n+  static (\r\n+    initDate: ?Object | number | Date | Array<number> | moment$Moment | string\r\n+  ): moment$Moment;\r\n   static (\r\n     string?: string,\r\n     format?: string | Array<string>,\r\n-    locale?: string,\r\n     strict?: boolean\r\n   ): moment$Moment;\r\n   static (\r\n-    initDate: ?Object | number | Date | Array<number> | moment$Moment | string,\r\n-    validFormats?: ?Array<string> | string,\r\n-    locale?: ?boolean | string,\r\n-    strict?: ?boolean | string\r\n+    string?: string,\r\n+    format?: string | Array<string>,\r\n+    locale?: string,\r\n+    strict?: boolean\r\n   ): moment$Moment;\r\n   static unix(seconds: number): moment$Moment;\r\n   static utc(): moment$Moment;\r\n@@ -138,8 +140,23 @@ declare class moment$Moment {\r\n   ): moment$Moment;\r\n   static utc(moment: moment$Moment): moment$Moment;\r\n   static utc(date: Date): moment$Moment;\r\n+  static parseZone(): moment$Moment;\r\n   static parseZone(rawDate: string): moment$Moment;\r\n-  parseZone(): moment$Moment;\r\n+  static parseZone(\r\n+    rawDate: string,\r\n+    format: string | Array<string>\r\n+  ): moment$Moment;\r\n+  static parseZone(\r\n+    rawDate: string,\r\n+    format: string,\r\n+    strict: boolean\r\n+  ): moment$Moment;\r\n+  static parseZone(\r\n+    rawDate: string,\r\n+    format: string,\r\n+    locale: string,\r\n+    strict: boolean\r\n+  ): moment$Moment;\r\n   isValid(): boolean;\r\n   invalidAt(): 0 | 1 | 2 | 3 | 4 | 5 | 6;\r\n   creationData(): moment$MomentCreationData;\r\n@@ -167,9 +184,9 @@ declare class moment$Moment {\r\n   days(day: number | string): this;\r\n   day(): number;\r\n   days(): number;\r\n-  weekday(day: number | string): this;\r\n+  weekday(number: number): this;\r\n   weekday(): number;\r\n-  isoWeekday(day: number | string): this;\r\n+  isoWeekday(number: number): this;\r\n   isoWeekday(): number;\r\n   dayOfYear(number: number): this;\r\n   dayOfYear(): number;\r\n@@ -245,7 +262,7 @@ declare class moment$Moment {\r\n   toDate(): Date;\r\n   toArray(): Array<number>;\r\n   toJSON(): string;\r\n-  toISOString(): string;\r\n+  toISOString(keepOffset?: boolean): string;\r\n   toObject(): moment$MomentObject;\r\n   isBefore(\r\n     date?: moment$Moment | string | number | Date | Array<number>,\r\n@@ -268,10 +285,10 @@ declare class moment$Moment {\r\n     units?: ?string\r\n   ): boolean;\r\n   isBetween(\r\n-    from: moment$Moment | string | number | Date | Array<number>,\r\n-    to: moment$Moment | string | number | Date | Array<number>,\r\n-    units?: string,\r\n-    inclusivity?: moment$Inclusivity\r\n+    fromDate: moment$Moment | string | number | Date | Array<number>,\r\n+    toDate?: ?moment$Moment | string | number | Date | Array<number>,\r\n+    granularity?: ?string,\r\n+    inclusion?: ?string\r\n   ): boolean;\r\n   isDST(): boolean;\r\n   isDSTShifted(): boolean;\r\n@@ -280,7 +297,7 @@ declare class moment$Moment {\r\n   static isMoment(obj: any): boolean;\r\n   static isDate(obj: any): boolean;\r\n   static updateLocale(locale: string, localeData?: ?Object): void;\r\n-  static locale(locale?: string, localeData?: Object): string;\r\n+  static locale(locale: string, localeData?: Object): string;\r\n   static locale(locales: Array<string>): string;\r\n   locale(locale: string, customization?: Object | null): moment$Moment;\r\n   locale(): string;\r\n```\r\n\r\n</details><br>\r\n\r\nSo not much. I'll see if any of this diff is applicable the version difference of v2.x.x vs v2.3.x, and if not, merge all of the new types to v2.x.x and the smallest flow version possible."},"comment":{"url":"https://api.github.com/repos/flow-typed/flow-typed/issues/comments/427281225","html_url":"https://github.com/flow-typed/flow-typed/pull/2783#issuecomment-427281225","issue_url":"https://api.github.com/repos/flow-typed/flow-typed/issues/2783","id":427281225,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzI4MTIyNQ==","user":{"login":"valscion","id":482561,"node_id":"MDQ6VXNlcjQ4MjU2MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/482561?v=4","gravatar_id":"","url":"https://api.github.com/users/valscion","html_url":"https://github.com/valscion","followers_url":"https://api.github.com/users/valscion/followers","following_url":"https://api.github.com/users/valscion/following{/other_user}","gists_url":"https://api.github.com/users/valscion/gists{/gist_id}","starred_url":"https://api.github.com/users/valscion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valscion/subscriptions","organizations_url":"https://api.github.com/users/valscion/orgs","repos_url":"https://api.github.com/users/valscion/repos","events_url":"https://api.github.com/users/valscion/events{/privacy}","received_events_url":"https://api.github.com/users/valscion/received_events","type":"User","site_admin":false},"created_at":"2018-10-05T08:07:01Z","updated_at":"2018-10-05T08:07:01Z","author_association":"CONTRIBUTOR","body":"Heya @GAntoine, any chance for you check this out at some point? If the invitation to the slack channel is still open, I'd be happy to have a chat about this change if needed https://github.com/flow-typed/flow-typed/pull/2767#issuecomment-426629009\r\n\r\n"}}
{"actor":{"display_login":"valscion"}}