From ae3a5ec8223dab41a07ed22fc81820f984f8dbe4 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 19 Jun 2017 02:20:56 -0700 Subject: [PATCH 01/96] Initialize issue labeller bot --- utils/issue-format-bot/.gitignore | 59 +++ utils/issue-format-bot/LICENSE | 674 ++++++++++++++++++++++++++++ utils/issue-format-bot/package.json | 22 + 3 files changed, 755 insertions(+) create mode 100644 utils/issue-format-bot/.gitignore create mode 100644 utils/issue-format-bot/LICENSE create mode 100644 utils/issue-format-bot/package.json diff --git a/utils/issue-format-bot/.gitignore b/utils/issue-format-bot/.gitignore new file mode 100644 index 000000000000..00cbbdf53f6c --- /dev/null +++ b/utils/issue-format-bot/.gitignore @@ -0,0 +1,59 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + diff --git a/utils/issue-format-bot/LICENSE b/utils/issue-format-bot/LICENSE new file mode 100644 index 000000000000..94a9ed024d38 --- /dev/null +++ b/utils/issue-format-bot/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json new file mode 100644 index 000000000000..5887880c7402 --- /dev/null +++ b/utils/issue-format-bot/package.json @@ -0,0 +1,22 @@ +{ + "name": "issue-format-bot", + "version": "1.0.0", + "description": "GitHub bot to parse ruleset issues", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/EFForg/HTTPS-Everywhere.git" + }, + "author": "AJ Jordan ", + "license": "GPL-3.0+", + "bugs": { + "url": "https://github.com/EFForg/HTTPS-Everywhere/issues" + }, + "homepage": "https://github.com/EFForg/HTTPS-Everywhere#readme", + "devDependencies": { + "perjury": "^0.4.3" + } +} From cee5ed256115c3c7f3c981da6e01d831345ae62d Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 19 Jun 2017 02:36:10 -0700 Subject: [PATCH 02/96] Import Probot plugin template --- utils/issue-format-bot/.env.example | 3 +++ utils/issue-format-bot/.gitignore | 1 + utils/issue-format-bot/.travis.yml | 6 ++++++ utils/issue-format-bot/README.md | 15 +++++++++++++++ utils/issue-format-bot/app.json | 13 +++++++++++++ utils/issue-format-bot/docs/deploy.md | 7 +++++++ utils/issue-format-bot/index.js | 10 ++++++++++ utils/issue-format-bot/package.json | 24 ++++++++++++++++++------ 8 files changed, 73 insertions(+), 6 deletions(-) create mode 100644 utils/issue-format-bot/.env.example create mode 100644 utils/issue-format-bot/.travis.yml create mode 100644 utils/issue-format-bot/README.md create mode 100644 utils/issue-format-bot/app.json create mode 100644 utils/issue-format-bot/docs/deploy.md create mode 100644 utils/issue-format-bot/index.js diff --git a/utils/issue-format-bot/.env.example b/utils/issue-format-bot/.env.example new file mode 100644 index 000000000000..df8db0efd1d9 --- /dev/null +++ b/utils/issue-format-bot/.env.example @@ -0,0 +1,3 @@ +# The ID of your GitHub integration +INTEGRATION_ID= +WEBHOOK_SECRET=development diff --git a/utils/issue-format-bot/.gitignore b/utils/issue-format-bot/.gitignore index 00cbbdf53f6c..cfd0495528c5 100644 --- a/utils/issue-format-bot/.gitignore +++ b/utils/issue-format-bot/.gitignore @@ -57,3 +57,4 @@ typings/ # dotenv environment variables file .env +*.pem diff --git a/utils/issue-format-bot/.travis.yml b/utils/issue-format-bot/.travis.yml new file mode 100644 index 000000000000..e5e69c4740bc --- /dev/null +++ b/utils/issue-format-bot/.travis.yml @@ -0,0 +1,6 @@ +sudo: false +language: node_js +node_js: + - "7" +notifications: + disabled: true diff --git a/utils/issue-format-bot/README.md b/utils/issue-format-bot/README.md new file mode 100644 index 000000000000..03a077c1139f --- /dev/null +++ b/utils/issue-format-bot/README.md @@ -0,0 +1,15 @@ +# issue-format-bot + +> a GitHub Integration built with [probot](https://github.com/probot/probot) that parses incoming HTTPS Everywhere ruleset bugs + +## Setup + +``` +# Install dependencies +npm install + +# Run the bot +npm start +``` + +See [docs/deploy.md](docs/deploy.md) if you would like to run your own instance of this plugin. diff --git a/utils/issue-format-bot/app.json b/utils/issue-format-bot/app.json new file mode 100644 index 000000000000..b1e40c304624 --- /dev/null +++ b/utils/issue-format-bot/app.json @@ -0,0 +1,13 @@ +{ + "env": { + "PRIVATE_KEY": { + "description": "the private key you downloaded when creating the GitHub Integration" + }, + "INTEGRATION_ID": { + "description": "the ID of your GitHub Integration" + }, + "WEBHOOK_SECRET": { + "description": "the secret configured for your GitHub Integration" + } + } +} diff --git a/utils/issue-format-bot/docs/deploy.md b/utils/issue-format-bot/docs/deploy.md new file mode 100644 index 000000000000..b9205bd114e0 --- /dev/null +++ b/utils/issue-format-bot/docs/deploy.md @@ -0,0 +1,7 @@ +# Deploying + +If you would like to run your own instance of this plugin, see the [docs for deploying plugins](https://github.com/probot/probot/blob/master/docs/deployment.md). + +This plugin requires these **Permissions & events** for the GitHub Integration: + +> **TODO**: List permissions required for deployment here. See [probot/stale](https://github.com/probot/stale/blob/master/docs/deploy.md) for an example. diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js new file mode 100644 index 000000000000..189c99191a81 --- /dev/null +++ b/utils/issue-format-bot/index.js @@ -0,0 +1,10 @@ +module.exports = (robot) => { + // Your plugin code here + console.log('Yay, the plugin was loaded!'); + + // For more information on building plugins: + // https://github.com/probot/probot/blob/master/docs/plugins.md + + // To get your plugin running against GitHub, see: + // https://github.com/probot/probot/blob/master/docs/development.md +}; diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 5887880c7402..87fe411673d8 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -2,21 +2,33 @@ "name": "issue-format-bot", "version": "1.0.0", "description": "GitHub bot to parse ruleset issues", + "author": "AJ Jordan ", "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, + "license": "GPL-3.0+", "repository": { "type": "git", "url": "git+https://github.com/EFForg/HTTPS-Everywhere.git" }, - "author": "AJ Jordan ", - "license": "GPL-3.0+", + "scripts": { + "start": "probot run ./index.js", + "test": "mocha && xo --extend probot" + }, "bugs": { "url": "https://github.com/EFForg/HTTPS-Everywhere/issues" }, "homepage": "https://github.com/EFForg/HTTPS-Everywhere#readme", "devDependencies": { - "perjury": "^0.4.3" + "eslint-config-probot": "^0.1.0", + "expect": "^1.20.2", + "localtunnel": "^1.8.3", + "mocha": "^3.4.2", + "xo": "^0.18.2" + }, + "engines": { + "node": ">= 7.7.0", + "npm": ">= 4.0.0" + }, + "dependencies": { + "probot": "^0.7.4" } } From 9b5dff3933e8005e09cdcdbce538045eb6963c7c Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 01:02:03 -0500 Subject: [PATCH 03/96] Switch back to Perjury --- utils/issue-format-bot/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 87fe411673d8..8c06f0fd0f05 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -11,7 +11,7 @@ }, "scripts": { "start": "probot run ./index.js", - "test": "mocha && xo --extend probot" + "test": "perjury test/*-test.js && xo --extend probot" }, "bugs": { "url": "https://github.com/EFForg/HTTPS-Everywhere/issues" @@ -21,7 +21,7 @@ "eslint-config-probot": "^0.1.0", "expect": "^1.20.2", "localtunnel": "^1.8.3", - "mocha": "^3.4.2", + "perjury": "^0.4.3", "xo": "^0.18.2" }, "engines": { From 300caa270dd09da9433229f01d7d5a809fc8a27b Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 01:02:36 -0500 Subject: [PATCH 04/96] Add a basic development.md --- utils/issue-format-bot/docs/development.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 utils/issue-format-bot/docs/development.md diff --git a/utils/issue-format-bot/docs/development.md b/utils/issue-format-bot/docs/development.md new file mode 100644 index 000000000000..29f20994cb80 --- /dev/null +++ b/utils/issue-format-bot/docs/development.md @@ -0,0 +1,4 @@ +# Development + +To get the bot running against GitHub, see +https://github.com/probot/probot/blob/master/docs/development.md. From 29f480962f22a8bcbc324a423d3c381a71aa8edd Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 01:03:17 -0500 Subject: [PATCH 05/96] Start writing an issue-parsing function --- utils/issue-format-bot/lib/parse.js | 25 +++++++++++++++++++ utils/issue-format-bot/test/parse-test.js | 29 +++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 utils/issue-format-bot/lib/parse.js create mode 100644 utils/issue-format-bot/test/parse-test.js diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js new file mode 100644 index 000000000000..a81f5faa5f7a --- /dev/null +++ b/utils/issue-format-bot/lib/parse.js @@ -0,0 +1,25 @@ +// Takes in an issue body and parses it into key-value pairs, normalizes it, and returns an Object + +'use strict'; + +const strip = require('strip-markdown'), + remark = require('remark'), + processor = remark().use(strip), + fromPairs = require('lodash.frompairs'); + +module.exports = function(body) { + const plaintext = String(processor.processSync(body)); + + const lines = plaintext.split('\n') + .map(line => line.split(':').map(key => key.trim())); + + // Filter result looks like [ [ 'Type', 'ruleset issue' ] ] + const type = lines.filter(line => line[0] === 'Type')[0][1]; + + if (type !== 'ruleset issue') return false; + + let normalized = lines.map(line => [line[0].toLowerCase(), line[1]]); + normalized = fromPairs(normalized); + + return normalized; +}; diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js new file mode 100644 index 000000000000..fd9d58ab668d --- /dev/null +++ b/utils/issue-format-bot/test/parse-test.js @@ -0,0 +1,29 @@ +const vows = require('perjury'), + assert = vows.assert; + +vows.describe('issue parser module').addBatch({ + 'When we require the module': { + topic: function() { + return require('../lib/parse'); + }, + 'it works': function(err, parse) { + assert.ifError(err); + }, + 'it\'s a function': function(err, parse) { + assert.isFunction(parse); + }, + 'and we pass it a body that\'s a ruleset issue': { + topic: function(parse) { + return parse('Type: ruleset issue\nDomain: example.com'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the object has the right data': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + } + } +}).export(module); From 5ce47b2629db6434469df653b305686ba39659d4 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 01:52:07 -0500 Subject: [PATCH 06/96] Add more parsing testcases --- utils/issue-format-bot/lib/parse.js | 12 ++--- utils/issue-format-bot/package.json | 5 +- utils/issue-format-bot/test/parse-test.js | 63 ++++++++++++++++++++++- 3 files changed, 72 insertions(+), 8 deletions(-) diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index a81f5faa5f7a..5484c15e9730 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -5,21 +5,21 @@ const strip = require('strip-markdown'), remark = require('remark'), processor = remark().use(strip), - fromPairs = require('lodash.frompairs'); + _ = require('lodash'); module.exports = function(body) { const plaintext = String(processor.processSync(body)); const lines = plaintext.split('\n') - .map(line => line.split(':').map(key => key.trim())); - + .filter(line => _.compact(line).length !== 0) + .map(line => line.split(':').map(key => key.trim())) + .map(line => [line[0].toLowerCase(), line[1]]); // Filter result looks like [ [ 'Type', 'ruleset issue' ] ] - const type = lines.filter(line => line[0] === 'Type')[0][1]; + const type = lines.filter(line => line[0] === 'type')[0][1]; if (type !== 'ruleset issue') return false; - let normalized = lines.map(line => [line[0].toLowerCase(), line[1]]); - normalized = fromPairs(normalized); + let normalized = _.fromPairs(lines); return normalized; }; diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 8c06f0fd0f05..7e1042f14b54 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -29,6 +29,9 @@ "npm": ">= 4.0.0" }, "dependencies": { - "probot": "^0.7.4" + "lodash": "^4.17.4", + "probot": "^0.7.4", + "remark": "^7.0.1", + "strip-markdown": "^3.0.0" } } diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index fd9d58ab668d..9f963a96e31b 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -1,5 +1,6 @@ const vows = require('perjury'), - assert = vows.assert; + assert = vows.assert, + _ = require('lodash'); vows.describe('issue parser module').addBatch({ 'When we require the module': { @@ -24,6 +25,66 @@ vows.describe('issue parser module').addBatch({ assert.includes(obj, 'domain'); assert.equal(obj.domain, 'example.com'); } + }, + 'and we pass it a body with funky capitalization': { + topic: function(parse) { + return parse('tyPe: ruleset issue\nDoMaIn: example.com'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the capitalization didn\'t matter': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }, + 'and we pass it a body with out-of-order data': { + topic: function(parse) { + return parse('Domain: example.com\nType: ruleset issue'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the object has the right data': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }, + 'and we pass it a body with lots of whitespace': { + topic: function(parse) { + return parse('Type: ruleset issue \nDomain: \t\t example.com \t'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the whitespace was trimmed': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }, + 'and we pass it a body with many newlines': { + topic: function(parse) { + return parse('\n\nType: ruleset issue\n\n\n\nDomain: example.com\n\n'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the newlines were ignored': function(err, obj) { + assert.equal(_.size(obj), 2); + } + }, + 'and we pass it a body that isn\'t a ruleset issue': { + topic: function(parse) { + return parse('Type: something else\nDomain: example.com'); + }, + 'it returns false': function(err, obj) { + assert.ifError(err); + assert.isFalse(obj); + } } } }).export(module); From 9ffe0ce7efc2857512dbd8db0d21cac147bfb1a4 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 01:59:08 -0500 Subject: [PATCH 07/96] Add issue template This template exactly matches what the bot will parse. --- .github/ISSUE_TEMPLATE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000000..2a7aac188c01 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,11 @@ + + + + +Type: ruleset issue +Type: new ruleset +Type: code issue +Type: feature request + + +Domain: From 151f47b5eea8e2733b3b8b8dcfd5d9ce3b1e8ea2 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 02:29:36 -0500 Subject: [PATCH 08/96] Make sure the parser can handle Markdown comments --- utils/issue-format-bot/test/parse-test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index 9f963a96e31b..df8e35386294 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -77,6 +77,23 @@ vows.describe('issue parser module').addBatch({ assert.equal(_.size(obj), 2); } }, + 'and we pass it a body with some Markdown comments': { + topic: function(parse) { + // TODO this should test for comments on the same line too, but see wooorm/strip-markdown#14 + return parse('\nType: ruleset issue\n\nDomain: example.com'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the object has the right data': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + }, + 'the object doesn\'t have a bunch of extra keys': function(err, obj) { + assert.equal(_.size(obj), 2); + } + }, 'and we pass it a body that isn\'t a ruleset issue': { topic: function(parse) { return parse('Type: something else\nDomain: example.com'); From 1b9d2dee9675c16029154d6e63ede5d0d70a40ec Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 03:08:39 -0500 Subject: [PATCH 09/96] Make the parser more strict about issue type --- utils/issue-format-bot/lib/parse.js | 4 +++- utils/issue-format-bot/test/parse-test.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 5484c15e9730..8d4d1b93530c 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -7,6 +7,8 @@ const strip = require('strip-markdown'), processor = remark().use(strip), _ = require('lodash'); +const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature request']; + module.exports = function(body) { const plaintext = String(processor.processSync(body)); @@ -17,7 +19,7 @@ module.exports = function(body) { // Filter result looks like [ [ 'Type', 'ruleset issue' ] ] const type = lines.filter(line => line[0] === 'type')[0][1]; - if (type !== 'ruleset issue') return false; + if (!validTypes.includes(type)) return false; let normalized = _.fromPairs(lines); diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index df8e35386294..768aa880d84a 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -94,7 +94,7 @@ vows.describe('issue parser module').addBatch({ assert.equal(_.size(obj), 2); } }, - 'and we pass it a body that isn\'t a ruleset issue': { + 'and we pass it a body that isn\'t a valid issue type': { topic: function(parse) { return parse('Type: something else\nDomain: example.com'); }, From 492501cd1676f61a6403d074e52fb349c3ba7b48 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 03:09:03 -0500 Subject: [PATCH 10/96] Sketch out a basic issue responder --- utils/issue-format-bot/index.js | 63 +++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index 189c99191a81..b922027a1911 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,10 +1,53 @@ -module.exports = (robot) => { - // Your plugin code here - console.log('Yay, the plugin was loaded!'); - - // For more information on building plugins: - // https://github.com/probot/probot/blob/master/docs/plugins.md - - // To get your plugin running against GitHub, see: - // https://github.com/probot/probot/blob/master/docs/development.md -}; +'use strict'; + +const _ = require('lodash'), + parse = require('./lib/parse'); + +module.exports = robot => { + console.log('HTTPS Everywhere ruleset parser started.'); + + // TODO parse issue edits too + robot.on('issues.opened', context => { + console.log('Issue #' + context.payload.number + ' created; responding.'); + + // Check if the "issue" is really a PR + // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. + if (_.has(context.payload, 'pull_request')) { + console.log('Issue is a Pull Request; aborting.'); + return; + } + + const data = parse(context.payload.body); + + // Check if the data isn't the right type + if (data === false) { + const params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); + return context.github.issues.createComment(params); + } + + let problems = []; + + // Validate that the user submitted all necessary data based on submission type + switch (data.type) { + case 'new rulest': + if (!data.domain) problems.push('Submission is missing domain information'); + break; + case 'ruleset issue': + if (!data.domain) problems.push('Submission is missing domain information'); + break; + } + + if (problems.length === 0) { + // User submission is OK + // TODO label things + // TODO it'd be nice if, once users edit their issue, we affirmatively say "you fixed it" + } else { + // Submit a comment telling them what the issues were + let comment = 'Thanks for your contribution to HTTPS Everywhere! '; + comment += 'Unfortunately, I wasn\'t able to understand your submission. '; + comment += 'Here are the problems I ran into:\n\n'; + problems.forEach(problem => comment += ` * ${problem}\n`); + comment += '\nIf you edit your issue, I\'ll try again and report back if I have problems again.'; + } + }); +}; From e28d62ee66c6d08a40154d2c415404a74ad34422 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 03:34:09 -0500 Subject: [PATCH 11/96] Fix index.js not finding webhook data --- utils/issue-format-bot/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index b922027a1911..bfc33a1dc711 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -8,16 +8,16 @@ module.exports = robot => { // TODO parse issue edits too robot.on('issues.opened', context => { - console.log('Issue #' + context.payload.number + ' created; responding.'); + console.log('Issue #' + context.payload.issue.number + ' created; responding.'); // Check if the "issue" is really a PR // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. - if (_.has(context.payload, 'pull_request')) { + if (_.has(context.payload.issue, 'pull_request')) { console.log('Issue is a Pull Request; aborting.'); return; } - const data = parse(context.payload.body); + const data = parse(context.payload.issue.body); // Check if the data isn't the right type if (data === false) { From dfd6b76532b95ffea8db14c2b8dcd07fde4fc67d Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 03:35:02 -0500 Subject: [PATCH 12/96] Test that the parser can handle null bodies Spoiler: it can't as of this commit. But it should. --- utils/issue-format-bot/test/parse-test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index 768aa880d84a..a557354d7d2f 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -102,6 +102,15 @@ vows.describe('issue parser module').addBatch({ assert.ifError(err); assert.isFalse(obj); } + }, + 'and we pass it a null body': { + topic: function(parse) { + return parse(''); + }, + 'it returns false': function(err, obj) { + assert.ifError(err); + assert.isFalse(obj); + } } } }).export(module); From a478a5e09b132d5f0f2cc4ba18f5b8faa1614891 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 8 Jul 2017 03:38:27 -0500 Subject: [PATCH 13/96] Use the Probot logger --- utils/issue-format-bot/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index bfc33a1dc711..648a60e091b7 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -4,16 +4,16 @@ const _ = require('lodash'), parse = require('./lib/parse'); module.exports = robot => { - console.log('HTTPS Everywhere ruleset parser started.'); + robot.log('HTTPS Everywhere ruleset parser started.'); // TODO parse issue edits too robot.on('issues.opened', context => { - console.log('Issue #' + context.payload.issue.number + ' created; responding.'); + robot.log('Issue #' + context.payload.issue.number + ' created; responding.'); // Check if the "issue" is really a PR // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. if (_.has(context.payload.issue, 'pull_request')) { - console.log('Issue is a Pull Request; aborting.'); + robot.log('Issue is a Pull Request; aborting.'); return; } From 4e4dfe5b428501b758823c8ad780532688ac9113 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 15 Jul 2017 02:15:46 -0700 Subject: [PATCH 14/96] Make parse-test use strict mode --- utils/issue-format-bot/test/parse-test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index a557354d7d2f..7881b422e60f 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -1,3 +1,5 @@ +'use strict'; + const vows = require('perjury'), assert = vows.assert, _ = require('lodash'); From 8800f3343f90c8bfdbc998820f5bc43e82d4f0ac Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 15 Jul 2017 02:16:02 -0700 Subject: [PATCH 15/96] Factor out the new issue handler This makes it much easier to test. --- utils/issue-format-bot/index.js | 46 ++---------------------- utils/issue-format-bot/lib/newissue.js | 49 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 44 deletions(-) create mode 100644 utils/issue-format-bot/lib/newissue.js diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index 648a60e091b7..2c0b461266bd 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,53 +1,11 @@ 'use strict'; const _ = require('lodash'), - parse = require('./lib/parse'); + newissue = require('./lib/newissue'); module.exports = robot => { robot.log('HTTPS Everywhere ruleset parser started.'); // TODO parse issue edits too - robot.on('issues.opened', context => { - robot.log('Issue #' + context.payload.issue.number + ' created; responding.'); - - // Check if the "issue" is really a PR - // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. - if (_.has(context.payload.issue, 'pull_request')) { - robot.log('Issue is a Pull Request; aborting.'); - return; - } - - const data = parse(context.payload.issue.body); - - // Check if the data isn't the right type - if (data === false) { - const params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); - return context.github.issues.createComment(params); - } - - let problems = []; - - // Validate that the user submitted all necessary data based on submission type - switch (data.type) { - case 'new rulest': - if (!data.domain) problems.push('Submission is missing domain information'); - break; - case 'ruleset issue': - if (!data.domain) problems.push('Submission is missing domain information'); - break; - } - - if (problems.length === 0) { - // User submission is OK - // TODO label things - // TODO it'd be nice if, once users edit their issue, we affirmatively say "you fixed it" - } else { - // Submit a comment telling them what the issues were - let comment = 'Thanks for your contribution to HTTPS Everywhere! '; - comment += 'Unfortunately, I wasn\'t able to understand your submission. '; - comment += 'Here are the problems I ran into:\n\n'; - problems.forEach(problem => comment += ` * ${problem}\n`); - comment += '\nIf you edit your issue, I\'ll try again and report back if I have problems again.'; - } - }); + robot.on('issues.opened', newissue(robot)); }; diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js new file mode 100644 index 000000000000..8acc75da7b73 --- /dev/null +++ b/utils/issue-format-bot/lib/newissue.js @@ -0,0 +1,49 @@ +'use strict'; + +const parse = require('./parse'); + +module.exports = function(robot) { + return context => { + robot.log('Issue #' + context.payload.issue.number + ' created; responding.'); + + // Check if the "issue" is really a PR + // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. + if (_.has(context.payload.issue, 'pull_request')) { + robot.log('Issue is a Pull Request; aborting.'); + return; + } + + const data = parse(context.payload.issue.body); + + // Check if the data isn't the right type + if (data === false) { + const params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); + return context.github.issues.createComment(params); + } + + let problems = []; + + // Validate that the user submitted all necessary data based on submission type + switch (data.type) { + case 'new rulest': + if (!data.domain) problems.push('Submission is missing domain information'); + break; + case 'ruleset issue': + if (!data.domain) problems.push('Submission is missing domain information'); + break; + } + + if (problems.length === 0) { + // User submission is OK + // TODO label things + // TODO it'd be nice if, once users edit their issue, we affirmatively say "you fixed it" + } else { + // Submit a comment telling them what the issues were + let comment = 'Thanks for your contribution to HTTPS Everywhere! '; + comment += 'Unfortunately, I wasn\'t able to understand your submission. '; + comment += 'Here are the problems I ran into:\n\n'; + problems.forEach(problem => comment += ` * ${problem}\n`); + comment += '\nIf you edit your issue, I\'ll try again and report back if I have problems again.'; + } + }; +}; From b4416dd9c33359baea54e2d53bd84d72ceca006d Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 15 Jul 2017 02:16:21 -0700 Subject: [PATCH 16/96] Start testing the new issue handler --- utils/issue-format-bot/test/mocks/robot.js | 7 +++++ .../test/newissue-handler-test.js | 30 +++++++++++++++++++ .../issue-format-bot/test/robot-mock-test.js | 21 +++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 utils/issue-format-bot/test/mocks/robot.js create mode 100644 utils/issue-format-bot/test/newissue-handler-test.js create mode 100644 utils/issue-format-bot/test/robot-mock-test.js diff --git a/utils/issue-format-bot/test/mocks/robot.js b/utils/issue-format-bot/test/mocks/robot.js new file mode 100644 index 000000000000..6b1c260c6c7d --- /dev/null +++ b/utils/issue-format-bot/test/mocks/robot.js @@ -0,0 +1,7 @@ +'use strict'; + +function noop() {}; + +module.exports = { + log: noop +}; diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js new file mode 100644 index 000000000000..64478894c12e --- /dev/null +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -0,0 +1,30 @@ +'use strict'; + +const vows = require('perjury'), + assert = vows.assert, + robot = require('./mocks/robot'); + +vows.describe('new issue handler').addBatch({ + 'When we require the module': { + topic: function() { + return require('../lib/newissue'); + }, + 'it works': function(err, newissue) { + assert.ifError(err); + }, + 'it\'s a function': function(err, newissue) { + assert.isFunction(newissue); + }, + 'and we initialize it with a robot': { + topic: function(newissue) { + return newissue(robot); + }, + 'it works': function(err, handler) { + assert.ifError(err); + }, + 'it returns a function': function(err, handler) { + assert.isFunction(handler); + } + } + } +}).export(module); diff --git a/utils/issue-format-bot/test/robot-mock-test.js b/utils/issue-format-bot/test/robot-mock-test.js new file mode 100644 index 000000000000..703e5ec7eba5 --- /dev/null +++ b/utils/issue-format-bot/test/robot-mock-test.js @@ -0,0 +1,21 @@ +'use strict'; + +const vows = require('perjury'), + assert = vows.assert; + +vows.describe('robot mock object').addBatch({ + 'When we require the module': { + topic: function() { + return require('./mocks/robot'); + }, + 'it works': function(err, robot) { + assert.ifError(err); + }, + 'it\'s an object': function(err, robot) { + assert.isObject(robot); + }, + 'we can call log() on it': function(err, robot) { + return robot.log('Hello, world!'); + } + } +}).export(module); From 9adee731969535adedea83b7da3ee0c75af6bf8e Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 15 Jul 2017 03:18:46 -0700 Subject: [PATCH 17/96] Start writing a context mock --- .../test/context-mock-test.js | 40 +++++++++++++++++++ utils/issue-format-bot/test/mocks/context.js | 15 +++++++ 2 files changed, 55 insertions(+) create mode 100644 utils/issue-format-bot/test/context-mock-test.js create mode 100644 utils/issue-format-bot/test/mocks/context.js diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js new file mode 100644 index 000000000000..66e22c57dbdf --- /dev/null +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -0,0 +1,40 @@ +const vows = require('perjury'), + assert = vows.assert, + _ = require('lodash'); + +function assertProp(prop, asserter) { + return function(err, context) { + assert.isTrue(_.has(context, prop)); + asserter(_.get(context, prop)); + }; +} + +vows.describe('context mock object').addBatch({ + 'When we require the module': { + topic: function() { + return require('./mocks/context'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s an object': function(err, makeContext) { + assert.isObject(makeContext); + }, + 'it has an issue() factory function': function(err, makeContext) { + assert.isFunction(makeContext.issue); + }, + 'and we call makeContext.issue()': { + topic: function(makeContext) { + return makeContext.issue(); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns an object': function(err, context) { + assert.isObject(context); + }, + 'context.payload.issue is an object': assertProp('payload.issue', assert.isObject), + 'context.payload.issue.number is a number': assertProp('payload.issue.number', assert.isNumber) + } + } +}).export(module); diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js new file mode 100644 index 000000000000..8133071a10dc --- /dev/null +++ b/utils/issue-format-bot/test/mocks/context.js @@ -0,0 +1,15 @@ +'use strict'; + +let issueNumber = 1; + +module.exports = { + issue() { + return { + payload: { + issue: { + number: issueNumber++ + } + } + }; + } +}; From e5a26f7ab6f963651b0b6b552303ce3e65a74f46 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 15 Jul 2017 03:22:08 -0700 Subject: [PATCH 18/96] Test new issue handler invocation with context --- .../issue-format-bot/test/newissue-handler-test.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 64478894c12e..3e3c4a89d9e1 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -2,7 +2,8 @@ const vows = require('perjury'), assert = vows.assert, - robot = require('./mocks/robot'); + robot = require('./mocks/robot'), + makeContext = require('./mocks/context'); vows.describe('new issue handler').addBatch({ 'When we require the module': { @@ -24,6 +25,16 @@ vows.describe('new issue handler').addBatch({ }, 'it returns a function': function(err, handler) { assert.isFunction(handler); + }, + 'and we pass it the context of a new issue': { + topic: function(handler) { + const context = makeContext.issue(); + + handler(context); + }, + 'it works': function(err) { + assert.ifError(); + } } } } From 3616173bc50e74cf969255edda55032933cb8966 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sat, 15 Jul 2017 03:23:21 -0700 Subject: [PATCH 19/96] Move Lodash require to the proper place --- utils/issue-format-bot/index.js | 3 +-- utils/issue-format-bot/lib/newissue.js | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index 2c0b461266bd..95a428102cbe 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,7 +1,6 @@ 'use strict'; -const _ = require('lodash'), - newissue = require('./lib/newissue'); +const newissue = require('./lib/newissue'); module.exports = robot => { robot.log('HTTPS Everywhere ruleset parser started.'); diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 8acc75da7b73..98f1d90fe795 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -1,6 +1,7 @@ 'use strict'; -const parse = require('./parse'); +const parse = require('./parse'), + _ = require('lodash'); module.exports = function(robot) { return context => { From 91075bcf3e627b8eecd4391a23f25a935c978541 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 02:06:01 -0400 Subject: [PATCH 20/96] Handle descriptions being blank --- utils/issue-format-bot/lib/newissue.js | 20 +++++++++++++++----- utils/issue-format-bot/lib/parse.js | 5 ++++- utils/issue-format-bot/test/parse-test.js | 10 ++++++---- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 98f1d90fe795..a173d0fd1590 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -16,11 +16,21 @@ module.exports = function(robot) { const data = parse(context.payload.issue.body); - // Check if the data isn't the right type - if (data === false) { - const params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); - return context.github.issues.createComment(params); - } + // Check if the data is problematic + if (data instanceof Error) { + // Dumb `switch` statement cases aren't technically blocks so saying `const params` in both of them causes redeclaration errors + let params; + switch (data.message) { + case 'invalid type': + params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); + return context.github.issues.createComment(params); + case 'null description': + params = context.issue({body: 'Hi! I can\'t find any text in your description - please edit it to use the issue template.'}); + return context.github.issues.createComment(params); + default: + throw data; + } + } let problems = []; diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 8d4d1b93530c..bf93a3077f9e 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -12,6 +12,9 @@ const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature reque module.exports = function(body) { const plaintext = String(processor.processSync(body)); + // Check if there's no description at all + if (plaintext.trim().length === 0) return new Error('null description'); + const lines = plaintext.split('\n') .filter(line => _.compact(line).length !== 0) .map(line => line.split(':').map(key => key.trim())) @@ -19,7 +22,7 @@ module.exports = function(body) { // Filter result looks like [ [ 'Type', 'ruleset issue' ] ] const type = lines.filter(line => line[0] === 'type')[0][1]; - if (!validTypes.includes(type)) return false; + if (!validTypes.includes(type)) return new Error('invalid type'); let normalized = _.fromPairs(lines); diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index 7881b422e60f..bc6b97bb4345 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -100,18 +100,20 @@ vows.describe('issue parser module').addBatch({ topic: function(parse) { return parse('Type: something else\nDomain: example.com'); }, - 'it returns false': function(err, obj) { + 'it returns the right error': function(err, obj) { assert.ifError(err); - assert.isFalse(obj); + assert.instanceOf(obj, Error); + assert.equal(obj.message, 'invalid type'); } }, 'and we pass it a null body': { topic: function(parse) { return parse(''); }, - 'it returns false': function(err, obj) { + 'it returns the right error': function(err, obj) { assert.ifError(err); - assert.isFalse(obj); + assert.instanceOf(obj, Error); + assert.equal(obj.message, 'null description'); } } } From f8c696a427dda1617270375307839ea112a1063a Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 02:06:32 -0400 Subject: [PATCH 21/96] Add some comments --- utils/issue-format-bot/lib/parse.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index bf93a3077f9e..8880d5ac8e57 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -9,12 +9,13 @@ const strip = require('strip-markdown'), const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature request']; -module.exports = function(body) { +module.exports = function parseDescription(body) { const plaintext = String(processor.processSync(body)); // Check if there's no description at all if (plaintext.trim().length === 0) return new Error('null description'); + // Split by newlines, filter blanks, split into trimmed key-value and lowercase everything const lines = plaintext.split('\n') .filter(line => _.compact(line).length !== 0) .map(line => line.split(':').map(key => key.trim())) @@ -24,6 +25,7 @@ module.exports = function(body) { if (!validTypes.includes(type)) return new Error('invalid type'); + // Convert to object let normalized = _.fromPairs(lines); return normalized; From 9617d329819136a3ead59c09a22e781e27033972 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 02:14:05 -0400 Subject: [PATCH 22/96] Fix an assert.ifError not actually passing err --- utils/issue-format-bot/test/newissue-handler-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 3e3c4a89d9e1..75cb42d77a53 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -33,7 +33,7 @@ vows.describe('new issue handler').addBatch({ handler(context); }, 'it works': function(err) { - assert.ifError(); + assert.ifError(err); } } } From 233f6d7553111387f7cb23e3ff9da1870978891c Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 03:08:42 -0400 Subject: [PATCH 23/96] Make .issue() in the context mock a Sinon spy --- utils/issue-format-bot/package.json | 1 + .../issue-format-bot/test/context-mock-test.js | 6 +++++- utils/issue-format-bot/test/mocks/context.js | 17 +++++++++-------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 7e1042f14b54..b1315080c7c3 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -22,6 +22,7 @@ "expect": "^1.20.2", "localtunnel": "^1.8.3", "perjury": "^0.4.3", + "sinon": "^2.4.1", "xo": "^0.18.2" }, "engines": { diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 66e22c57dbdf..e798ab193f77 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -34,7 +34,11 @@ vows.describe('context mock object').addBatch({ assert.isObject(context); }, 'context.payload.issue is an object': assertProp('payload.issue', assert.isObject), - 'context.payload.issue.number is a number': assertProp('payload.issue.number', assert.isNumber) + 'context.payload.issue.number is a number': assertProp('payload.issue.number', assert.isNumber), + 'context.issue() is a Sinon spy': function(err, context) { + assert.isFunction(context.issue); + assert.isDefined(context.issue.called); + } } } }).export(module); diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 8133071a10dc..a5143fc8fd59 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -1,15 +1,16 @@ 'use strict'; +const sinon = require('sinon'); + let issueNumber = 1; module.exports = { - issue() { - return { - payload: { - issue: { - number: issueNumber++ - } + issue: sinon.stub().returns({ + payload: { + issue: { + number: issueNumber++ } - }; - } + }, + issue: sinon.spy() + }) }; From b89e15e502664128cf83c30eebad3e7615b27682 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 03:29:43 -0400 Subject: [PATCH 24/96] Add a couple TODO comments --- utils/issue-format-bot/test/context-mock-test.js | 1 + utils/issue-format-bot/test/mocks/context.js | 1 + 2 files changed, 2 insertions(+) diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index e798ab193f77..45cb56970b58 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -23,6 +23,7 @@ vows.describe('context mock object').addBatch({ 'it has an issue() factory function': function(err, makeContext) { assert.isFunction(makeContext.issue); }, + // TODO test that issue numbers aren't the same 'and we call makeContext.issue()': { topic: function(makeContext) { return makeContext.issue(); diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index a5143fc8fd59..3e5b37c91466 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -8,6 +8,7 @@ module.exports = { issue: sinon.stub().returns({ payload: { issue: { + // TODO this doesn't actually work because of static .returns({}) number: issueNumber++ } }, From 6a57756526e3d6d93f49031bd90665c6dc9d4b57 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 03:36:40 -0400 Subject: [PATCH 25/96] Stub out context.github.issues.createComment() --- utils/issue-format-bot/test/context-mock-test.js | 15 +++++++++++---- utils/issue-format-bot/test/mocks/context.js | 5 +++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 45cb56970b58..a5588c7f7794 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -9,6 +9,13 @@ function assertProp(prop, asserter) { }; } +function assertSinonSpy(prop) { + return function(err, context) { + assert.isFunction(_.get(context, prop)); + assert.isDefined(_.get(context, prop).called); + }; +} + vows.describe('context mock object').addBatch({ 'When we require the module': { topic: function() { @@ -36,10 +43,10 @@ vows.describe('context mock object').addBatch({ }, 'context.payload.issue is an object': assertProp('payload.issue', assert.isObject), 'context.payload.issue.number is a number': assertProp('payload.issue.number', assert.isNumber), - 'context.issue() is a Sinon spy': function(err, context) { - assert.isFunction(context.issue); - assert.isDefined(context.issue.called); - } + 'context.github is an object': assertProp('github', assert.isObject), + 'context.github.issues is an object': assertProp('github.issues', assert.isObject), + 'context.github.issues.createComment is a Sinon spy': assertSinonSpy('github.issues.createComment'), + 'context.issue is a Sinon spy': assertSinonSpy('issue') } } }).export(module); diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 3e5b37c91466..d5fb3131bc88 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -12,6 +12,11 @@ module.exports = { number: issueNumber++ } }, + github: { + issues: { + createComment: sinon.spy() + } + }, issue: sinon.spy() }) }; From 78ab51484e0bf8f4f9a40e4d71a3ae90f832126a Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 03:38:22 -0400 Subject: [PATCH 26/96] Don't make the context issue factory a stub I was just being dumb. Obviously we want the functions _inside_ the returned context to be Sinon stubs, not the factory function itself. --- utils/issue-format-bot/test/mocks/context.js | 29 ++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index d5fb3131bc88..34da379b1b72 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -5,18 +5,19 @@ const sinon = require('sinon'); let issueNumber = 1; module.exports = { - issue: sinon.stub().returns({ - payload: { - issue: { - // TODO this doesn't actually work because of static .returns({}) - number: issueNumber++ - } - }, - github: { - issues: { - createComment: sinon.spy() - } - }, - issue: sinon.spy() - }) + issue() { + return { + payload: { + issue: { + number: issueNumber++ + } + }, + github: { + issues: { + createComment: sinon.spy() + } + }, + issue: sinon.spy() + }; + } }; From 1ffd5456a0e742cd5f78edbb92283a48446a5059 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 03:55:13 -0400 Subject: [PATCH 27/96] Add a TODO --- utils/issue-format-bot/lib/newissue.js | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index a173d0fd1590..a1d7ea66b293 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -32,6 +32,7 @@ module.exports = function(robot) { } } + // TODO push validation out to a separate module and test that separately let problems = []; // Validate that the user submitted all necessary data based on submission type From 8faa4cb9db1dd3928943e31ac95a63df30307f49 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 03:57:08 -0400 Subject: [PATCH 28/96] Allow mocking the body of issue contexts --- utils/issue-format-bot/test/context-mock-test.js | 3 ++- utils/issue-format-bot/test/mocks/context.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index a5588c7f7794..879f0b24284e 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -33,7 +33,7 @@ vows.describe('context mock object').addBatch({ // TODO test that issue numbers aren't the same 'and we call makeContext.issue()': { topic: function(makeContext) { - return makeContext.issue(); + return makeContext.issue('Hello world'); }, 'it works': function(err) { assert.ifError(err); @@ -43,6 +43,7 @@ vows.describe('context mock object').addBatch({ }, 'context.payload.issue is an object': assertProp('payload.issue', assert.isObject), 'context.payload.issue.number is a number': assertProp('payload.issue.number', assert.isNumber), + 'context.payload.issue.body is a string': assertProp('payload.issue.body', assert.isString), 'context.github is an object': assertProp('github', assert.isObject), 'context.github.issues is an object': assertProp('github.issues', assert.isObject), 'context.github.issues.createComment is a Sinon spy': assertSinonSpy('github.issues.createComment'), diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 34da379b1b72..897163adb34e 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -5,11 +5,12 @@ const sinon = require('sinon'); let issueNumber = 1; module.exports = { - issue() { + issue(body) { return { payload: { issue: { - number: issueNumber++ + number: issueNumber++, + body } }, github: { From 84bdd864ea135d7f9a10334fe65251d413d6f930 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 03:58:26 -0400 Subject: [PATCH 29/96] Test different kinds of incoming issues --- utils/issue-format-bot/lib/newissue.js | 2 +- .../test/newissue-handler-test.js | 53 ++++++++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index a1d7ea66b293..f058fc60e75a 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -37,7 +37,7 @@ module.exports = function(robot) { // Validate that the user submitted all necessary data based on submission type switch (data.type) { - case 'new rulest': + case 'new ruleset': if (!data.domain) problems.push('Submission is missing domain information'); break; case 'ruleset issue': diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 75cb42d77a53..7f6782c4e26a 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -26,15 +26,64 @@ vows.describe('new issue handler').addBatch({ 'it returns a function': function(err, handler) { assert.isFunction(handler); }, - 'and we pass it the context of a new issue': { + 'and we pass it the context of a new issue with a null body': { topic: function(handler) { - const context = makeContext.issue(); + const context = makeContext.issue(''); handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('can\'t find any text')); + } + }, + 'and we pass it the context of a new issue with a bad type': { + topic: function(handler) { + const context = makeContext.issue('Type: invalid'); + + handler(context); + + return context; }, 'it works': function(err) { assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); + } + }, + // Problematic bodies aren't tested here because that validation will eventually be refactored into another module and tested there + 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); } + // TODO useful tests here } } } From 29d1ec2474074bb1dfa47615d6278c872169ccba Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 04:09:29 -0400 Subject: [PATCH 30/96] Actually post the comment with problems --- utils/issue-format-bot/lib/newissue.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index f058fc60e75a..5dd83e7dbfd9 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -56,6 +56,9 @@ module.exports = function(robot) { comment += 'Here are the problems I ran into:\n\n'; problems.forEach(problem => comment += ` * ${problem}\n`); comment += '\nIf you edit your issue, I\'ll try again and report back if I have problems again.'; + const params = context.issue({body: comment}); + return context.github.issues.createComment(params); + } }; }; From e3062ec3d54e1cb9725d87266987fba043b7917c Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 04:10:25 -0400 Subject: [PATCH 31/96] Test problematic issue body handling --- .../test/newissue-handler-test.js | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 7f6782c4e26a..dcbd99ac7ff6 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -68,8 +68,24 @@ vows.describe('new issue handler').addBatch({ assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); } }, - // Problematic bodies aren't tested here because that validation will eventually be refactored into another module and tested there 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it doesn\'t comment': function(err, context) { + assert.isTrue(context.issue.notCalled); + } + // TODO useful tests here + }, + // Problematic bodies aren't tested extensively here because that validation will eventually be refactored into another module and tested there + 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': { topic: function(handler) { const context = makeContext.issue('Type: new ruleset'); @@ -82,8 +98,13 @@ vows.describe('new issue handler').addBatch({ }, 'it only creates one comment': function(err, context) { assert.isTrue(context.issue.calledOnce); + }, + 'it includes the problem': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('missing domain information')); } - // TODO useful tests here } } } From e1c6cab21cb1415b21e035abd77ee4b746919d22 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 04:15:30 -0400 Subject: [PATCH 32/96] Add package-lock.json --- utils/issue-format-bot/package-lock.json | 3366 ++++++++++++++++++++++ 1 file changed, 3366 insertions(+) create mode 100644 utils/issue-format-bot/package-lock.json diff --git a/utils/issue-format-bot/package-lock.json b/utils/issue-format-bot/package-lock.json new file mode 100644 index 000000000000..f306819dbfc3 --- /dev/null +++ b/utils/issue-format-bot/package-lock.json @@ -0,0 +1,3366 @@ +{ + "name": "issue-format-bot", + "version": "1.0.0", + "lockfileVersion": 1, + "dependencies": { + "acorn": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.1.tgz", + "integrity": "sha512-vOk6uEMctu0vQrvuSqFdJyqj1Q0S5VTDL79qtjo+DhRr+1mmaD+tluFSCZqhvi/JUhXSzoZN2BhtstaPEeE8cw==", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "agent-base": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", + "dependencies": { + "semver": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", + "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" + } + } + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "dev": true + }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", + "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true + } + } + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansicolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz", + "integrity": "sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8=" + }, + "ansistyles": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", + "integrity": "sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk=" + }, + "app-name": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/app-name/-/app-name-0.2.0.tgz", + "integrity": "sha1-yrGz/vWZ+LAB4IPkmzwnBe6Ardw=" + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=" + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-iterate": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-1.1.1.tgz", + "integrity": "sha1-hlv3+K851rCYLGCQKRSsdrwBCPY=" + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "arrayify-compact": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/arrayify-compact/-/arrayify-compact-0.2.0.tgz", + "integrity": "sha1-RZFw4VXKErtRRISDnJ1xUHyA7E0=" + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "async-array-reduce": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/async-array-reduce/-/async-array-reduce-0.2.1.tgz", + "integrity": "sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true + }, + "babel-code-frame": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", + "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", + "dev": true + }, + "bail": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.1.tgz", + "integrity": "sha1-kSV53os5Gq3zxf30zSoPwiXfO8I=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true + }, + "bl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", + "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true + }, + "bottleneck": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-1.16.0.tgz", + "integrity": "sha1-1s4TgIUnr8gLaQkvFWBmVeWyHxo=" + }, + "boxen": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.1.0.tgz", + "integrity": "sha1-sbad1SIwXoB6md7ud329blFnsQI=", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", + "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true + } + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=" + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=" + }, + "buf-compare": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", + "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", + "dev": true + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "bunyan": { + "version": "1.8.10", + "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.10.tgz", + "integrity": "sha1-IB/t0mxwgLYy9BYHL1OpC5pSmBw=" + }, + "bunyan-format": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/bunyan-format/-/bunyan-format-0.2.1.tgz", + "integrity": "sha1-pLOw2ABwqGUnlBcmnj8A/wL7y0c=", + "dependencies": { + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=" + } + } + }, + "bunyan-sentry-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bunyan-sentry-stream/-/bunyan-sentry-stream-1.1.0.tgz", + "integrity": "sha1-iLhYDONku54C2ZdHrToqPRLrdu4=", + "dependencies": { + "lodash": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", + "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=" + } + } + }, + "cache-manager": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/cache-manager/-/cache-manager-2.4.0.tgz", + "integrity": "sha1-Jy5O7jpOzrsoH8sIZJmATlmmolE=", + "dependencies": { + "lru-cache": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.0.tgz", + "integrity": "sha1-tcvwFVbBaWb+vlTO7A+03JDfbCg=" + } + } + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } + } + }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "ccount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.1.tgz", + "integrity": "sha1-ZlaHlFFowhjsd/9hpBVa4AInqWw=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "character-entities": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.0.tgz", + "integrity": "sha1-poPiz3Xb6LFxljUxNk5Y4YobFV8=" + }, + "character-entities-html4": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.0.tgz", + "integrity": "sha1-GrCFUdPOH6HfCNAPucod77FHoGw=" + }, + "character-entities-legacy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.0.tgz", + "integrity": "sha1-sYqtmPa3vMZGweTIH58ZVjdqVho=" + }, + "character-reference-invalid": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.0.tgz", + "integrity": "sha1-3smtHfufjQa0/NqircPE/ZevHmg=" + }, + "circular-json": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz", + "integrity": "sha1-vos2rvzN6LPKeqLWr8B6NyQsDS0=", + "dev": true + }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true + }, + "cli-width": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz", + "integrity": "sha1-sjTKIJsp72b8UY2bmNWEewDt8Ao=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "coffee-script": { + "version": "1.12.6", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.6.tgz", + "integrity": "sha1-KFo/cRVokGUGTWv570Vy22ZpXL8=", + "dev": true + }, + "collapse-white-space": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.3.tgz", + "integrity": "sha1-S5BvZw5aljqHt2sOFolkM0G2Ajw=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true + }, + "configstore": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.0.tgz", + "integrity": "sha1-Rd+QcHPibfoc9LLVL1tgVF6qEdE=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "core-assert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", + "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", + "dev": true + }, + "core-js": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true + }, + "cross-spawn-async": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz", + "integrity": "sha1-hF/wwINKPe2dFg2sptOQkGuyiMw=", + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true + }, + "crypto-random-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", + "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", + "dev": true + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true + }, + "cwd": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", + "integrity": "sha1-FyQAaUBXwioTsM8WFix+S3p/5Wc=" + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=" + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-assign": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", + "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", + "dev": true + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "deep-strict-equal": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz", + "integrity": "sha1-SgeBR6irV/ag1PVUckPNIvROtOQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "dependencies": { + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "diff": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.0.tgz", + "integrity": "sha512-w0XZubFWn0Adlsapj9EAWX0FqWdO4tz8kc3RiYdWLh4k/V8PTb6i0SMgXt0vRM3zyKnT8tKO7mUlieRQHIjMNg==", + "dev": true + }, + "doctrine": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", + "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", + "dev": true + }, + "dot-prop": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.1.1.tgz", + "integrity": "sha1-qEk/C3te7sglJbXHWH+n3nyoWcE=", + "dev": true + }, + "dotenv": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", + "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" + }, + "dtrace-provider": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.3.tgz", + "integrity": "sha1-uhv8ZJMoXM/PxqtpzVxh10wqQ78=", + "optional": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=" + }, + "enhance-visitors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/enhance-visitors/-/enhance-visitors-1.0.0.tgz", + "integrity": "sha1-qpRdBdpGVnKh69OP7i7T2oUY6Vo=", + "dev": true + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=" + }, + "es-abstract": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.7.0.tgz", + "integrity": "sha1-363ndOAb/Nl/lhgCmMRJyGI/uUw=", + "dev": true + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true + }, + "es5-ext": { + "version": "0.10.23", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz", + "integrity": "sha1-dXi1G+l0IHpUh4IbVlOMIk5Oezg=", + "dev": true + }, + "es6-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", + "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "dev": true + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true + }, + "eslint": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", + "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "dev": true + }, + "eslint-config-probot": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-probot/-/eslint-config-probot-0.1.0.tgz", + "integrity": "sha1-Mw+4aGy1O/G5yKOsIlRhxEANT6k=", + "dev": true + }, + "eslint-config-xo": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.18.2.tgz", + "integrity": "sha1-ChVxIIdWGZKec1/9axhcQeihh68=", + "dev": true + }, + "eslint-formatter-pretty": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-1.1.0.tgz", + "integrity": "sha1-q00G2gL+2ME66fDcVApDPvftb14=", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", + "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true + } + } + }, + "eslint-import-resolver-node": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz", + "integrity": "sha512-yUtXS15gIcij68NmXmP9Ni77AQuCN0itXbCc/jWd8C6/yKZaSNXicpC8cgvjnxVdmfsosIXrjpzFq7GcDryb6A==", + "dev": true + }, + "eslint-module-utils": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", + "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", + "dev": true + }, + "eslint-plugin-ava": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-4.2.1.tgz", + "integrity": "sha1-fNtegbx3n0gz1HIKYJPl9KbKGRM=", + "dev": true + }, + "eslint-plugin-import": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz", + "integrity": "sha512-HGYmpU9f/zJaQiKNQOVfHUh2oLWW3STBrCgH0sHTX1xtsxYlH1zjLh8FlQGEIdZSdTbUMaV36WaZ6ImXkenGxQ==", + "dev": true, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true + } + } + }, + "eslint-plugin-no-use-extend-native": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.3.12.tgz", + "integrity": "sha1-OtmgDC3yO11/f2vpFVCYWkq3Aeo=", + "dev": true + }, + "eslint-plugin-promise": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz", + "integrity": "sha1-ePu2/+BHIBYnVp6FpsU3OvKmj8o=", + "dev": true + }, + "eslint-plugin-unicorn": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-2.1.2.tgz", + "integrity": "sha1-md/+n0dzsEvDk1an/r1k3XACdLw=", + "dev": true + }, + "espree": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.4.3.tgz", + "integrity": "sha1-KRC1zNSc6JPC//+qtP2LOjG4I3Q=", + "dev": true + }, + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + }, + "espurify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", + "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", + "dev": true + }, + "esquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", + "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true + }, + "execa": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.4.0.tgz", + "integrity": "sha1-TrZGejaglfq7KXD/nV4/t7zm68M=", + "dev": true + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=" + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=" + }, + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=" + }, + "expect": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-1.20.2.tgz", + "integrity": "sha1-1Fj+TFYAQDa64yMkFqP2Nh8E+WU=", + "dev": true + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=" + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=" + }, + "extsprintf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=" + }, + "find-file-up": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-0.1.3.tgz", + "integrity": "sha1-z2gJG8+fMApA2kEbN9pczlovvqA=" + }, + "find-pkg": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/find-pkg/-/find-pkg-0.1.2.tgz", + "integrity": "sha1-G9wiwG42NlUy4qJIBGhUuXiNpVc=" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=" + }, + "flat-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz", + "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=", + "dev": true + }, + "follow-redirects": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-0.0.7.tgz", + "integrity": "sha1-NLkLqyqRGqNHVx2pDyK9NuzYqRk=" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=" + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true + }, + "formatio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", + "dev": true + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-set-props": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-set-props/-/get-set-props-0.1.0.tgz", + "integrity": "sha1-mYR1wXhEVobQsyJG2l3428++jqM=", + "dev": true + }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "github": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/github/-/github-9.2.0.tgz", + "integrity": "sha1-iohtxA3WNjZwfcr5nfPfJsWfFvw=" + }, + "github-app": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/github-app/-/github-app-3.0.0.tgz", + "integrity": "sha512-L4Flp85a4dHn67foggk7NDALwcP30/VB+9L3bSS07QG4Id3lMWiPBF2UZv9l1Kr+VLvFTCnfEiqikzfpt0L5+w==" + }, + "github-webhook-handler": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/github-webhook-handler/-/github-webhook-handler-0.6.0.tgz", + "integrity": "sha1-CYHJOMFjWZBkoMVeadyp4hOTxpY=" + }, + "glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=" + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=" + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=" + }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=" + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=" + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true + }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true + }, + "has-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-0.1.1.tgz", + "integrity": "sha1-omHEwqbGZ+DHe3AKfyl8Oe86pYk=" + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=" + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true + }, + "https-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=" + }, + "ignore": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz", + "integrity": "sha1-QyNS5XrM2HqzEQ6C0/6g5HgSFW0=", + "dev": true + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "import-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-1.1.0.tgz", + "integrity": "sha1-dI23nFzEK7lwHvq0JPiU5yYA6dw=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "dev": true + }, + "interpret": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", + "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "irregular-plurals": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.3.0.tgz", + "integrity": "sha512-njf5A+Mxb3kojuHd1DzISjjIl+XhyzovXEOyPPSzdQozq/Lf2tN27mOrAAsxEPZxpn6I4MGzs1oo9TxXxPFpaA==", + "dev": true + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=" + }, + "is-alphabetical": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.0.tgz", + "integrity": "sha1-4lRMEwWCVfIUTLdXBmzTNCocjEY=" + }, + "is-alphanumeric": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz", + "integrity": "sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ=" + }, + "is-alphanumerical": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.0.tgz", + "integrity": "sha1-4GSS5xnBvxXewjnk8a9fZ7TW578=" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-arrow-function": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-arrow-function/-/is-arrow-function-2.0.3.tgz", + "integrity": "sha1-Kb4sLY2UUIUri7r7Y1unuNjofsI=", + "dev": true + }, + "is-boolean-object": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.0.0.tgz", + "integrity": "sha1-mPiygDBoQhmpXzdc+9iM40Bd/5M=", + "dev": true + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true + }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-decimal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.0.tgz", + "integrity": "sha1-lAV5tupjxigICmnmK9qIyEcLT+A=" + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/is-equal/-/is-equal-1.5.5.tgz", + "integrity": "sha1-XoXxlX4FKIMkf+s4aWWju6Ffuz0=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=" + }, + "is-error": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.1.tgz", + "integrity": "sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true + }, + "is-generator-function": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.6.tgz", + "integrity": "sha1-nnFlPNFf/zQcecQVFGChMdMen8Q=", + "dev": true + }, + "is-get-set-prop": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-get-set-prop/-/is-get-set-prop-1.0.0.tgz", + "integrity": "sha1-JzGHfk14pqae3M5rudaLB3nnYxI=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=" + }, + "is-hexadecimal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.0.tgz", + "integrity": "sha1-XEWXcdKvmi45Ungf1U/LG8/kETw=" + }, + "is-js-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-js-type/-/is-js-type-2.0.0.tgz", + "integrity": "sha1-c2FwBtZZtOtHKbunR9KHgt8PfiI=", + "dev": true + }, + "is-my-json-valid": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz", + "integrity": "sha1-8Hndm/2uZe4gOKrorLyGqxCeNpM=", + "dev": true + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=" + }, + "is-number-object": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.3.tgz", + "integrity": "sha1-8mWrian0RQNO9q/xWo8AsA9VF5k=", + "dev": true + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-obj-prop": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-obj-prop/-/is-obj-prop-1.0.0.tgz", + "integrity": "sha1-s03nnEULjXxzqyzfZ9yHWtuF+A4=", + "dev": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-proto-prop": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-proto-prop/-/is-proto-prop-1.0.0.tgz", + "integrity": "sha1-s5UflcCJkk+11PzaZUKrPoPisiA=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=" + }, + "is-resolvable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-string": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.4.tgz", + "integrity": "sha1-zDqbaYV9Yh6WNyWiTK7shzuCbmQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=" + }, + "is-whitespace-character": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.0.tgz", + "integrity": "sha1-u/SoN2Tq0NRRvsKlUhjpGWGtwnU=" + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" + }, + "is-word-character": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.0.tgz", + "integrity": "sha1-o6nl3a1wxcLuNvSpz8mlP0RTUkc=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isemail": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", + "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "joi": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", + "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-types": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz", + "integrity": "sha1-0kLmSU7Vcq08koCfyL7X92h8vwM=", + "dev": true + }, + "js-yaml": { + "version": "3.8.4", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.4.tgz", + "integrity": "sha1-UgtFZPhlc7qWZir4Woyvp7S1pvY=", + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsonwebtoken": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.1.tgz", + "integrity": "sha1-fKMk9SFfi+A5zTWmxFu4y3SkSPs=" + }, + "jsprim": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", + "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=" + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true + }, + "lazy-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=" + }, + "load-pkg": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/load-pkg/-/load-pkg-3.0.1.tgz", + "integrity": "sha1-kjCzfsBOVpADBgvFiVHj7VCNWU8=" + }, + "load-plugins": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/load-plugins/-/load-plugins-2.1.2.tgz", + "integrity": "sha1-4A/99F4gZ7oYj8oEU+twPwSadtA=" + }, + "localtunnel": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.8.3.tgz", + "integrity": "sha1-3MWSL9hWUQN9S94k/ZMkjQsk6wU=", + "dev": true + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=" + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.cond": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", + "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", + "dev": true + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", + "dev": true + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true + }, + "lolex": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", + "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "dev": true + }, + "longest-streak": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.1.tgz", + "integrity": "sha1-QtKRtUEeQDZcAOYxk0l+IkcxbjU=" + }, + "lookup-path": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/lookup-path/-/lookup-path-0.3.1.tgz", + "integrity": "sha1-pO8kEK4yZpr3AMTLfhsBCVCc8rg=" + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true + }, + "lsmod": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", + "integrity": "sha1-mgD3bco26yP6BTUK/htYXUKZ5ks=" + }, + "make-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.0.0.tgz", + "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "markdown-escapes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.0.tgz", + "integrity": "sha1-yMoZ8dlNaCRZ4Kk8htsnp+9xayM=" + }, + "markdown-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.0.tgz", + "integrity": "sha1-H1rmFlnO2ICNiCVUwy6LPzjdEUM=" + }, + "matched": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", + "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=" + }, + "mdast-util-compact": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.1.tgz", + "integrity": "sha1-zbX4TitqLTEU3zO9BdnLMuPECDo=" + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true + } + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=" + }, + "mime": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz", + "integrity": "sha1-WR2E02U6awtKO5343lqoEI5y5eA=" + }, + "mime-db": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=" + }, + "moment": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", + "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "dev": true + }, + "mv": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", + "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", + "optional": true, + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "optional": true + }, + "rimraf": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", + "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", + "optional": true + } + } + }, + "nan": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", + "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=", + "optional": true + }, + "native-promise-only": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "optional": true + }, + "netrc": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/netrc/-/netrc-0.1.4.tgz", + "integrity": "sha1-a+lPysqNd63gqWcNxGCRTJRHJEQ=" + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=" + }, + "npm-run-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-1.0.0.tgz", + "integrity": "sha1-9cMr9ZX+ga6Sfa7FLoL4sACsPI8=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "obj-props": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/obj-props/-/obj-props-1.1.0.tgz", + "integrity": "sha1-YmMT+qRCvv1KROmgLDy2vek3tRE=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-inspect": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.2.2.tgz", + "integrity": "sha1-yCEV5PzIiK6hTWTCLk8X9qcNXlo=", + "dev": true + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", + "dev": true + }, + "object.entries": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz", + "integrity": "sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8=", + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "openurl": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", + "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=", + "dev": true + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=" + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=" + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true + }, + "parse-entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.1.1.tgz", + "integrity": "sha1-gRLYhHExnyerrk1klksSL+ThuJA=" + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=" + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=" + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-1.0.0.tgz", + "integrity": "sha1-XVPVeAGWRsDWiADbThRua9wqx68=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true + }, + "perjury": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/perjury/-/perjury-0.4.3.tgz", + "integrity": "sha1-DX1rxAH7LtULWISudckYwmZtQEw=", + "dev": true, + "dependencies": { + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, + "yargs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-5.0.0.tgz", + "integrity": "sha1-M1UUSXfQV1fbuG1uOOwFYSOzpm4=", + "dev": true + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true + }, + "pkg-conf": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.0.0.tgz", + "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=" + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true + } + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true + }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "dev": true + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "probot": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/probot/-/probot-0.7.4.tgz", + "integrity": "sha512-yoFCu0oZ26UUrlD0D0ckgBRw3OS+gE0gw938AfcTAs2x6zxY8J6FcQcfQ/a66pXIEawHPXlwkb2amMOg05UTzg==", + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + } + } + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, + "promise-events": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/promise-events/-/promise-events-0.1.3.tgz", + "integrity": "sha1-VyzKwrr4Joueup8zf1a+PIGB8n0=" + }, + "proto-props": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/proto-props/-/proto-props-0.2.1.tgz", + "integrity": "sha1-XgHcJnWg3pq/p255nfozTW9IP0s=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=" + } + } + }, + "raven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/raven/-/raven-2.1.0.tgz", + "integrity": "sha1-G2JOVjdNnJ2Tx0RIRhoqNWzjdSc=", + "dependencies": { + "uuid": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", + "integrity": "sha1-Zyj8BFnEUNeWqZwxg3VpvfZy1yg=" + } + } + }, + "rc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", + "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", + "dev": true, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true + }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "dev": true + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true + }, + "regex-cache": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=" + }, + "registry-auth-token": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", + "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "dev": true + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true + }, + "remark": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/remark/-/remark-7.0.1.tgz", + "integrity": "sha1-pd5NrPq/D2CkmCbvJMR5gH+QS/s=" + }, + "remark-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-3.0.1.tgz", + "integrity": "sha1-G5+EGkTY9PvyJGhQJlRZpOs1TIA=" + }, + "remark-stringify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-3.0.1.tgz", + "integrity": "sha1-eSQr6+CnUggbWAlRb6DAbt7Aac8=" + }, + "remove-trailing-separator": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", + "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } + } + }, + "resolve": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", + "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=" + }, + "resolve-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-1.0.0.tgz", + "integrity": "sha1-Tq7qQe0EDRcCRX32SkKysH0kb58=", + "dev": true + }, + "resolve-dep": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/resolve-dep/-/resolve-dep-0.6.0.tgz", + "integrity": "sha1-Zz8UQed3hS/WrYE2XOfV2FRVpPs=" + }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=" + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "dev": true + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "dev": true + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safe-json-stringify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.0.4.tgz", + "integrity": "sha1-gaCY9Efku8P/MxKiQ1IbwGDvWRE=", + "optional": true + }, + "samsam": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.2.1.tgz", + "integrity": "sha1-7dOQk6MYQ3DLhZJDsr3yVefY6mc=", + "dev": true + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-getter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=" + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sinon": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.4.1.tgz", + "integrity": "sha512-vFTrO9Wt0ECffDYIPSP/E5bBugt0UjcBQOfQUMh66xzkyPEnhl/vM2LRZi2ajuTdkH07sA6DzrM6KvdvGIH8xw==", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "stack-trace": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", + "integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=" + }, + "state-toggle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.0.tgz", + "integrity": "sha1-0g+aYWu08MO5i5GSLSW2QKorxCU=" + }, + "stream-consume": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true + }, + "stringify-entities": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.1.tgz", + "integrity": "sha1-sVDsLXKsTBtfMktR+2soyc3/BYw=" + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "dependencies": { + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + } + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "strip-markdown": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-markdown/-/strip-markdown-3.0.0.tgz", + "integrity": "sha1-yHs8YtLUX2b47Lv1MkkCnv4SLJU=" + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", + "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true + } + } + }, + "term-size": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-0.1.1.tgz", + "integrity": "sha1-hzYLljlsq1dgljcUzaDQy+7K2co=", + "dev": true + }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "the-argv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/the-argv/-/the-argv-1.0.0.tgz", + "integrity": "sha1-AIRwUAVzDdhNt1UlPJMa45jblSI=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "tmatch": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tmatch/-/tmatch-2.0.1.tgz", + "integrity": "sha1-DFYkbzPzDaG409colauvFmYPOM8=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=" + }, + "topo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", + "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=" + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "dev": true + }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-trailing-lines": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.0.tgz", + "integrity": "sha1-eu+7eAjfnWafbaLkOMrIxGradoQ=" + }, + "trough": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.0.tgz", + "integrity": "sha1-a97f5/KqSabzxDIldodVWVfzQv0=" + }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true + }, + "type-detect": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.3.tgz", + "integrity": "sha1-Dj8mcLRAmbC0bChNE2p+9Jx0wuo=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, + "unherit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.0.tgz", + "integrity": "sha1-a5qu379z3xdWrZ4xbdmBiFhAzX0=" + }, + "unified": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/unified/-/unified-6.1.5.tgz", + "integrity": "sha1-cWk3hyYhpjE15iztLzrGoGPG+4c=" + }, + "unique-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", + "dev": true + }, + "unist-util-modify-children": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-1.1.1.tgz", + "integrity": "sha1-ZtfmpEnm9nIguXarPLi166w55R0=" + }, + "unist-util-remove-position": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.1.tgz", + "integrity": "sha1-WoXBVV/BugwQG4ZwfRXlD6TIcbs=" + }, + "unist-util-stringify-position": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.1.tgz", + "integrity": "sha1-PMvcU2ee7W7PN3fdf14yKcG2qjw=" + }, + "unist-util-visit": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.1.3.tgz", + "integrity": "sha1-7CaOcxudJ3p5pbWqBkOZDkBdYAs=" + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "update-notifier": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.2.0.tgz", + "integrity": "sha1-G1g3z5DAc22IYncytmHBOPht5y8=", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true + }, + "verror": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "dev": true + }, + "vfile": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.1.0.tgz", + "integrity": "sha1-086Lgl57jVO4lhZDQSczgZNvAr0=" + }, + "vfile-location": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.1.tgz", + "integrity": "sha1-C/iBb3MrD4vZAqVv2kxiyOk13FI=" + }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=" + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "widest-line": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", + "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "dev": true + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true + }, + "write-file-atomic": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.1.0.tgz", + "integrity": "sha512-0TZ20a+xcIl4u0+Mj5xDH2yOWdmQiXlKf9Hm+TgDXjTMsEYb+gDrmb8e8UNAzMCitX8NBqG4Z/FUQIyzv/R1JQ==", + "dev": true + }, + "write-json-file": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.2.0.tgz", + "integrity": "sha1-UYYlBruzthnu+reFnx/WxtBTCHY=", + "dev": true + }, + "write-pkg": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-2.1.0.tgz", + "integrity": "sha1-NTqkTDnEjCFED1wIzmq9RhQcnAg=", + "dev": true + }, + "x-is-function": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/x-is-function/-/x-is-function-1.0.4.tgz", + "integrity": "sha1-XSlNw9Joy90GJYDgxd93o5HR+h4=" + }, + "x-is-string": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", + "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=" + }, + "xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", + "dev": true + }, + "xo": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.18.2.tgz", + "integrity": "sha1-kqQusCpPsUnf6lUYAhkU9arIT/A=", + "dev": true, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + } + } + }, + "xo-init": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xo-init/-/xo-init-0.5.0.tgz", + "integrity": "sha1-jijex5Z2zF4EL95f2PcQ4mRrDjY=", + "dev": true, + "dependencies": { + "execa": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.5.1.tgz", + "integrity": "sha1-3j+4XLjW6RyFvLzrFkWBeFy1ezY=", + "dev": true + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + } + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "3.29.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.29.0.tgz", + "integrity": "sha1-GquWYOrnnYuPZ1vK7qtu40ws9pw=", + "dev": true + }, + "yargs-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-3.2.0.tgz", + "integrity": "sha1-UIE1XRnZ0MjF2BrakIy05tGGZk8=", + "dev": true, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } + } + } +} From 704ed82b2fcfa9f365c70a075f98f054aa540427 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 15:50:48 -0400 Subject: [PATCH 33/96] Factor out validation into a different module --- utils/issue-format-bot/lib/newissue.js | 13 +------ utils/issue-format-bot/lib/validate.js | 17 +++++++++ utils/issue-format-bot/test/validate-test.js | 40 ++++++++++++++++++++ 3 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 utils/issue-format-bot/lib/validate.js create mode 100644 utils/issue-format-bot/test/validate-test.js diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 5dd83e7dbfd9..a6127de8ff68 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -1,6 +1,7 @@ 'use strict'; const parse = require('./parse'), + validate = require('./validate'), _ = require('lodash'); module.exports = function(robot) { @@ -33,17 +34,7 @@ module.exports = function(robot) { } // TODO push validation out to a separate module and test that separately - let problems = []; - - // Validate that the user submitted all necessary data based on submission type - switch (data.type) { - case 'new ruleset': - if (!data.domain) problems.push('Submission is missing domain information'); - break; - case 'ruleset issue': - if (!data.domain) problems.push('Submission is missing domain information'); - break; - } + const problems = validate(data); if (problems.length === 0) { // User submission is OK diff --git a/utils/issue-format-bot/lib/validate.js b/utils/issue-format-bot/lib/validate.js new file mode 100644 index 000000000000..a9dda07e2aee --- /dev/null +++ b/utils/issue-format-bot/lib/validate.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = function validate(data) { + const problems = []; + + // Validate that the user submitted all necessary data based on submission type + switch (data.type) { + case 'new ruleset': + if (!data.domain) problems.push('Submission is missing domain information'); + break; + case 'ruleset issue': + if (!data.domain) problems.push('Submission is missing domain information'); + break; + } + + return problems; +} diff --git a/utils/issue-format-bot/test/validate-test.js b/utils/issue-format-bot/test/validate-test.js new file mode 100644 index 000000000000..9c7f5c9027ac --- /dev/null +++ b/utils/issue-format-bot/test/validate-test.js @@ -0,0 +1,40 @@ +'use strict'; + +const vows = require('perjury'), + assert = vows.assert; + +function missingRequiredDomain(type) { + return { + topic: function(validate) { + return validate({ + type + }); + }, + 'it returns an array': function(err, problems) { + assert.ifError(err); + assert.isArray(problems); + }, + 'the array has only one problem': function(err, problems) { + assert.equal(problems.length, 1); + }, + 'the array has a missing domain problem': function(err, problems) { + assert.isTrue(problems[0].includes('missing domain')); + } + }; +} + +vows.describe('data validator module').addBatch({ + 'When we require the module': { + topic: function() { + return require('../lib/validate'); + }, + 'it works': function(err, validate) { + assert.ifError(err); + }, + 'it\'s a function': function(err, validate) { + assert.isFunction(validate); + }, + 'and we pass it a new ruleset without a domain': missingRequiredDomain('new ruleset'), + 'and we pass it a ruleset issue without a domain': missingRequiredDomain('ruleset issue') + } +}).export(module); From adf46390e0b28632ec312d70a7e61f5d34588598 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 15:57:44 -0400 Subject: [PATCH 34/96] Test validation of correct issues --- utils/issue-format-bot/test/validate-test.js | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/utils/issue-format-bot/test/validate-test.js b/utils/issue-format-bot/test/validate-test.js index 9c7f5c9027ac..e36a1b5d3d86 100644 --- a/utils/issue-format-bot/test/validate-test.js +++ b/utils/issue-format-bot/test/validate-test.js @@ -23,6 +23,24 @@ function missingRequiredDomain(type) { }; } +function hasRequiredDomain(type) { + return { + topic: function(validate) { + return validate({ + type, + domain: 'example.com' + }); + }, + 'it returns an array': function(err, problems) { + assert.ifError(err); + assert.isArray(problems); + }, + 'the array has no problems': function(err, problems) { + assert.equal(problems.length, 0); + } + }; +} + vows.describe('data validator module').addBatch({ 'When we require the module': { topic: function() { @@ -35,6 +53,8 @@ vows.describe('data validator module').addBatch({ assert.isFunction(validate); }, 'and we pass it a new ruleset without a domain': missingRequiredDomain('new ruleset'), - 'and we pass it a ruleset issue without a domain': missingRequiredDomain('ruleset issue') + 'and we pass it a ruleset issue without a domain': missingRequiredDomain('ruleset issue'), + 'and we pass it a new ruleset with a domain': hasRequiredDomain('new ruleset'), + 'and we pass it a ruleset issue with a domain': hasRequiredDomain('ruleset issue') } }).export(module); From 8d2465773d2004778ca9161c5297470c4d78c1e0 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 17:16:47 -0400 Subject: [PATCH 35/96] Remove outdated TODO --- utils/issue-format-bot/lib/newissue.js | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index a6127de8ff68..91228eafe2c6 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -33,7 +33,6 @@ module.exports = function(robot) { } } - // TODO push validation out to a separate module and test that separately const problems = validate(data); if (problems.length === 0) { From e5673d74fb98daa9d5bf6c52acd283ad5b98c896 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 17:28:13 -0400 Subject: [PATCH 36/96] Support issue edits --- utils/issue-format-bot/index.js | 2 + utils/issue-format-bot/lib/issueedit.js | 56 +++++++++ .../test/issueedit-handler-test.js | 112 ++++++++++++++++++ 3 files changed, 170 insertions(+) create mode 100644 utils/issue-format-bot/lib/issueedit.js create mode 100644 utils/issue-format-bot/test/issueedit-handler-test.js diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index 95a428102cbe..eaf10ba884b1 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,10 +1,12 @@ 'use strict'; const newissue = require('./lib/newissue'); +const issueedit = require('./lib/issueedit'); module.exports = robot => { robot.log('HTTPS Everywhere ruleset parser started.'); // TODO parse issue edits too robot.on('issues.opened', newissue(robot)); + robot.on('issues.edited', issueedit(robot)); }; diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js new file mode 100644 index 000000000000..ae7052d3f542 --- /dev/null +++ b/utils/issue-format-bot/lib/issueedit.js @@ -0,0 +1,56 @@ +'use strict'; + +const parse = require('./parse'), + validate = require('./validate'), + _ = require('lodash'); + +// TODO make this share more with newissue.js? +// TODO test this module + +module.exports = function(robot) { + return context => { + robot.log('Issue #' + context.payload.issue.number + ' edited; responding.'); + + // Check if the "issue" is really a PR + // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. + if (_.has(context.payload.issue, 'pull_request')) { + robot.log('Issue is a Pull Request; aborting.'); + return; + } + + const data = parse(context.payload.issue.body); + + // Check if the data is problematic + if (data instanceof Error) { + // Dumb `switch` statement cases aren't technically blocks so saying `const params` in both of them causes redeclaration errors + let params; + switch (data.message) { + case 'invalid type': + params = context.issue({body: 'Sorry, I still couldn\'t understand the type of issue you specified. Did you look at the issue template?\n\nPlease try again.'}); + return context.github.issues.createComment(params); + case 'null description': + params = context.issue({body: 'I still don\'t see any text in your description - please edit it to use the issue template. Thank you!'}); + return context.github.issues.createComment(params); + default: + throw data; + } + } + + const problems = validate(data); + + if (problems.length === 0) { + // User submission is OK + // TODO label things + } else { + // Submit a comment telling them what the issues were + let comment = 'Thanks for editing!\n\n'; + comment += 'I\'m sorry, but I still couldn\'t to understand your submission. '; + comment += 'Here are the problems I ran into this time:\n\n'; + problems.forEach(problem => comment += ` * ${problem}\n`); + comment += '\nIf you edit your issue again, I\'ll try again and report back if I have problems again.'; + const params = context.issue({body: comment}); + return context.github.issues.createComment(params); + + } + }; +}; diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js new file mode 100644 index 000000000000..70749f03ec3d --- /dev/null +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -0,0 +1,112 @@ +'use strict'; + +const vows = require('perjury'), + assert = vows.assert, + robot = require('./mocks/robot'), + makeContext = require('./mocks/context'); + +// TODO make this share code with newissue-handler-test + +vows.describe('issue edit handler').addBatch({ + 'When we require the module': { + topic: function() { + return require('../lib/issueedit'); + }, + 'it works': function(err, newissue) { + assert.ifError(err); + }, + 'it\'s a function': function(err, newissue) { + assert.isFunction(newissue); + }, + 'and we initialize it with a robot': { + topic: function(newissue) { + return newissue(robot); + }, + 'it works': function(err, handler) { + assert.ifError(err); + }, + 'it returns a function': function(err, handler) { + assert.isFunction(handler); + }, + 'and we pass it the context of an issue edit with a null body': { + topic: function(handler) { + const context = makeContext.issue(''); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('don\'t see any text')); + } + }, + 'and we pass it the context of a issue edit with a bad type': { + topic: function(handler) { + const context = makeContext.issue('Type: invalid'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); + } + }, + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it doesn\'t comment': function(err, context) { + assert.isTrue(context.issue.notCalled); + } + // TODO useful tests here + }, + 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it includes the problem': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('missing domain information')); + } + } + } + } +}).export(module); From f2f2e63c81b1c8d1f93b5941567eff15f935e7d5 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 17:33:13 -0400 Subject: [PATCH 37/96] Affirmatively say the user fixed issues via edits --- utils/issue-format-bot/lib/issueedit.js | 2 ++ utils/issue-format-bot/lib/newissue.js | 1 - .../issue-format-bot/test/issueedit-handler-test.js | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index ae7052d3f542..2cb880e78257 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -40,6 +40,8 @@ module.exports = function(robot) { if (problems.length === 0) { // User submission is OK + const params = context.issue({body: 'Thanks! Your edit helped me out. I\'ll take it from here now.'}); + return context.github.issues.createComment(params); // TODO label things } else { // Submit a comment telling them what the issues were diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 91228eafe2c6..d686521b201b 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -38,7 +38,6 @@ module.exports = function(robot) { if (problems.length === 0) { // User submission is OK // TODO label things - // TODO it'd be nice if, once users edit their issue, we affirmatively say "you fixed it" } else { // Submit a comment telling them what the issues were let comment = 'Thanks for your contribution to HTTPS Everywhere! '; diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 70749f03ec3d..926ecbc2a7fd 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -81,10 +81,16 @@ vows.describe('issue edit handler').addBatch({ 'it works': function(err) { assert.ifError(err); }, - 'it doesn\'t comment': function(err, context) { - assert.isTrue(context.issue.notCalled); + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it says the user fixed it': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('take it from here')); } - // TODO useful tests here + // TODO test labels, etc. here }, 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': { topic: function(handler) { From 888c718388cc4aa50ce7d5e70f64635e73e35456 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 17:51:26 -0400 Subject: [PATCH 38/96] Only use one const statement in index.js --- utils/issue-format-bot/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index eaf10ba884b1..e15215539aa6 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,7 +1,7 @@ 'use strict'; -const newissue = require('./lib/newissue'); -const issueedit = require('./lib/issueedit'); +const newissue = require('./lib/newissue'), + issueedit = require('./lib/issueedit'); module.exports = robot => { robot.log('HTTPS Everywhere ruleset parser started.'); From d3d581c572a9e8a2a65caab6a3e7ed13af090a3e Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 17:59:27 -0400 Subject: [PATCH 39/96] Switch from XO to ESLint --- utils/issue-format-bot/.eslintrc.json | 292 +++++ utils/issue-format-bot/package-lock.json | 1352 ++++------------------ utils/issue-format-bot/package.json | 7 +- 3 files changed, 552 insertions(+), 1099 deletions(-) create mode 100644 utils/issue-format-bot/.eslintrc.json diff --git a/utils/issue-format-bot/.eslintrc.json b/utils/issue-format-bot/.eslintrc.json new file mode 100644 index 000000000000..04fcf94159d8 --- /dev/null +++ b/utils/issue-format-bot/.eslintrc.json @@ -0,0 +1,292 @@ +{ + "env": { + "es6": true, + "node": true + }, + "extends": [ + "eslint:recommended", + "probot" + ], + "rules": { + "accessor-pairs": "error", + "array-bracket-newline": "error", + "array-bracket-spacing": [ + "error", + "never" + ], + "array-callback-return": "error", + "array-element-newline": "off", + "arrow-body-style": "error", + "arrow-parens": [ + "error", + "as-needed" + ], + "arrow-spacing": [ + "error", + { + "after": true, + "before": true + } + ], + "block-scoped-var": "error", + "block-spacing": "error", + "brace-style": [ + "error", + "1tbs" + ], + "callback-return": "error", + "camelcase": "error", + "capitalized-comments": "off", + "class-methods-use-this": "error", + "comma-dangle": "error", + "comma-spacing": [ + "error", + { + "after": true, + "before": false + } + ], + "comma-style": [ + "error", + "last" + ], + "complexity": "error", + "computed-property-spacing": [ + "error", + "never" + ], + "consistent-return": "off", + "consistent-this": "error", + "curly": "off", + "default-case": "off", + "dot-location": [ + "error", + "property" + ], + "dot-notation": [ + "error", + { + "allowKeywords": true + } + ], + "eol-last": "error", + "eqeqeq": "error", + "for-direction": "error", + "func-call-spacing": "error", + "func-name-matching": "error", + "func-names": "off", + "func-style": [ + "error", + "declaration" + ], + "generator-star-spacing": "error", + "getter-return": "error", + "global-require": "off", + "guard-for-in": "error", + "handle-callback-err": "off", + "id-blacklist": "error", + "id-length": "off", + "id-match": "error", + "indent": "off", + "indent-legacy": "off", + "init-declarations": "off", + "jsx-quotes": "error", + "key-spacing": "error", + "keyword-spacing": [ + "error", + { + "after": true, + "before": true + } + ], + "line-comment-position": "error", + "linebreak-style": [ + "error", + "unix" + ], + "lines-around-comment": "error", + "lines-around-directive": "error", + "max-depth": "error", + "max-len": "off", + "max-lines": "error", + "max-nested-callbacks": "error", + "max-params": "error", + "max-statements": "off", + "max-statements-per-line": "error", + "multiline-ternary": "error", + "new-cap": "error", + "new-parens": "error", + "newline-after-var": "off", + "newline-before-return": "off", + "newline-per-chained-call": "off", + "no-alert": "error", + "no-array-constructor": "error", + "no-await-in-loop": "error", + "no-bitwise": "error", + "no-buffer-constructor": "error", + "no-caller": "error", + "no-catch-shadow": "error", + "no-confusing-arrow": "error", + "no-continue": "error", + "no-div-regex": "error", + "no-duplicate-imports": "error", + "no-else-return": "off", + "no-empty-function": "off", + "no-eq-null": "error", + "no-eval": "error", + "no-extend-native": "error", + "no-extra-bind": "error", + "no-extra-label": "error", + "no-extra-parens": "error", + "no-floating-decimal": "error", + "no-implicit-coercion": "error", + "no-implicit-globals": "error", + "no-implied-eval": "error", + "no-inline-comments": "error", + "no-invalid-this": "error", + "no-iterator": "error", + "no-label-var": "error", + "no-labels": "error", + "no-lone-blocks": "error", + "no-lonely-if": "error", + "no-loop-func": "error", + "no-magic-numbers": "off", + "no-mixed-operators": "error", + "no-mixed-requires": "off", + "no-multi-assign": "error", + "no-multi-spaces": "error", + "no-multi-str": "error", + "no-multiple-empty-lines": "error", + "no-native-reassign": "error", + "no-negated-condition": "error", + "no-negated-in-lhs": "error", + "no-nested-ternary": "error", + "no-new": "error", + "no-new-func": "error", + "no-new-object": "error", + "no-new-require": "error", + "no-new-wrappers": "error", + "no-octal-escape": "error", + "no-param-reassign": "error", + "no-path-concat": "error", + "no-plusplus": "off", + "no-process-env": "error", + "no-process-exit": "error", + "no-proto": "error", + "no-prototype-builtins": "error", + "no-restricted-globals": "error", + "no-restricted-imports": "error", + "no-restricted-modules": "error", + "no-restricted-properties": "error", + "no-restricted-syntax": "error", + "no-return-assign": "off", + "no-return-await": "error", + "no-script-url": "error", + "no-self-compare": "error", + "no-sequences": "error", + "no-shadow": "error", + "no-shadow-restricted-names": "error", + "no-spaced-func": "error", + "no-sync": "off", + "no-tabs": "off", + "no-template-curly-in-string": "error", + "no-ternary": "error", + "no-throw-literal": "error", + "no-trailing-spaces": "error", + "no-undef-init": "error", + "no-undefined": "error", + "no-underscore-dangle": "error", + "no-unmodified-loop-condition": "error", + "no-unneeded-ternary": "error", + "no-unused-expressions": "error", + "no-use-before-define": "error", + "no-useless-call": "error", + "no-useless-computed-key": "error", + "no-useless-concat": "error", + "no-useless-constructor": "error", + "no-useless-rename": "error", + "no-useless-return": "error", + "no-var": "error", + "no-void": "error", + "no-warning-comments": "off", + "no-whitespace-before-property": "error", + "no-with": "error", + "nonblock-statement-body-position": "error", + "object-curly-newline": "off", + "object-curly-spacing": [ + "error", + "never" + ], + "object-property-newline": "error", + "object-shorthand": "off", + "one-var": "off", + "one-var-declaration-per-line": "error", + "operator-assignment": [ + "error", + "always" + ], + "operator-linebreak": "error", + "padded-blocks": "off", + "padding-line-between-statements": "error", + "prefer-arrow-callback": "error", + "prefer-const": "off", + "prefer-destructuring": "off", + "prefer-numeric-literals": "error", + "prefer-promise-reject-errors": "error", + "prefer-reflect": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "off", + "quote-props": "off", + "quotes": [ + "error", + "single" + ], + "radix": "error", + "require-await": "error", + "require-jsdoc": "off", + "rest-spread-spacing": "error", + "semi": "off", + "semi-spacing": "error", + "semi-style": [ + "error", + "last" + ], + "sort-imports": "error", + "sort-keys": "off", + "sort-vars": "off", + "space-before-blocks": "error", + "space-before-function-paren": "off", + "space-in-parens": [ + "error", + "never" + ], + "space-infix-ops": "error", + "space-unary-ops": "error", + "spaced-comment": [ + "error", + "always" + ], + "strict": "off", + "switch-colon-spacing": "error", + "symbol-description": "error", + "template-curly-spacing": [ + "error", + "never" + ], + "template-tag-spacing": "error", + "unicode-bom": [ + "error", + "never" + ], + "valid-jsdoc": "error", + "vars-on-top": "error", + "wrap-iife": "error", + "wrap-regex": "error", + "yield-star-spacing": "error", + "yoda": [ + "error", + "never" + ] + } +} diff --git a/utils/issue-format-bot/package-lock.json b/utils/issue-format-bot/package-lock.json index f306819dbfc3..aa032db0b6a3 100644 --- a/utils/issue-format-bot/package-lock.json +++ b/utils/issue-format-bot/package-lock.json @@ -47,44 +47,6 @@ "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", "dev": true }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", - "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true - } - } - }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -133,18 +95,6 @@ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, "array-iterate": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-1.1.1.tgz", @@ -274,44 +224,6 @@ "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-1.16.0.tgz", "integrity": "sha1-1s4TgIUnr8gLaQkvFWBmVeWyHxo=" }, - "boxen": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.1.0.tgz", - "integrity": "sha1-sbad1SIwXoB6md7ud329blFnsQI=", - "dev": true, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", - "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true - } - } - }, "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", @@ -322,12 +234,6 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=" }, - "buf-compare": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buf-compare/-/buf-compare-1.0.1.tgz", - "integrity": "sha1-/vKNqLgROgoNtEMLC2Rntpcws0o=", - "dev": true - }, "buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -403,26 +309,6 @@ "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", "dev": true }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - } - } - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", - "dev": true - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -474,18 +360,6 @@ "integrity": "sha1-vos2rvzN6LPKeqLWr8B6NyQsDS0=", "dev": true }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true - }, "cli-width": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz", @@ -521,6 +395,18 @@ "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.3.tgz", "integrity": "sha1-S5BvZw5aljqHt2sOFolkM0G2Ajw=" }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "dev": true + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", @@ -538,87 +424,27 @@ "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", "dev": true }, - "configstore": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.0.tgz", - "integrity": "sha1-Rd+QcHPibfoc9LLVL1tgVF6qEdE=", - "dev": true - }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, "cookie": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" }, - "core-assert": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz", - "integrity": "sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8=", - "dev": true - }, - "core-js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", - "integrity": "sha1-TekR5mew6ukSTjQlS1OupvxhjT4=", - "dev": true - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", - "dev": true - }, - "cross-spawn-async": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz", - "integrity": "sha1-hF/wwINKPe2dFg2sptOQkGuyiMw=", - "dev": true - }, "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true - }, "cwd": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", "integrity": "sha1-FyQAaUBXwioTsM8WFix+S3p/5Wc=" }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -644,30 +470,12 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "deep-assign": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz", - "integrity": "sha1-sJJ0O+hCfcYh6gBnzex+cN0Z83s=", - "dev": true - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", - "dev": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "deep-strict-equal": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz", - "integrity": "sha1-SgeBR6irV/ag1PVUckPNIvROtOQ=", - "dev": true - }, "define-properties": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", @@ -694,12 +502,6 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", - "dev": true - }, "diff": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.0.tgz", @@ -712,12 +514,6 @@ "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", "dev": true }, - "dot-prop": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.1.1.tgz", - "integrity": "sha1-qEk/C3te7sglJbXHWH+n3nyoWcE=", - "dev": true - }, "dotenv": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", @@ -729,12 +525,6 @@ "integrity": "sha1-uhv8ZJMoXM/PxqtpzVxh10wqQ78=", "optional": true }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, "ecc-jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", @@ -747,12 +537,6 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=" }, - "enhance-visitors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/enhance-visitors/-/enhance-visitors-1.0.0.tgz", - "integrity": "sha1-qpRdBdpGVnKh69OP7i7T2oUY6Vo=", - "dev": true - }, "error-ex": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", @@ -770,94 +554,132 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true }, - "es5-ext": { - "version": "0.10.23", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz", - "integrity": "sha1-dXi1G+l0IHpUh4IbVlOMIk5Oezg=", - "dev": true - }, - "es6-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", - "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", - "dev": true - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "dev": true - }, "eslint": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", - "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", - "dev": true - }, - "eslint-config-probot": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-probot/-/eslint-config-probot-0.1.0.tgz", - "integrity": "sha1-Mw+4aGy1O/G5yKOsIlRhxEANT6k=", - "dev": true - }, - "eslint-config-xo": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.18.2.tgz", - "integrity": "sha1-ChVxIIdWGZKec1/9axhcQeihh68=", - "dev": true - }, - "eslint-formatter-pretty": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-1.1.0.tgz", - "integrity": "sha1-q00G2gL+2ME66fDcVApDPvftb14=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.3.0.tgz", + "integrity": "sha1-/NfJY3a780yF7mftABKimWQrEI8=", "dev": true, "dependencies": { + "ajv": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.2.tgz", + "integrity": "sha1-R8aNaehvXZUxA7AHSpQw3GPaXjk=", + "dev": true + }, + "ansi-escapes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz", + "integrity": "sha1-W65SvkJIeN2Xg+iRDj/Cki6DyBs=", + "dev": true + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true + }, + "inquirer": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.2.1.tgz", + "integrity": "sha512-QgW3eiPN8gpj/K5vVpHADJJgrrF0ho/dZGylikGX7iqAdRgC9FVKYKWFLx6hZDBFcOLEoSqINYrVPeFAeG/PdA==", + "dev": true, + "dependencies": { + "chalk": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", + "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", + "dev": true + } + } + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true + }, + "pluralize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-4.0.0.tgz", + "integrity": "sha1-WbcIwcAZCi9pLxx2GMRGsFL9F2I=", + "dev": true + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, "string-width": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", - "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true }, "strip-ansi": { @@ -865,57 +687,39 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true + }, + "table": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", + "integrity": "sha1-qBFsEz+sLGH0pCCrbN9cTWHw5DU=", + "dev": true, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true + } + } } } }, - "eslint-import-resolver-node": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz", - "integrity": "sha512-yUtXS15gIcij68NmXmP9Ni77AQuCN0itXbCc/jWd8C6/yKZaSNXicpC8cgvjnxVdmfsosIXrjpzFq7GcDryb6A==", - "dev": true - }, - "eslint-module-utils": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", - "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", - "dev": true - }, - "eslint-plugin-ava": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-4.2.1.tgz", - "integrity": "sha1-fNtegbx3n0gz1HIKYJPl9KbKGRM=", - "dev": true - }, - "eslint-plugin-import": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz", - "integrity": "sha512-HGYmpU9f/zJaQiKNQOVfHUh2oLWW3STBrCgH0sHTX1xtsxYlH1zjLh8FlQGEIdZSdTbUMaV36WaZ6ImXkenGxQ==", - "dev": true, - "dependencies": { - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true - } - } - }, - "eslint-plugin-no-use-extend-native": { - "version": "0.3.12", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.3.12.tgz", - "integrity": "sha1-OtmgDC3yO11/f2vpFVCYWkq3Aeo=", + "eslint-config-probot": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-probot/-/eslint-config-probot-0.1.0.tgz", + "integrity": "sha1-Mw+4aGy1O/G5yKOsIlRhxEANT6k=", "dev": true }, - "eslint-plugin-promise": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz", - "integrity": "sha1-ePu2/+BHIBYnVp6FpsU3OvKmj8o=", + "eslint-config-xo": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.18.2.tgz", + "integrity": "sha1-ChVxIIdWGZKec1/9axhcQeihh68=", "dev": true }, - "eslint-plugin-unicorn": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-2.1.2.tgz", - "integrity": "sha1-md/+n0dzsEvDk1an/r1k3XACdLw=", + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true }, "espree": { @@ -930,12 +734,6 @@ "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", "dev": true }, - "espurify": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", - "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", - "dev": true - }, "esquery": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", @@ -960,24 +758,6 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true - }, - "execa": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.4.0.tgz", - "integrity": "sha1-TrZGejaglfq7KXD/nV4/t7zm68M=", - "dev": true - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, "expand-brackets": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", @@ -1009,6 +789,12 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=" }, + "external-editor": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.4.tgz", + "integrity": "sha1-HtkZnanL/i7y96MbL96LDRI2iXI=", + "dev": true + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -1020,18 +806,18 @@ "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", "dev": true }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "dev": true + }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true - }, "file-entry-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", @@ -1123,16 +909,10 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, "get-caller-file": { @@ -1141,24 +921,6 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, - "get-set-props": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-set-props/-/get-set-props-0.1.0.tgz", - "integrity": "sha1-mYR1wXhEVobQsyJG2l3428++jqM=", - "dev": true - }, - "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1219,18 +981,6 @@ "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true - }, - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "dev": true - }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", @@ -1259,6 +1009,12 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, "has-glob": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-0.1.1.tgz", @@ -1297,36 +1053,24 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=" }, + "iconv-lite": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", + "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==", + "dev": true + }, "ignore": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz", "integrity": "sha1-QyNS5XrM2HqzEQ6C0/6g5HgSFW0=", "dev": true }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "import-modules": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-1.1.0.tgz", - "integrity": "sha1-dI23nFzEK7lwHvq0JPiU5yYA6dw=", - "dev": true - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -1342,30 +1086,12 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" }, - "inquirer": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", - "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", - "dev": true - }, - "interpret": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", - "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=", - "dev": true - }, "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, - "irregular-plurals": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.3.0.tgz", - "integrity": "sha512-njf5A+Mxb3kojuHd1DzISjjIl+XhyzovXEOyPPSzdQozq/Lf2tN27mOrAAsxEPZxpn6I4MGzs1oo9TxXxPFpaA==", - "dev": true - }, "is-absolute": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", @@ -1447,12 +1173,6 @@ "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=" }, - "is-error": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.1.tgz", - "integrity": "sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw=", - "dev": true - }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -1463,12 +1183,6 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true - }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -1481,12 +1195,6 @@ "integrity": "sha1-nnFlPNFf/zQcecQVFGChMdMen8Q=", "dev": true }, - "is-get-set-prop": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-get-set-prop/-/is-get-set-prop-1.0.0.tgz", - "integrity": "sha1-JzGHfk14pqae3M5rudaLB3nnYxI=", - "dev": true - }, "is-glob": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", @@ -1497,24 +1205,6 @@ "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.0.tgz", "integrity": "sha1-XEWXcdKvmi45Ungf1U/LG8/kETw=" }, - "is-js-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-js-type/-/is-js-type-2.0.0.tgz", - "integrity": "sha1-c2FwBtZZtOtHKbunR9KHgt8PfiI=", - "dev": true - }, - "is-my-json-valid": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz", - "integrity": "sha1-8Hndm/2uZe4gOKrorLyGqxCeNpM=", - "dev": true - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", - "dev": true - }, "is-number": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", @@ -1526,18 +1216,6 @@ "integrity": "sha1-8mWrian0RQNO9q/xWo8AsA9VF5k=", "dev": true }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-obj-prop": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-obj-prop/-/is-obj-prop-1.0.0.tgz", - "integrity": "sha1-s03nnEULjXxzqyzfZ9yHWtuF+A4=", - "dev": true - }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -1571,22 +1249,10 @@ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true - }, - "is-proto-prop": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-proto-prop/-/is-proto-prop-1.0.0.tgz", - "integrity": "sha1-s5UflcCJkk+11PzaZUKrPoPisiA=", - "dev": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, "is-regex": { @@ -1606,18 +1272,6 @@ "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", "dev": true }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, "is-string": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.4.tgz", @@ -1704,12 +1358,6 @@ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, - "js-types": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz", - "integrity": "sha1-0kLmSU7Vcq08koCfyL7X92h8vwM=", - "dev": true - }, "js-yaml": { "version": "3.8.4", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.4.tgz", @@ -1723,12 +1371,24 @@ "dev": true, "optional": true }, + "jschardet": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.0.tgz", + "integrity": "sha512-+Q8JsoEQbrdE+a/gg1F9XO92gcKXgpE5UACqr0sIubjDmBEkd+OOWPGzQeMrWSLxd73r4dHxBeRW7edHu5LmJQ==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "dev": true }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, "json-stable-stringify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", @@ -1746,12 +1406,6 @@ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true - }, "jsonwebtoken": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.1.tgz", @@ -1786,12 +1440,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true - }, "lazy-cache": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", @@ -1846,53 +1494,11 @@ "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", "dev": true }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, - "lodash.cond": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", - "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", - "dev": true - }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, - "lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", - "dev": true - }, - "lodash.upperfirst": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", - "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=", - "dev": true - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true - }, "lolex": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", @@ -1905,120 +1511,40 @@ "integrity": "sha1-QtKRtUEeQDZcAOYxk0l+IkcxbjU=" }, "lookup-path": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/lookup-path/-/lookup-path-0.3.1.tgz", - "integrity": "sha1-pO8kEK4yZpr3AMTLfhsBCVCc8rg=" - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true - }, - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "dev": true - }, - "lsmod": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", - "integrity": "sha1-mgD3bco26yP6BTUK/htYXUKZ5ks=" - }, - "make-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.0.0.tgz", - "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "markdown-escapes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.0.tgz", - "integrity": "sha1-yMoZ8dlNaCRZ4Kk8htsnp+9xayM=" - }, - "markdown-table": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.0.tgz", - "integrity": "sha1-H1rmFlnO2ICNiCVUwy6LPzjdEUM=" - }, - "matched": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", - "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=" - }, - "mdast-util-compact": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.1.tgz", - "integrity": "sha1-zbX4TitqLTEU3zO9BdnLMuPECDo=" - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true - } - } + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/lookup-path/-/lookup-path-0.3.1.tgz", + "integrity": "sha1-pO8kEK4yZpr3AMTLfhsBCVCc8rg=" + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true + }, + "lsmod": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lsmod/-/lsmod-1.0.0.tgz", + "integrity": "sha1-mgD3bco26yP6BTUK/htYXUKZ5ks=" + }, + "markdown-escapes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.0.tgz", + "integrity": "sha1-yMoZ8dlNaCRZ4Kk8htsnp+9xayM=" + }, + "markdown-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.0.tgz", + "integrity": "sha1-H1rmFlnO2ICNiCVUwy6LPzjdEUM=" + }, + "matched": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", + "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=" + }, + "mdast-util-compact": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.1.tgz", + "integrity": "sha1-zbX4TitqLTEU3zO9BdnLMuPECDo=" }, "micromatch": { "version": "2.3.11", @@ -2042,6 +1568,12 @@ "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", "dev": true }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -2067,18 +1599,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", - "dev": true - }, - "mute-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", - "dev": true - }, "mv": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", @@ -2139,12 +1659,6 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=" }, - "npm-run-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-1.0.0.tgz", - "integrity": "sha1-9cMr9ZX+ga6Sfa7FLoL4sACsPI8=", - "dev": true - }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -2157,12 +1671,6 @@ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", "dev": true }, - "obj-props": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/obj-props/-/obj-props-1.1.0.tgz", - "integrity": "sha1-YmMT+qRCvv1KROmgLDy2vek3tRE=", - "dev": true - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -2197,12 +1705,6 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, "openurl": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", @@ -2226,10 +1728,10 @@ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, "p-limit": { @@ -2242,12 +1744,6 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=" }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "dev": true - }, "parse-entities": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.1.1.tgz", @@ -2284,12 +1780,6 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, - "path-key": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-1.0.0.tgz", - "integrity": "sha1-XVPVeAGWRsDWiADbThRua9wqx68=", - "dev": true - }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", @@ -2309,12 +1799,6 @@ } } }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true - }, "performance-now": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", @@ -2411,56 +1895,12 @@ "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.0.0.tgz", "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=" }, - "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", - "dev": true, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true - } - } - }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true - }, - "plur": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", - "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", - "dev": true - }, - "pluralize": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", - "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", - "dev": true - }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -2483,23 +1923,11 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, - "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", - "dev": true - }, "promise-events": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/promise-events/-/promise-events-0.1.3.tgz", "integrity": "sha1-VyzKwrr4Joueup8zf1a+PIGB8n0=" }, - "proto-props": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/proto-props/-/proto-props-0.2.1.tgz", - "integrity": "sha1-XgHcJnWg3pq/p255nfozTW9IP0s=", - "dev": true - }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -2553,73 +1981,17 @@ } } }, - "rc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", - "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", - "dev": true, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true - }, "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", "dev": true }, - "readline2": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", - "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", - "dev": true - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true - }, "regex-cache": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=" }, - "registry-auth-token": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", - "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", - "dev": true - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true - }, "remark": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/remark/-/remark-7.0.1.tgz", @@ -2650,12 +2022,6 @@ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true - }, "replace-ext": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", @@ -2698,12 +2064,6 @@ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=" }, - "resolve-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-1.0.0.tgz", - "integrity": "sha1-Tq7qQe0EDRcCRX32SkKysH0kb58=", - "dev": true - }, "resolve-dep": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/resolve-dep/-/resolve-dep-0.6.0.tgz", @@ -2714,36 +2074,24 @@ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=" }, - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true - }, "rimraf": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", "dev": true }, - "run-async": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", - "dev": true - }, "rx-lite": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", "dev": true }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", @@ -2766,12 +2114,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "dev": true - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -2783,10 +2125,16 @@ "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=" }, - "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, "signal-exit": { @@ -2801,36 +2149,18 @@ "integrity": "sha512-vFTrO9Wt0ECffDYIPSP/E5bBugt0UjcBQOfQUMh66xzkyPEnhl/vM2LRZi2ajuTdkH07sA6DzrM6KvdvGIH8xw==", "dev": true }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, "slice-ansi": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", "dev": true }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, "sntp": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "dev": true }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true - }, "spdx-correct": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", @@ -2918,26 +2248,6 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "dependencies": { - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - } - } - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -2949,42 +2259,10 @@ "resolved": "https://registry.npmjs.org/strip-markdown/-/strip-markdown-3.0.0.tgz", "integrity": "sha1-yHs8YtLUX2b47Lv1MkkCnv4SLJU=" }, - "table": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", - "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", - "dev": true, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", - "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true - } - } - }, - "term-size": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-0.1.1.tgz", - "integrity": "sha1-hzYLljlsq1dgljcUzaDQy+7K2co=", + "supports-color": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.1.tgz", + "integrity": "sha512-qxzYsob3yv6U+xMzPrv170y8AwGP7i74g+pbixCfD6rgso8BscLT2qXIuz6TpOaiJZ3mFgT5O9lyT9nMU4LfaA==", "dev": true }, "text-encoding": { @@ -2999,12 +2277,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "the-argv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/the-argv/-/the-argv-1.0.0.tgz", - "integrity": "sha1-AIRwUAVzDdhNt1UlPJMa45jblSI=", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -3022,6 +2294,12 @@ "integrity": "sha1-DFYkbzPzDaG409colauvFmYPOM8=", "dev": true }, + "tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "dev": true + }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -3043,12 +2321,6 @@ "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, "trim-trailing-lines": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.0.tgz", @@ -3111,12 +2383,6 @@ "resolved": "https://registry.npmjs.org/unified/-/unified-6.1.5.tgz", "integrity": "sha1-cWk3hyYhpjE15iztLzrGoGPG+4c=" }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "dev": true - }, "unist-util-modify-children": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-1.1.1.tgz", @@ -3137,30 +2403,6 @@ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.1.3.tgz", "integrity": "sha1-7CaOcxudJ3p5pbWqBkOZDkBdYAs=" }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, - "update-notifier": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.2.0.tgz", - "integrity": "sha1-G1g3z5DAc22IYncytmHBOPht5y8=", - "dev": true - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true - }, - "user-home": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", - "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", - "dev": true - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -3205,12 +2447,6 @@ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", "dev": true }, - "widest-line": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", - "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", - "dev": true - }, "window-size": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", @@ -3240,24 +2476,6 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true }, - "write-file-atomic": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.1.0.tgz", - "integrity": "sha512-0TZ20a+xcIl4u0+Mj5xDH2yOWdmQiXlKf9Hm+TgDXjTMsEYb+gDrmb8e8UNAzMCitX8NBqG4Z/FUQIyzv/R1JQ==", - "dev": true - }, - "write-json-file": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.2.0.tgz", - "integrity": "sha1-UYYlBruzthnu+reFnx/WxtBTCHY=", - "dev": true - }, - "write-pkg": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-2.1.0.tgz", - "integrity": "sha1-NTqkTDnEjCFED1wIzmq9RhQcnAg=", - "dev": true - }, "x-is-function": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/x-is-function/-/x-is-function-1.0.4.tgz", @@ -3268,64 +2486,6 @@ "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", "integrity": "sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=" }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true - }, - "xo": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.18.2.tgz", - "integrity": "sha1-kqQusCpPsUnf6lUYAhkU9arIT/A=", - "dev": true, - "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - } - } - }, - "xo-init": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xo-init/-/xo-init-0.5.0.tgz", - "integrity": "sha1-jijex5Z2zF4EL95f2PcQ4mRrDjY=", - "dev": true, - "dependencies": { - "execa": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.5.1.tgz", - "integrity": "sha1-3j+4XLjW6RyFvLzrFkWBeFy1ezY=", - "dev": true - }, - "get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - } - } - }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index b1315080c7c3..749ee6d69287 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -10,20 +10,21 @@ "url": "git+https://github.com/EFForg/HTTPS-Everywhere.git" }, "scripts": { + "lint": "eslint index.js test lib", "start": "probot run ./index.js", - "test": "perjury test/*-test.js && xo --extend probot" + "test": "npm run lint && perjury test/*-test.js" }, "bugs": { "url": "https://github.com/EFForg/HTTPS-Everywhere/issues" }, "homepage": "https://github.com/EFForg/HTTPS-Everywhere#readme", "devDependencies": { + "eslint": "^4.3.0", "eslint-config-probot": "^0.1.0", "expect": "^1.20.2", "localtunnel": "^1.8.3", "perjury": "^0.4.3", - "sinon": "^2.4.1", - "xo": "^0.18.2" + "sinon": "^2.4.1" }, "engines": { "node": ">= 7.7.0", From fdd3a918da8ed9719a541e3a751f623af2e9f4cd Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 1 Aug 2017 18:08:57 -0400 Subject: [PATCH 40/96] Fix ESLint errors --- utils/issue-format-bot/.eslintrc.json | 4 ++++ utils/issue-format-bot/test/issueedit-handler-test.js | 4 ++-- utils/issue-format-bot/test/mocks/robot.js | 2 +- utils/issue-format-bot/test/newissue-handler-test.js | 4 ++-- utils/issue-format-bot/test/parse-test.js | 2 +- utils/issue-format-bot/test/robot-mock-test.js | 2 +- utils/issue-format-bot/test/validate-test.js | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/utils/issue-format-bot/.eslintrc.json b/utils/issue-format-bot/.eslintrc.json index 04fcf94159d8..3e7162416344 100644 --- a/utils/issue-format-bot/.eslintrc.json +++ b/utils/issue-format-bot/.eslintrc.json @@ -153,6 +153,10 @@ "no-magic-numbers": "off", "no-mixed-operators": "error", "no-mixed-requires": "off", + "no-mixed-spaces-and-tabs": [ + "error", + "smart-tabs" + ], "no-multi-assign": "error", "no-multi-spaces": "error", "no-multi-str": "error", diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 926ecbc2a7fd..935660e80015 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -12,7 +12,7 @@ vows.describe('issue edit handler').addBatch({ topic: function() { return require('../lib/issueedit'); }, - 'it works': function(err, newissue) { + 'it works': function(err) { assert.ifError(err); }, 'it\'s a function': function(err, newissue) { @@ -22,7 +22,7 @@ vows.describe('issue edit handler').addBatch({ topic: function(newissue) { return newissue(robot); }, - 'it works': function(err, handler) { + 'it works': function(err) { assert.ifError(err); }, 'it returns a function': function(err, handler) { diff --git a/utils/issue-format-bot/test/mocks/robot.js b/utils/issue-format-bot/test/mocks/robot.js index 6b1c260c6c7d..d44d69118fb1 100644 --- a/utils/issue-format-bot/test/mocks/robot.js +++ b/utils/issue-format-bot/test/mocks/robot.js @@ -1,6 +1,6 @@ 'use strict'; -function noop() {}; +function noop() {} module.exports = { log: noop diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index dcbd99ac7ff6..6a7973db14c2 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -10,7 +10,7 @@ vows.describe('new issue handler').addBatch({ topic: function() { return require('../lib/newissue'); }, - 'it works': function(err, newissue) { + 'it works': function(err) { assert.ifError(err); }, 'it\'s a function': function(err, newissue) { @@ -20,7 +20,7 @@ vows.describe('new issue handler').addBatch({ topic: function(newissue) { return newissue(robot); }, - 'it works': function(err, handler) { + 'it works': function(err) { assert.ifError(err); }, 'it returns a function': function(err, handler) { diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index bc6b97bb4345..b4cc0ae75210 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -9,7 +9,7 @@ vows.describe('issue parser module').addBatch({ topic: function() { return require('../lib/parse'); }, - 'it works': function(err, parse) { + 'it works': function(err) { assert.ifError(err); }, 'it\'s a function': function(err, parse) { diff --git a/utils/issue-format-bot/test/robot-mock-test.js b/utils/issue-format-bot/test/robot-mock-test.js index 703e5ec7eba5..b59c94b4c33d 100644 --- a/utils/issue-format-bot/test/robot-mock-test.js +++ b/utils/issue-format-bot/test/robot-mock-test.js @@ -8,7 +8,7 @@ vows.describe('robot mock object').addBatch({ topic: function() { return require('./mocks/robot'); }, - 'it works': function(err, robot) { + 'it works': function(err) { assert.ifError(err); }, 'it\'s an object': function(err, robot) { diff --git a/utils/issue-format-bot/test/validate-test.js b/utils/issue-format-bot/test/validate-test.js index e36a1b5d3d86..ece5f85925e7 100644 --- a/utils/issue-format-bot/test/validate-test.js +++ b/utils/issue-format-bot/test/validate-test.js @@ -46,7 +46,7 @@ vows.describe('data validator module').addBatch({ topic: function() { return require('../lib/validate'); }, - 'it works': function(err, validate) { + 'it works': function(err) { assert.ifError(err); }, 'it\'s a function': function(err, validate) { From cdc8017458ba31e600677461fb46e8b89255cd93 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 01:11:58 -0400 Subject: [PATCH 41/96] Load Alexa rankings at boot --- utils/issue-format-bot/index.js | 15 +- utils/issue-format-bot/lib/alexa.js | 36 +++ utils/issue-format-bot/lib/issueedit.js | 2 +- utils/issue-format-bot/lib/newissue.js | 2 +- utils/issue-format-bot/package-lock.json | 269 +++++++++++++++-------- utils/issue-format-bot/package.json | 4 +- 6 files changed, 229 insertions(+), 99 deletions(-) create mode 100644 utils/issue-format-bot/lib/alexa.js diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index e15215539aa6..9ee220b86056 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,12 +1,19 @@ 'use strict'; -const newissue = require('./lib/newissue'), +const alexa = require('./lib/alexa'), + newissue = require('./lib/newissue'), issueedit = require('./lib/issueedit'); module.exports = robot => { robot.log('HTTPS Everywhere ruleset parser started.'); - // TODO parse issue edits too - robot.on('issues.opened', newissue(robot)); - robot.on('issues.edited', issueedit(robot)); + alexa(domains => { + robot.log('Retrieved Alexa rankings.'); + + // TODO parse issue edits too + robot.on('issues.opened', newissue(robot, domains)); + robot.on('issues.edited', issueedit(robot, domains)); + + robot.log('Listening for new issues and issue edits.'); + }); }; diff --git a/utils/issue-format-bot/lib/alexa.js b/utils/issue-format-bot/lib/alexa.js new file mode 100644 index 000000000000..fdd70d512fe2 --- /dev/null +++ b/utils/issue-format-bot/lib/alexa.js @@ -0,0 +1,36 @@ +'use strict'; + +const request = require('request'), + unzip = require('unzip'); + +// (Heavily) modified from code by @Hainish in utils/labeller. Thanks, @Hainish! + +// TODO test this file + +module.exports = function getAlexa(cb) { + + const alexa = []; + const csvRegex = /^[0-9]+,(.+)/; + + request.get('https://s3.amazonaws.com/alexa-static/top-1m.csv.zip') + .on('error', err => { + cb(err); + }) + // Dumb ESLint. It's not my fault this person named it like that!? + .pipe(unzip.Parse()) // eslint-disable-line new-cap + .on('entry', entry => { + // TODO this use of readline is super confusing?? + const lineReader = require('readline').createInterface({ + input: entry + }); + + lineReader.on('line', line => { + const domain = line.match(csvRegex)[1]; + alexa.push(domain); + }); + + lineReader.on('close', () => { + cb(null, alexa); + }); + }); +}; diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index 2cb880e78257..6a1e701a9062 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -7,7 +7,7 @@ const parse = require('./parse'), // TODO make this share more with newissue.js? // TODO test this module -module.exports = function(robot) { +module.exports = function(robot, alexa) { return context => { robot.log('Issue #' + context.payload.issue.number + ' edited; responding.'); diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index d686521b201b..5d600adbf72c 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -4,7 +4,7 @@ const parse = require('./parse'), validate = require('./validate'), _ = require('lodash'); -module.exports = function(robot) { +module.exports = function(robot, alexa) { return context => { robot.log('Issue #' + context.payload.issue.number + ' created; responding.'); diff --git a/utils/issue-format-bot/package-lock.json b/utils/issue-format-bot/package-lock.json index aa032db0b6a3..48691e504352 100644 --- a/utils/issue-format-bot/package-lock.json +++ b/utils/issue-format-bot/package-lock.json @@ -38,8 +38,7 @@ "ajv": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=" }, "ajv-keywords": { "version": "1.5.1", @@ -131,14 +130,12 @@ "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, "assert-plus": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" }, "async": { "version": "1.5.2", @@ -153,20 +150,17 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" }, "aws4": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", - "dev": true + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" }, "babel-code-frame": { "version": "6.22.0", @@ -193,9 +187,13 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "dev": true, "optional": true }, + "binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=" + }, "bl": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", @@ -216,8 +214,7 @@ "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=" }, "bottleneck": { "version": "1.16.0", @@ -239,6 +236,11 @@ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" }, + "buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=" + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -312,14 +314,18 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "ccount": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.1.tgz", "integrity": "sha1-ZlaHlFFowhjsd/9hpBVa4AInqWw=" }, + "chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=" + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -375,8 +381,7 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "code-point-at": { "version": "1.1.0", @@ -410,8 +415,7 @@ "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "dev": true + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=" }, "concat-map": { "version": "0.0.1", @@ -437,8 +441,7 @@ "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=" }, "cwd": { "version": "0.10.0", @@ -449,13 +452,11 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -499,8 +500,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "diff": { "version": "3.3.0", @@ -529,7 +529,6 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "dev": true, "optional": true }, "ecdsa-sig-formatter": { @@ -803,8 +802,7 @@ "extsprintf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", - "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", - "dev": true + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=" }, "fast-deep-equal": { "version": "1.0.0", @@ -879,14 +877,12 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=" }, "formatio": { "version": "1.2.0", @@ -904,6 +900,18 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fstream": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.31.tgz", + "integrity": "sha1-czfwWPu7vvqMn1YaKMqwhJICyYg=", + "dependencies": { + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=" + } + } + }, "function-bind": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", @@ -925,13 +933,11 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -989,14 +995,12 @@ "har-schema": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" }, "har-validator": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=" }, "has": { "version": "1.0.1", @@ -1023,8 +1027,7 @@ "hawk": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=" }, "hoek": { "version": "2.16.3", @@ -1045,8 +1048,7 @@ "http-signature": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=" }, "https-proxy-agent": { "version": "1.0.0", @@ -1287,8 +1289,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-unc-path": { "version": "0.1.2", @@ -1344,8 +1345,7 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "joi": { "version": "6.10.1", @@ -1368,7 +1368,6 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, "optional": true }, "jschardet": { @@ -1380,8 +1379,7 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-schema-traverse": { "version": "0.3.1", @@ -1392,8 +1390,7 @@ "json-stable-stringify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=" }, "json-stringify-safe": { "version": "5.0.1", @@ -1403,8 +1400,7 @@ "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" }, "jsonwebtoken": { "version": "7.4.1", @@ -1415,13 +1411,11 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", - "dev": true, "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -1536,6 +1530,28 @@ "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.0.tgz", "integrity": "sha1-H1rmFlnO2ICNiCVUwy6LPzjdEUM=" }, + "match-stream": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz", + "integrity": "sha1-mesFAJOzTf+t5CG5rAtBCpz6F88=", + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "matched": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", @@ -1559,14 +1575,12 @@ "mime-db": { "version": "1.27.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", - "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", - "dev": true + "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=" }, "mime-types": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", - "dev": true + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=" }, "mimic-fn": { "version": "1.1.0", @@ -1631,6 +1645,11 @@ "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", "dev": true }, + "natives": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -1668,8 +1687,7 @@ "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, "object-assign": { "version": "4.1.1", @@ -1734,6 +1752,11 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "over": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/over/-/over-0.0.5.tgz", + "integrity": "sha1-8phS5w/X4l82DgE6jsRMgq7bVwg=" + }, "p-limit": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", @@ -1802,8 +1825,7 @@ "performance-now": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" }, "perjury": { "version": "0.4.3", @@ -1933,17 +1955,37 @@ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, + "pullstream": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pullstream/-/pullstream-0.4.1.tgz", + "integrity": "sha1-1vs79a7Wl+gxFQ6xACwlo/iuExQ=", + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "qs": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" }, "randomatic": { "version": "1.1.7", @@ -2030,8 +2072,7 @@ "request": { "version": "2.81.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=" }, "require-directory": { "version": "2.1.1", @@ -2077,8 +2118,7 @@ "rimraf": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", - "dev": true + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=" }, "rx-lite": { "version": "3.1.2", @@ -2125,6 +2165,11 @@ "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=" }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -2155,11 +2200,32 @@ "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", "dev": true }, + "slice-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-stream/-/slice-stream-1.0.0.tgz", + "integrity": "sha1-WzO9ZvATsaf4ZGCwPUY97DmtPqA=", + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "sntp": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=" }, "spdx-correct": { "version": "1.0.2", @@ -2189,13 +2255,11 @@ "version": "1.13.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "dev": true, "dependencies": { "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -2234,8 +2298,7 @@ "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", - "dev": true + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" }, "strip-ansi": { "version": "3.0.1", @@ -2313,8 +2376,12 @@ "tough-cookie": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", - "dev": true + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=" + }, + "traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" }, "trim": { "version": "0.0.1", @@ -2340,14 +2407,12 @@ "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=" }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, "optional": true }, "type-check": { @@ -2403,6 +2468,28 @@ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.1.3.tgz", "integrity": "sha1-7CaOcxudJ3p5pbWqBkOZDkBdYAs=" }, + "unzip": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/unzip/-/unzip-0.1.11.tgz", + "integrity": "sha1-iXScY7BY19kNYZ+GuYqhU107l/A=", + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -2411,8 +2498,7 @@ "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", - "dev": true + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, "validate-npm-package-license": { "version": "3.0.1", @@ -2423,8 +2509,7 @@ "verror": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", - "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", - "dev": true + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=" }, "vfile": { "version": "2.1.0", diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 749ee6d69287..d93c3eb2759e 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -34,6 +34,8 @@ "lodash": "^4.17.4", "probot": "^0.7.4", "remark": "^7.0.1", - "strip-markdown": "^3.0.0" + "request": "^2.81.0", + "strip-markdown": "^3.0.0", + "unzip": "^0.1.11" } } From 77fc7e08b8611197e94c49e2f898ae9f05157cd0 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 01:13:10 -0400 Subject: [PATCH 42/96] Nuke outdated TODOs --- utils/issue-format-bot/index.js | 1 - utils/issue-format-bot/lib/issueedit.js | 1 - 2 files changed, 2 deletions(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index 9ee220b86056..b5b93c3ee8e5 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -10,7 +10,6 @@ module.exports = robot => { alexa(domains => { robot.log('Retrieved Alexa rankings.'); - // TODO parse issue edits too robot.on('issues.opened', newissue(robot, domains)); robot.on('issues.edited', issueedit(robot, domains)); diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index 6a1e701a9062..62e2f1ded76e 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -5,7 +5,6 @@ const parse = require('./parse'), _ = require('lodash'); // TODO make this share more with newissue.js? -// TODO test this module module.exports = function(robot, alexa) { return context => { From 3f6ebd4f396133d0c2c449f2606d54c9d1f28ddf Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 02:24:13 -0400 Subject: [PATCH 43/96] Add a TODO --- utils/issue-format-bot/lib/alexa.js | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/issue-format-bot/lib/alexa.js b/utils/issue-format-bot/lib/alexa.js index fdd70d512fe2..662b43241a2d 100644 --- a/utils/issue-format-bot/lib/alexa.js +++ b/utils/issue-format-bot/lib/alexa.js @@ -5,6 +5,7 @@ const request = require('request'), // (Heavily) modified from code by @Hainish in utils/labeller. Thanks, @Hainish! +// TODO make this return Promises // TODO test this file module.exports = function getAlexa(cb) { From e7ef9640818b16134615b47f5f83274af71a7bc9 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 02:24:31 -0400 Subject: [PATCH 44/96] Fix Alexa domains not being loaded properly --- utils/issue-format-bot/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index b5b93c3ee8e5..7f78826f3f63 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -7,7 +7,9 @@ const alexa = require('./lib/alexa'), module.exports = robot => { robot.log('HTTPS Everywhere ruleset parser started.'); - alexa(domains => { + alexa((err, domains) => { + if (err) throw err; + robot.log('Retrieved Alexa rankings.'); robot.on('issues.opened', newissue(robot, domains)); From 7197a49aa4091c0baf7005a3918297c427071012 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 02:25:08 -0400 Subject: [PATCH 45/96] Label new issues --- utils/issue-format-bot/lib/newissue.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 5d600adbf72c..9259d07a0a39 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -37,7 +37,26 @@ module.exports = function(robot, alexa) { if (problems.length === 0) { // User submission is OK - // TODO label things + + const alexaPosition = alexa.indexOf(data.domain); + const labels = []; + + if (alexaPosition === -1) { + return; + } else if (alexaPosition < 100) { + labels.push('top-100'); + } else if (alexaPosition < 1000) { + labels.push('top-1k'); + } else if (alexaPosition < 10000) { + labels.push('top-10k'); + } else if (alexaPosition < 100000) { + labels.push('top-100k'); + } else if (alexaPosition < 1000000) { + labels.push('top-1m'); + } + + const params = context.issue({labels}); + return context.github.issues.addLabels(params); } else { // Submit a comment telling them what the issues were let comment = 'Thanks for your contribution to HTTPS Everywhere! '; From 00f52de1c5b9cc71516203186d351a23fff59768 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 03:33:03 -0400 Subject: [PATCH 46/96] Add a mock for Alexa results --- .../issue-format-bot/test/alexa-mock-test.js | 43 +++++++++++++++++++ utils/issue-format-bot/test/mocks/alexa.js | 11 +++++ 2 files changed, 54 insertions(+) create mode 100644 utils/issue-format-bot/test/alexa-mock-test.js create mode 100644 utils/issue-format-bot/test/mocks/alexa.js diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js new file mode 100644 index 000000000000..1a87b50535df --- /dev/null +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -0,0 +1,43 @@ +'use strict'; + +const vows = require('perjury'), + assert = vows.assert; + +vows.describe('alexa mock array').addBatch({ + 'When we require the module': { + topic: function() { + return require('./mocks/alexa'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s an array': function(err, alexa) { + assert.isArray(alexa); + }, + 'its length is 100': function(err, alexa) { + assert.equal(alexa.length, 100); + }, + 'its 99th element has the right text': function(err, alexa) { + assert.equal(alexa[99], 'domain100.com'); + }, + 'its 100th element is undefined': function(err, alexa) { + assert.isUndefined(alexa[100]); + }, + 'and we get a nonexistant property': function(err, alexa) { + assert.isUndefined(alexa['foobar']); + }, + 'and we assign a property': { + topic: function(alexa) { + alexa.someProp = 'Hello world!'; + return alexa; + }, + 'it works': function(err, alexa) { + assert.ifError(err); + }, + 'the property is there': function(err, alexa) { + debugger; + assert.equal(alexa.someProp, 'Hello world!'); + } + } + } +}).export(module); diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js new file mode 100644 index 000000000000..b562aee2de4e --- /dev/null +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -0,0 +1,11 @@ +'use strict'; + +const SIZE = 100; + +module.exports = new Proxy(new Array(SIZE), { + get: function(target, name) { + // Node REPL uses symbols apparently, which throw TypeErrors when isNaN coerces them, so do those first + if (typeof name === 'symbol' || isNaN(name) || name >= SIZE) return target[name]; + return `domain${Number(name) + 1}.com`; + } +}); From 992500ed1a604c09287daac228f848ffe59c18e8 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 03:36:39 -0400 Subject: [PATCH 47/96] Pass an Alexa mock in the new issue handler test --- utils/issue-format-bot/test/newissue-handler-test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 6a7973db14c2..596180f4782e 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -3,6 +3,7 @@ const vows = require('perjury'), assert = vows.assert, robot = require('./mocks/robot'), + alexa = require('./mocks/alexa'), makeContext = require('./mocks/context'); vows.describe('new issue handler').addBatch({ @@ -18,7 +19,7 @@ vows.describe('new issue handler').addBatch({ }, 'and we initialize it with a robot': { topic: function(newissue) { - return newissue(robot); + return newissue(robot, alexa); }, 'it works': function(err) { assert.ifError(err); From 01a133b885b256132f9f40fd41142c8ca452f3e4 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 13:47:46 -0400 Subject: [PATCH 48/96] Factor out labeling into its own module --- utils/issue-format-bot/lib/labeler.js | 23 +++++++++++++ utils/issue-format-bot/lib/newissue.js | 21 ++---------- utils/issue-format-bot/test/labeler-test.js | 38 +++++++++++++++++++++ 3 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 utils/issue-format-bot/lib/labeler.js create mode 100644 utils/issue-format-bot/test/labeler-test.js diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js new file mode 100644 index 000000000000..f1ae94abad3c --- /dev/null +++ b/utils/issue-format-bot/lib/labeler.js @@ -0,0 +1,23 @@ +'use strict'; + +module.exports = function label(context, data, alexa) { + const alexaPosition = alexa.indexOf(data.domain); + const labels = []; + + if (alexaPosition === -1) { + return; + } else if (alexaPosition < 100) { + labels.push('top-100'); + } else if (alexaPosition < 1000) { + labels.push('top-1k'); + } else if (alexaPosition < 10000) { + labels.push('top-10k'); + } else if (alexaPosition < 100000) { + labels.push('top-100k'); + } else if (alexaPosition < 1000000) { + labels.push('top-1m'); + } + + const params = context.issue({labels}); + return context.github.issues.addLabels(params); +}; diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 9259d07a0a39..2f1adb98c3d3 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -2,6 +2,7 @@ const parse = require('./parse'), validate = require('./validate'), + labeler = require('./labeler.js'), _ = require('lodash'); module.exports = function(robot, alexa) { @@ -38,25 +39,7 @@ module.exports = function(robot, alexa) { if (problems.length === 0) { // User submission is OK - const alexaPosition = alexa.indexOf(data.domain); - const labels = []; - - if (alexaPosition === -1) { - return; - } else if (alexaPosition < 100) { - labels.push('top-100'); - } else if (alexaPosition < 1000) { - labels.push('top-1k'); - } else if (alexaPosition < 10000) { - labels.push('top-10k'); - } else if (alexaPosition < 100000) { - labels.push('top-100k'); - } else if (alexaPosition < 1000000) { - labels.push('top-1m'); - } - - const params = context.issue({labels}); - return context.github.issues.addLabels(params); + return labeler(context, data, alexa); } else { // Submit a comment telling them what the issues were let comment = 'Thanks for your contribution to HTTPS Everywhere! '; diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js new file mode 100644 index 000000000000..fd8266a1f15d --- /dev/null +++ b/utils/issue-format-bot/test/labeler-test.js @@ -0,0 +1,38 @@ +'use strict'; + +const vows = require('perjury'), + assert = vows.assert, + makeContext = require('./mocks/context'), + alexa = require('./mocks/alexa'); + +vows.describe('issue labeler module').addBatch({ + 'When we require the module': { + topic: function() { + return require('../lib/labeler'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s a function': function(err, labeler) { + assert.isFunction(labeler); + }, + 'and we pass it an issue in the top 100 domains': { + topic: function(labeler) { + const context = makeContext.issue(); + labeler(context, {domain: 'domain10.com'}, alexa); + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it adds labels to the issue': function(err, context) { + assert.ok(context.github.issues.addLabels.calledOnce); + }, + 'the label was the top-100 label': function(err, context) { + const args = context.github.issues.addLabels.args[0]; + assert.isObject(args[0]); + assert.equal(args[0].labels, ['top-100']); + } + } + } +}).export(module); From 85e6b6989e6425f5fc96dee03c81611b3dd926c0 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 13:48:18 -0400 Subject: [PATCH 49/96] Remove stray debugger statement --- utils/issue-format-bot/test/alexa-mock-test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index 1a87b50535df..ce1a29ecd57d 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -35,7 +35,6 @@ vows.describe('alexa mock array').addBatch({ assert.ifError(err); }, 'the property is there': function(err, alexa) { - debugger; assert.equal(alexa.someProp, 'Hello world!'); } } From 7e11d4ec94502aa6d3266e03c95e5f17c0fb503a Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 13:48:26 -0400 Subject: [PATCH 50/96] Fix Array#indexOf in the Alexa mock --- .../issue-format-bot/test/alexa-mock-test.js | 33 +++++++++++++++++++ utils/issue-format-bot/test/mocks/alexa.js | 17 ++++++++++ 2 files changed, 50 insertions(+) diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index ce1a29ecd57d..683fc2f2c77f 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -37,6 +37,39 @@ vows.describe('alexa mock array').addBatch({ 'the property is there': function(err, alexa) { assert.equal(alexa.someProp, 'Hello world!'); } + }, + 'and we call Array#indexOf with a domain in the array': { + topic: function(alexa) { + return alexa.indexOf('domain1.com'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns the right position': function(err, index) { + assert.equal(index, 0); + } + }, + 'and we call Array#indexOf with a domain not in the array': { + topic: function(alexa) { + return alexa.indexOf('domain1000000000.com'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns no match': function(err, index) { + assert.equal(index, -1); + } + }, + 'and we call Array#indexOf with something not a domain at all': { + topic: function(alexa) { + return alexa.indexOf('foobar!'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns no match': function(err, index) { + assert.equal(index, -1); + } } } }).export(module); diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index b562aee2de4e..31c186f958d9 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -2,8 +2,25 @@ const SIZE = 100; +const regex = /^domain(\d+).com$/; + +function indexOf(str) { + const match = regex.exec(str); + + if (match && Number(match[1]) < 100) { + return Number(match[1]) - 1; + } else { + return Array.prototype.indexOf.apply(this, arguments); + } +} + module.exports = new Proxy(new Array(SIZE), { get: function(target, name) { + // Override Array#indexOf + if (name === 'indexOf') { + return indexOf.bind(target); + } + // Node REPL uses symbols apparently, which throw TypeErrors when isNaN coerces them, so do those first if (typeof name === 'symbol' || isNaN(name) || name >= SIZE) return target[name]; return `domain${Number(name) + 1}.com`; From 246456d320673f4bba3f8a9eafc7294901ba0bfc Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 14:07:15 -0400 Subject: [PATCH 51/96] Mock out addLabels() in the context --- utils/issue-format-bot/test/context-mock-test.js | 1 + utils/issue-format-bot/test/mocks/context.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 879f0b24284e..799517213e8c 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -47,6 +47,7 @@ vows.describe('context mock object').addBatch({ 'context.github is an object': assertProp('github', assert.isObject), 'context.github.issues is an object': assertProp('github.issues', assert.isObject), 'context.github.issues.createComment is a Sinon spy': assertSinonSpy('github.issues.createComment'), + 'context.github.issues.addLabels is a Sinon spy': assertSinonSpy('github.issues.addLabels'), 'context.issue is a Sinon spy': assertSinonSpy('issue') } } diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 897163adb34e..ca9d5801d009 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -15,7 +15,8 @@ module.exports = { }, github: { issues: { - createComment: sinon.spy() + createComment: sinon.spy(), + addLabels: sinon.spy() } }, issue: sinon.spy() From 28a0dc90333a88960aefea68982539ebdeb74a0a Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 17:14:52 -0400 Subject: [PATCH 52/96] Increase Alexa mock size --- utils/issue-format-bot/test/alexa-mock-test.js | 12 ++++++------ utils/issue-format-bot/test/mocks/alexa.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index 683fc2f2c77f..bb20663ead90 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -14,14 +14,14 @@ vows.describe('alexa mock array').addBatch({ 'it\'s an array': function(err, alexa) { assert.isArray(alexa); }, - 'its length is 100': function(err, alexa) { - assert.equal(alexa.length, 100); + 'its length is 1000': function(err, alexa) { + assert.equal(alexa.length, 1000); }, - 'its 99th element has the right text': function(err, alexa) { - assert.equal(alexa[99], 'domain100.com'); + 'its 999th element has the right text': function(err, alexa) { + assert.equal(alexa[999], 'domain1000.com'); }, - 'its 100th element is undefined': function(err, alexa) { - assert.isUndefined(alexa[100]); + 'its 1000th element is undefined': function(err, alexa) { + assert.isUndefined(alexa[1000]); }, 'and we get a nonexistant property': function(err, alexa) { assert.isUndefined(alexa['foobar']); diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index 31c186f958d9..e98b2ca1f471 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -1,6 +1,6 @@ 'use strict'; -const SIZE = 100; +const SIZE = 1000; const regex = /^domain(\d+).com$/; From 0f85d8dca48d1865c931b13b91fff7826571043f Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 17:22:26 -0400 Subject: [PATCH 53/96] Fix some bugs in the Alexa mock Ther was a hard-coded value that should've just referenced the size contant, as well as an off-by-one error. --- utils/issue-format-bot/test/alexa-mock-test.js | 4 ++-- utils/issue-format-bot/test/mocks/alexa.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index bb20663ead90..c690cae1badc 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -40,13 +40,13 @@ vows.describe('alexa mock array').addBatch({ }, 'and we call Array#indexOf with a domain in the array': { topic: function(alexa) { - return alexa.indexOf('domain1.com'); + return alexa.indexOf('domain1000.com'); }, 'it works': function(err) { assert.ifError(err); }, 'it returns the right position': function(err, index) { - assert.equal(index, 0); + assert.equal(index, 999); } }, 'and we call Array#indexOf with a domain not in the array': { diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index e98b2ca1f471..e03a974aa38a 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -7,7 +7,7 @@ const regex = /^domain(\d+).com$/; function indexOf(str) { const match = regex.exec(str); - if (match && Number(match[1]) < 100) { + if (match && Number(match[1]) <= SIZE) { return Number(match[1]) - 1; } else { return Array.prototype.indexOf.apply(this, arguments); From ba550a476d4563ba4ffeb122bf043fd571d4052c Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 17:33:40 -0400 Subject: [PATCH 54/96] Test top 1k domain labeling too --- utils/issue-format-bot/test/labeler-test.js | 97 ++++++++++++++++----- 1 file changed, 73 insertions(+), 24 deletions(-) diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js index fd8266a1f15d..ae0345ab467e 100644 --- a/utils/issue-format-bot/test/labeler-test.js +++ b/utils/issue-format-bot/test/labeler-test.js @@ -5,34 +5,83 @@ const vows = require('perjury'), makeContext = require('./mocks/context'), alexa = require('./mocks/alexa'); -vows.describe('issue labeler module').addBatch({ - 'When we require the module': { - topic: function() { - return require('../lib/labeler'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s a function': function(err, labeler) { - assert.isFunction(labeler); - }, - 'and we pass it an issue in the top 100 domains': { - topic: function(labeler) { - const context = makeContext.issue(); - labeler(context, {domain: 'domain10.com'}, alexa); - return context; +// Note: we only test top 100 and top 1000 because the Alexa mock supports only 1000 items +// (Or in other words, `new Array(1000000)` hung my Node REPL process when I tried it.) + +// We have to do this funky thing so the tests run in serial +// If they run in parallel, Sinon spies don't reset deterministically and one of the assertions will fail because the spy's been called more than once from another suite +function setup(name, obj) { + const ret = { + 'When we require the module': { + topic: function() { + return require('../lib/labeler'); }, 'it works': function(err) { assert.ifError(err); }, - 'it adds labels to the issue': function(err, context) { - assert.ok(context.github.issues.addLabels.calledOnce); - }, - 'the label was the top-100 label': function(err, context) { - const args = context.github.issues.addLabels.args[0]; - assert.isObject(args[0]); - assert.equal(args[0].labels, ['top-100']); + 'it\'s a function': function(err, labeler) { + assert.isFunction(labeler); } } + }; + + ret['When we require the module'][name] = obj; + + return ret; +} + +function resetSpies(context) { + return context.github.issues.addLabels.reset(); +} + +vows.describe('issue labeler module').addBatch(setup( + 'and we pass it an issue in the top 100 domains', { + topic: function(labeler) { + const context = makeContext.issue(); + // XXX should we test on the boundaries of different labels instead of in the middle? + labeler(context, {domain: 'domain10.com'}, alexa); + return context; + }, + teardown: resetSpies, + 'it works': function(err) { + assert.ifError(err); + }, + 'it adds labels to the issue only once': function(err, context) { + assert.ok(context.github.issues.addLabels.calledOnce); + }, + 'the label was the top-100 label': function(err, context) { + // XXX should we test addLabels() arguments? + // Currently we don't because context.issue is a Sinon spy that returns nothing, which gets passed to addLabels() + const args = context.issue.args[0]; + + assert.isObject(args[0]); + assert.isArray(args[0].labels); + assert.deepEqual(args[0].labels, ['top-100']); + } + } +)).addBatch(setup( + 'and we pass it an issue in the top 1,000 domains', { + topic: function(labeler) { + const context = makeContext.issue(); + // XXX should we test on the boundaries of different labels instead of in the middle? + labeler(context, {domain: 'domain500.com'}, alexa); + return context; + }, + teardown: resetSpies, + 'it works': function(err) { + assert.ifError(err); + }, + 'it adds labels to the issue only once': function(err, context) { + assert.ok(context.github.issues.addLabels.calledOnce); + }, + 'the label was the top-1k label': function(err, context) { + // XXX should we test addLabels() arguments? + // Currently we don't because context.issue is a Sinon spy that returns nothing, which gets passed to addLabels() + const args = context.issue.args[0]; + + assert.isObject(args[0]); + assert.isArray(args[0].labels); + assert.deepEqual(args[0].labels, ['top-1k']); + } } -}).export(module); +)).export(module); From ae23f3db1b2bcd4f30ec1e1ea6d4bd1591d37154 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 18:10:10 -0400 Subject: [PATCH 55/96] Run the labeler for edits too --- utils/issue-format-bot/lib/issueedit.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index 62e2f1ded76e..097611c91ed2 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -2,12 +2,13 @@ const parse = require('./parse'), validate = require('./validate'), + labeler = require('./labeler'), _ = require('lodash'); // TODO make this share more with newissue.js? module.exports = function(robot, alexa) { - return context => { + return async context => { robot.log('Issue #' + context.payload.issue.number + ' edited; responding.'); // Check if the "issue" is really a PR @@ -40,8 +41,9 @@ module.exports = function(robot, alexa) { if (problems.length === 0) { // User submission is OK const params = context.issue({body: 'Thanks! Your edit helped me out. I\'ll take it from here now.'}); - return context.github.issues.createComment(params); - // TODO label things + await context.github.issues.createComment(params); + + return labeler(context, data, alexa); } else { // Submit a comment telling them what the issues were let comment = 'Thanks for editing!\n\n'; From 223f2b6826b2cb43b42f005a2488100ec6bfd693 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 18:11:12 -0400 Subject: [PATCH 56/96] Add a TODO --- utils/issue-format-bot/lib/labeler.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js index f1ae94abad3c..008f3b041615 100644 --- a/utils/issue-format-bot/lib/labeler.js +++ b/utils/issue-format-bot/lib/labeler.js @@ -4,6 +4,8 @@ module.exports = function label(context, data, alexa) { const alexaPosition = alexa.indexOf(data.domain); const labels = []; + // TODO remove existing labels in case of edits + if (alexaPosition === -1) { return; } else if (alexaPosition < 100) { From 7557209eb7c7eee46925f2b69a98816f333136b3 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 18:11:28 -0400 Subject: [PATCH 57/96] Squash ESLint errors --- utils/issue-format-bot/test/alexa-mock-test.js | 4 ++-- utils/issue-format-bot/test/mocks/alexa.js | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index c690cae1badc..3a578a284869 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -24,14 +24,14 @@ vows.describe('alexa mock array').addBatch({ assert.isUndefined(alexa[1000]); }, 'and we get a nonexistant property': function(err, alexa) { - assert.isUndefined(alexa['foobar']); + assert.isUndefined(alexa.foobar); }, 'and we assign a property': { topic: function(alexa) { alexa.someProp = 'Hello world!'; return alexa; }, - 'it works': function(err, alexa) { + 'it works': function(err) { assert.ifError(err); }, 'the property is there': function(err, alexa) { diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index e03a974aa38a..d59815f9ec91 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -10,7 +10,24 @@ function indexOf(str) { if (match && Number(match[1]) <= SIZE) { return Number(match[1]) - 1; } else { + + /* + ESLint is too dumb to realize that this always has a + bound `this` from the Proxy, so it's not invalid; + that Function#apply is clearer here than using + Reflect.apply and isn't the usual overly verbose + syntax people use; and that using `arguments` is + clearer than using spread syntax (and is one of the + rare cases where there isn't really a significant + advantage to spread syntax). So we disable it for + this line. + + TODO: report this upstream + */ + + /* eslint-disable */ return Array.prototype.indexOf.apply(this, arguments); + /* eslint-enable */ } } From 17b6ad111f838f976d8e69a387fdbb1cec197de1 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 19:21:32 -0400 Subject: [PATCH 58/96] Factor out handler setup into a common module --- .../test/issueedit-handler-test.js | 169 ++++++++---------- .../issue-format-bot/test/lib/handlerutil.js | 39 ++++ .../test/newissue-handler-test.js | 160 +++++++---------- 3 files changed, 183 insertions(+), 185 deletions(-) create mode 100644 utils/issue-format-bot/test/lib/handlerutil.js diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 935660e80015..40e25ff236a6 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -3,116 +3,97 @@ const vows = require('perjury'), assert = vows.assert, robot = require('./mocks/robot'), - makeContext = require('./mocks/context'); + makeContext = require('./mocks/context'), + handlerutil = require('./lib/handlerutil'); // TODO make this share code with newissue-handler-test -vows.describe('issue edit handler').addBatch({ - 'When we require the module': { - topic: function() { - return require('../lib/issueedit'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s a function': function(err, newissue) { - assert.isFunction(newissue); - }, - 'and we initialize it with a robot': { - topic: function(newissue) { - return newissue(robot); +vows.describe('issue edit handler').addBatch( + handlerutil.setup('../../lib/issueedit', { + 'and we pass it the context of an issue edit with a null body': { + topic: function(handler) { + const context = makeContext.issue(''); + + handler(context); + + return context; }, 'it works': function(err) { assert.ifError(err); }, - 'it returns a function': function(err, handler) { - assert.isFunction(handler); + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); }, - 'and we pass it the context of an issue edit with a null body': { - topic: function(handler) { - const context = makeContext.issue(''); + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('don\'t see any text')); + } + }, + 'and we pass it the context of a issue edit with a bad type': { + topic: function(handler) { + const context = makeContext.issue('Type: invalid'); - handler(context); + handler(context); - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('don\'t see any text')); - } + return context; }, - 'and we pass it the context of a issue edit with a bad type': { - topic: function(handler) { - const context = makeContext.issue('Type: invalid'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); - } + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); }, - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); + } + }, + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); - handler(context); + handler(context); - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it says the user fixed it': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('take it from here')); - } - // TODO test labels, etc. here + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); }, - 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset'); + 'it says the user fixed it': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('take it from here')); + } + // TODO test labels, etc. here + }, + 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset'); - handler(context); + handler(context); - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it includes the problem': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('missing domain information')); - } + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it includes the problem': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('missing domain information')); } } - } -}).export(module); + }) +).export(module); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js new file mode 100644 index 000000000000..3b8dc27e2e93 --- /dev/null +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -0,0 +1,39 @@ +'use strict'; + +const vows = require('perjury'), + assert = vows.assert, + robot = require('../mocks/robot'), + alexa = require('../mocks/alexa'), + _ = require('lodash'); + +// TODO tests + +function setup(path, obj) { + return { + 'When we require the module': { + topic: function() { + return require(path); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s a function': function(err, newissue) { + assert.isFunction(newissue); + }, + // We insert the provided object here + 'and we initialize it with a robot': _.assign({ + topic: function(newissue) { + return newissue(robot, alexa); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns a function': function(err, handler) { + assert.isFunction(handler); + } + }, obj) + } + }; +} + +module.exports.setup = setup; diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 596180f4782e..f916dda1521c 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -2,111 +2,89 @@ const vows = require('perjury'), assert = vows.assert, - robot = require('./mocks/robot'), - alexa = require('./mocks/alexa'), - makeContext = require('./mocks/context'); + makeContext = require('./mocks/context'), + handlerutil = require('./lib/handlerutil'); -vows.describe('new issue handler').addBatch({ - 'When we require the module': { - topic: function() { - return require('../lib/newissue'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s a function': function(err, newissue) { - assert.isFunction(newissue); - }, - 'and we initialize it with a robot': { - topic: function(newissue) { - return newissue(robot, alexa); +vows.describe('new issue handler').addBatch( + handlerutil.setup('../../lib/newissue', { + 'and we pass it the context of a new issue with a null body': { + topic: function(handler) { + const context = makeContext.issue(''); + + handler(context); + + return context; }, 'it works': function(err) { assert.ifError(err); }, - 'it returns a function': function(err, handler) { - assert.isFunction(handler); + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); }, - 'and we pass it the context of a new issue with a null body': { - topic: function(handler) { - const context = makeContext.issue(''); + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('can\'t find any text')); + } + }, + 'and we pass it the context of a new issue with a bad type': { + topic: function(handler) { + const context = makeContext.issue('Type: invalid'); - handler(context); + handler(context); - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('can\'t find any text')); - } + return context; }, - 'and we pass it the context of a new issue with a bad type': { - topic: function(handler) { - const context = makeContext.issue('Type: invalid'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); - } + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); }, - 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); + } + }, + 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); - handler(context); + handler(context); - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it doesn\'t comment': function(err, context) { - assert.isTrue(context.issue.notCalled); - } - // TODO useful tests here + return context; + }, + 'it works': function(err) { + assert.ifError(err); }, - // Problematic bodies aren't tested extensively here because that validation will eventually be refactored into another module and tested there - 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset'); + 'it doesn\'t comment': function(err, context) { + assert.isTrue(context.issue.notCalled); + } + }, + // Problematic bodies aren't tested extensively here because that validation will eventually be refactored into another module and tested there + 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset'); - handler(context); + handler(context); - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it includes the problem': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('missing domain information')); - } + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it includes the problem': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes('missing domain information')); } } - } -}).export(module); + }) +).export(module); From 015339c267b9cba1137c947cbcd7e5698e13bd03 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 21:00:40 -0400 Subject: [PATCH 59/96] DRY up issue create/edit handler tests --- .../test/issueedit-handler-test.js | 92 +-------------- .../issue-format-bot/test/lib/handlerutil.js | 111 ++++++++++++++++++ .../test/newissue-handler-test.js | 82 +------------ 3 files changed, 120 insertions(+), 165 deletions(-) diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 40e25ff236a6..8164826f9f47 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -6,94 +6,12 @@ const vows = require('perjury'), makeContext = require('./mocks/context'), handlerutil = require('./lib/handlerutil'); -// TODO make this share code with newissue-handler-test - vows.describe('issue edit handler').addBatch( handlerutil.setup('../../lib/issueedit', { - 'and we pass it the context of an issue edit with a null body': { - topic: function(handler) { - const context = makeContext.issue(''); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('don\'t see any text')); - } - }, - 'and we pass it the context of a issue edit with a bad type': { - topic: function(handler) { - const context = makeContext.issue('Type: invalid'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); - } - }, - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it says the user fixed it': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('take it from here')); - } - // TODO test labels, etc. here - }, - 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it includes the problem': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('missing domain information')); - } - } + 'and we pass it the context of an issue edit with a null body': handlerutil.nullBody('don\'t see any text'), + 'and we pass it the context of a issue edit with a bad type': handlerutil.badType('type of issue'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('take it from here'), + // TODO test labels, etc. here + 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 3b8dc27e2e93..726dcc2062d4 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -4,6 +4,7 @@ const vows = require('perjury'), assert = vows.assert, robot = require('../mocks/robot'), alexa = require('../mocks/alexa'), + makeContext = require('../mocks/context'), _ = require('lodash'); // TODO tests @@ -36,4 +37,114 @@ function setup(path, obj) { }; } +function nullBody(text) { + return { + topic: function(handler) { + const context = makeContext.issue(''); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } + }; +} + +function badType(text) { + return { + topic: function(handler) { + const context = makeContext.issue('Type: invalid'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } + }; +} + +function correctNewRuleset(text) { + let obj = { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + } + }; + + if (text) { + obj['it only creates one comment'] = function(err, context) { + assert.isTrue(context.issue.calledOnce); + }; + + obj['it says the user fixed it'] = function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + }; + } else { + obj['it doesn\'t comment'] = function(err, context) { + assert.isTrue(context.issue.notCalled); + }; + } + + return obj; +} + +function problematicNewRuleset(text) { + return { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it includes the problem': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } + }; +} + module.exports.setup = setup; +module.exports.nullBody = nullBody; +module.exports.badType = badType; +module.exports.correctNewRuleset = correctNewRuleset; +module.exports.problematicNewRuleset = problematicNewRuleset; diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index f916dda1521c..5af7cb836b34 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -7,84 +7,10 @@ const vows = require('perjury'), vows.describe('new issue handler').addBatch( handlerutil.setup('../../lib/newissue', { - 'and we pass it the context of a new issue with a null body': { - topic: function(handler) { - const context = makeContext.issue(''); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('can\'t find any text')); - } - }, - 'and we pass it the context of a new issue with a bad type': { - topic: function(handler) { - const context = makeContext.issue('Type: invalid'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('type of issue')); - } - }, - 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it doesn\'t comment': function(err, context) { - assert.isTrue(context.issue.notCalled); - } - }, + 'and we pass it the context of a new issue with a null body': handlerutil.nullBody('can\'t find any text'), + 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), + 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset, // Problematic bodies aren't tested extensively here because that validation will eventually be refactored into another module and tested there - 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it includes the problem': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes('missing domain information')); - } - } + 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); From 9e3194adf2896af2a9ccd59e295e3b6336ec97cb Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 21:03:29 -0400 Subject: [PATCH 60/96] Remove outdated TODO --- utils/issue-format-bot/test/newissue-handler-test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 5af7cb836b34..8b74f79e8649 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -10,7 +10,6 @@ vows.describe('new issue handler').addBatch( 'and we pass it the context of a new issue with a null body': handlerutil.nullBody('can\'t find any text'), 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset, - // Problematic bodies aren't tested extensively here because that validation will eventually be refactored into another module and tested there 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); From a4c874cec27b199a15657f6a90c53021bb843268 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 22:38:23 -0400 Subject: [PATCH 61/96] Don't make the edit handler an AsyncFunction This makes the label changes and the comment race, but doing it the old way makes it _really_ hard to test stuff, and it honestly just isn't that big of a deal if the label changes go through before the comment. --- utils/issue-format-bot/lib/issueedit.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index 097611c91ed2..d34d12abfa07 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -8,7 +8,7 @@ const parse = require('./parse'), // TODO make this share more with newissue.js? module.exports = function(robot, alexa) { - return async context => { + return context => { robot.log('Issue #' + context.payload.issue.number + ' edited; responding.'); // Check if the "issue" is really a PR @@ -41,7 +41,9 @@ module.exports = function(robot, alexa) { if (problems.length === 0) { // User submission is OK const params = context.issue({body: 'Thanks! Your edit helped me out. I\'ll take it from here now.'}); - await context.github.issues.createComment(params); + // This races with the labeler, but it's so hard to fix it's not worth it. + // See the commit that introduced this comment for a detailed explanation. + context.github.issues.createComment(params); return labeler(context, data, alexa); } else { From 8bb322c4fcdb71cfd7558fa9676726e7f6b8267c Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 22:56:25 -0400 Subject: [PATCH 62/96] Test that handlers label issues --- .../test/issueedit-handler-test.js | 1 - .../issue-format-bot/test/lib/handlerutil.js | 23 +++++++++++++++---- .../test/newissue-handler-test.js | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 8164826f9f47..7bf0f290d0fc 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -11,7 +11,6 @@ vows.describe('issue edit handler').addBatch( 'and we pass it the context of an issue edit with a null body': handlerutil.nullBody('don\'t see any text'), 'and we pass it the context of a issue edit with a bad type': handlerutil.badType('type of issue'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('take it from here'), - // TODO test labels, etc. here 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 726dcc2062d4..85895a41f5a6 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -86,9 +86,11 @@ function badType(text) { } function correctNewRuleset(text) { + const expectingEdit = Boolean(text); + let obj = { topic: function(handler) { - const context = makeContext.issue('Type: new ruleset\nDomain: example.com'); + const context = makeContext.issue('Type: new ruleset\nDomain: domain10.com'); handler(context); @@ -96,12 +98,24 @@ function correctNewRuleset(text) { }, 'it works': function(err) { assert.ifError(err); + }, + 'it labels the issue appropriately': function(err, context) { + assert.isTrue(context.github.issues.addLabels.calledOnce); + + // I'm not really sure why these magic numbers work? But they do, sooo... + // With apologies to whoever's come to edit this + const args = context.issue.args[expectingEdit ? 1 : 0]; + + assert.isObject(args[0]); + assert.isArray(args[0].labels); + assert.deepEqual(args[0].labels, ['top-100']); + } }; if (text) { obj['it only creates one comment'] = function(err, context) { - assert.isTrue(context.issue.calledOnce); + assert.isTrue(context.github.issues.createComment.calledOnce); }; obj['it says the user fixed it'] = function(err, context) { @@ -112,7 +126,8 @@ function correctNewRuleset(text) { }; } else { obj['it doesn\'t comment'] = function(err, context) { - assert.isTrue(context.issue.notCalled); + // Once for the labels, once for the comment + assert.isTrue(context.issue.calledOnce); }; } @@ -132,7 +147,7 @@ function problematicNewRuleset(text) { assert.ifError(err); }, 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); + assert.isTrue(context.github.issues.createComment.calledOnce); }, 'it includes the problem': function(err, context) { // args[0] is first call arguments, second [0] is first arg diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 8b74f79e8649..74c705806a98 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -9,7 +9,7 @@ vows.describe('new issue handler').addBatch( handlerutil.setup('../../lib/newissue', { 'and we pass it the context of a new issue with a null body': handlerutil.nullBody('can\'t find any text'), 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), - 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset, + 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset(), 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); From d7df641d46c488f1a0ac9d8b264ff6f4297bdf92 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 23:06:30 -0400 Subject: [PATCH 63/96] Eliminate edit handler race condition Basically, make the handler an AsyncFunction again and then _actually_ fix the tests. --- utils/issue-format-bot/lib/issueedit.js | 6 ++---- utils/issue-format-bot/test/lib/handlerutil.js | 14 +++++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index d34d12abfa07..097611c91ed2 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -8,7 +8,7 @@ const parse = require('./parse'), // TODO make this share more with newissue.js? module.exports = function(robot, alexa) { - return context => { + return async context => { robot.log('Issue #' + context.payload.issue.number + ' edited; responding.'); // Check if the "issue" is really a PR @@ -41,9 +41,7 @@ module.exports = function(robot, alexa) { if (problems.length === 0) { // User submission is OK const params = context.issue({body: 'Thanks! Your edit helped me out. I\'ll take it from here now.'}); - // This races with the labeler, but it's so hard to fix it's not worth it. - // See the commit that introduced this comment for a detailed explanation. - context.github.issues.createComment(params); + await context.github.issues.createComment(params); return labeler(context, data, alexa); } else { diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 85895a41f5a6..3b616722aaa6 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -92,9 +92,17 @@ function correctNewRuleset(text) { topic: function(handler) { const context = makeContext.issue('Type: new ruleset\nDomain: domain10.com'); - handler(context); - - return context; + const result = handler(context); + + // Edit handler is an AsyncFunction, new issue handler is a Function + if (result && result.then) { + // Perjury doesn't support promises, so we manually invoke the callback + result.then(() => { + this.callback(null, context); + }); + } else { + return context; + } }, 'it works': function(err) { assert.ifError(err); From 0dd85ee52a7eea7e95fb050026d16a5989083971 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 23:17:38 -0400 Subject: [PATCH 64/96] Squash more linter errors --- utils/issue-format-bot/.eslintrc.json | 2 -- utils/issue-format-bot/test/issueedit-handler-test.js | 3 --- utils/issue-format-bot/test/newissue-handler-test.js | 2 -- 3 files changed, 7 deletions(-) diff --git a/utils/issue-format-bot/.eslintrc.json b/utils/issue-format-bot/.eslintrc.json index 3e7162416344..5a8b632a5bad 100644 --- a/utils/issue-format-bot/.eslintrc.json +++ b/utils/issue-format-bot/.eslintrc.json @@ -113,7 +113,6 @@ "max-params": "error", "max-statements": "off", "max-statements-per-line": "error", - "multiline-ternary": "error", "new-cap": "error", "new-parens": "error", "newline-after-var": "off", @@ -194,7 +193,6 @@ "no-sync": "off", "no-tabs": "off", "no-template-curly-in-string": "error", - "no-ternary": "error", "no-throw-literal": "error", "no-trailing-spaces": "error", "no-undef-init": "error", diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 7bf0f290d0fc..2f9d4cc423ec 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -1,9 +1,6 @@ 'use strict'; const vows = require('perjury'), - assert = vows.assert, - robot = require('./mocks/robot'), - makeContext = require('./mocks/context'), handlerutil = require('./lib/handlerutil'); vows.describe('issue edit handler').addBatch( diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 74c705806a98..dc8a8ee970e2 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -1,8 +1,6 @@ 'use strict'; const vows = require('perjury'), - assert = vows.assert, - makeContext = require('./mocks/context'), handlerutil = require('./lib/handlerutil'); vows.describe('new issue handler').addBatch( From bebeac60d45bb0061dcf2ebe92dabc99aa9f2eb9 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 23:43:01 -0400 Subject: [PATCH 65/96] Test that freeform comments work --- utils/issue-format-bot/test/issueedit-handler-test.js | 3 ++- utils/issue-format-bot/test/lib/handlerutil.js | 5 ++--- utils/issue-format-bot/test/newissue-handler-test.js | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 2f9d4cc423ec..186fc07fbba7 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -7,7 +7,8 @@ vows.describe('issue edit handler').addBatch( handlerutil.setup('../../lib/issueedit', { 'and we pass it the context of an issue edit with a null body': handlerutil.nullBody('don\'t see any text'), 'and we pass it the context of a issue edit with a bad type': handlerutil.badType('type of issue'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('take it from here'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com', 'take it from here', 'take it from here'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with freeform comments': handlerutil.correctNewRuleset('Type: new ruleset\nDomain:domain10.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!', 'take it from here'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 3b616722aaa6..65b64225fa2b 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -85,12 +85,12 @@ function badType(text) { }; } -function correctNewRuleset(text) { +function correctNewRuleset(issueText, text) { const expectingEdit = Boolean(text); let obj = { topic: function(handler) { - const context = makeContext.issue('Type: new ruleset\nDomain: domain10.com'); + const context = makeContext.issue(issueText); const result = handler(context); @@ -117,7 +117,6 @@ function correctNewRuleset(text) { assert.isObject(args[0]); assert.isArray(args[0].labels); assert.deepEqual(args[0].labels, ['top-100']); - } }; diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index dc8a8ee970e2..25f32b5c8407 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -7,7 +7,8 @@ vows.describe('new issue handler').addBatch( handlerutil.setup('../../lib/newissue', { 'and we pass it the context of a new issue with a null body': handlerutil.nullBody('can\'t find any text'), 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), - 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset(), + 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with freeform comments': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!'), 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); From 8670a2938c3043c324300b8e39efc73765d5c1ac Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Thu, 3 Aug 2017 00:01:09 -0400 Subject: [PATCH 66/96] Switch to AGPL --- utils/issue-format-bot/LICENSE | 147 +++++++++++++--------------- utils/issue-format-bot/package.json | 2 +- 2 files changed, 68 insertions(+), 81 deletions(-) diff --git a/utils/issue-format-bot/LICENSE b/utils/issue-format-bot/LICENSE index 94a9ed024d38..dba13ed2ddf7 100644 --- a/utils/issue-format-bot/LICENSE +++ b/utils/issue-format-bot/LICENSE @@ -1,5 +1,5 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies @@ -7,17 +7,15 @@ Preamble - The GNU General Public License is a free, copyleft license for -software and other kinds of works. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to +our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. +software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you @@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. The precise terms and conditions for copying, distribution and modification follow. @@ -72,7 +60,7 @@ modification follow. 0. Definitions. - "This License" refers to version 3 of the GNU General Public License. + "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. @@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - 13. Use with the GNU Affero General Public License. + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single +under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General +Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published +GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's +versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. @@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by + it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Affero General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see +For more information on this, and how to apply and follow the GNU AGPL, see . - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index d93c3eb2759e..0710f3dcf48c 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -4,7 +4,7 @@ "description": "GitHub bot to parse ruleset issues", "author": "AJ Jordan ", "main": "index.js", - "license": "GPL-3.0+", + "license": "AGPL-3.0+", "repository": { "type": "git", "url": "git+https://github.com/EFForg/HTTPS-Everywhere.git" From c75c28335f119f29d1081b820bc2acea3cfc27d3 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 2 Aug 2017 23:59:54 -0400 Subject: [PATCH 67/96] Add AGPL comment headers --- utils/issue-format-bot/index.js | 17 +++++++++++++++++ utils/issue-format-bot/lib/alexa.js | 17 +++++++++++++++++ utils/issue-format-bot/lib/issueedit.js | 17 +++++++++++++++++ utils/issue-format-bot/lib/labeler.js | 17 +++++++++++++++++ utils/issue-format-bot/lib/newissue.js | 17 +++++++++++++++++ utils/issue-format-bot/lib/parse.js | 17 +++++++++++++++++ utils/issue-format-bot/lib/validate.js | 17 +++++++++++++++++ utils/issue-format-bot/test/alexa-mock-test.js | 17 +++++++++++++++++ .../issue-format-bot/test/context-mock-test.js | 17 +++++++++++++++++ .../test/issueedit-handler-test.js | 17 +++++++++++++++++ utils/issue-format-bot/test/labeler-test.js | 17 +++++++++++++++++ utils/issue-format-bot/test/lib/handlerutil.js | 17 +++++++++++++++++ utils/issue-format-bot/test/mocks/alexa.js | 17 +++++++++++++++++ utils/issue-format-bot/test/mocks/context.js | 17 +++++++++++++++++ utils/issue-format-bot/test/mocks/robot.js | 17 +++++++++++++++++ .../test/newissue-handler-test.js | 17 +++++++++++++++++ utils/issue-format-bot/test/parse-test.js | 17 +++++++++++++++++ utils/issue-format-bot/test/robot-mock-test.js | 17 +++++++++++++++++ utils/issue-format-bot/test/validate-test.js | 17 +++++++++++++++++ 19 files changed, 323 insertions(+) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index 7f78826f3f63..8bc9f9c76877 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const alexa = require('./lib/alexa'), diff --git a/utils/issue-format-bot/lib/alexa.js b/utils/issue-format-bot/lib/alexa.js index 662b43241a2d..0729cda2103f 100644 --- a/utils/issue-format-bot/lib/alexa.js +++ b/utils/issue-format-bot/lib/alexa.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const request = require('request'), diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index 097611c91ed2..0079f9d168b2 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const parse = require('./parse'), diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js index 008f3b041615..a1ecd4c270c5 100644 --- a/utils/issue-format-bot/lib/labeler.js +++ b/utils/issue-format-bot/lib/labeler.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; module.exports = function label(context, data, alexa) { diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 2f1adb98c3d3..35ee967a09e5 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const parse = require('./parse'), diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 8880d5ac8e57..42e9c168135e 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + // Takes in an issue body and parses it into key-value pairs, normalizes it, and returns an Object 'use strict'; diff --git a/utils/issue-format-bot/lib/validate.js b/utils/issue-format-bot/lib/validate.js index a9dda07e2aee..73bcc56425d6 100644 --- a/utils/issue-format-bot/lib/validate.js +++ b/utils/issue-format-bot/lib/validate.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; module.exports = function validate(data) { diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index 3a578a284869..eefc5492b56c 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const vows = require('perjury'), diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 799517213e8c..54305e5cc0b6 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + const vows = require('perjury'), assert = vows.assert, _ = require('lodash'); diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 186fc07fbba7..0c063a8596f2 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const vows = require('perjury'), diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js index ae0345ab467e..bc157a1a2fff 100644 --- a/utils/issue-format-bot/test/labeler-test.js +++ b/utils/issue-format-bot/test/labeler-test.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const vows = require('perjury'), diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 65b64225fa2b..22c3c0385348 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const vows = require('perjury'), diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index d59815f9ec91..eaba24136bc4 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const SIZE = 1000; diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index ca9d5801d009..9ef45b678713 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const sinon = require('sinon'); diff --git a/utils/issue-format-bot/test/mocks/robot.js b/utils/issue-format-bot/test/mocks/robot.js index d44d69118fb1..17425f7c7069 100644 --- a/utils/issue-format-bot/test/mocks/robot.js +++ b/utils/issue-format-bot/test/mocks/robot.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; function noop() {} diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 25f32b5c8407..a77a9b22a866 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const vows = require('perjury'), diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index b4cc0ae75210..0e713901e2bf 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const vows = require('perjury'), diff --git a/utils/issue-format-bot/test/robot-mock-test.js b/utils/issue-format-bot/test/robot-mock-test.js index b59c94b4c33d..35c60ee6497c 100644 --- a/utils/issue-format-bot/test/robot-mock-test.js +++ b/utils/issue-format-bot/test/robot-mock-test.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const vows = require('perjury'), diff --git a/utils/issue-format-bot/test/validate-test.js b/utils/issue-format-bot/test/validate-test.js index ece5f85925e7..dbb459f78c0b 100644 --- a/utils/issue-format-bot/test/validate-test.js +++ b/utils/issue-format-bot/test/validate-test.js @@ -1,3 +1,20 @@ +// This file is part of the HTTPS Everywhere issue management bot. +// +// The HTTPS Everywhere issue management bot is free software: you can +// redistribute it and/or modify it under the terms of the GNU Affero +// General Public License as published by the Free Software +// Foundation, either version 3 of the License, or (at your option) +// any later version. +// +// The HTTPS Everywhere issue management bot is distributed in the +// hope that it will be useful, but WITHOUT ANY WARRANTY; without even +// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public +// License along with the HTTPS Everywhere issue management bot. If +// not, see . + 'use strict'; const vows = require('perjury'), From 7d207e2dd7c91f08f13cdefa4dffdf43c8d3e0b1 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Thu, 3 Aug 2017 00:10:16 -0400 Subject: [PATCH 68/96] Add copyright notices --- utils/issue-format-bot/index.js | 2 ++ utils/issue-format-bot/lib/alexa.js | 3 +++ utils/issue-format-bot/lib/issueedit.js | 2 ++ utils/issue-format-bot/lib/labeler.js | 2 ++ utils/issue-format-bot/lib/newissue.js | 2 ++ utils/issue-format-bot/lib/parse.js | 2 ++ utils/issue-format-bot/lib/validate.js | 2 ++ utils/issue-format-bot/test/alexa-mock-test.js | 2 ++ utils/issue-format-bot/test/context-mock-test.js | 2 ++ utils/issue-format-bot/test/issueedit-handler-test.js | 2 ++ utils/issue-format-bot/test/labeler-test.js | 2 ++ utils/issue-format-bot/test/lib/handlerutil.js | 2 ++ utils/issue-format-bot/test/mocks/alexa.js | 2 ++ utils/issue-format-bot/test/mocks/context.js | 2 ++ utils/issue-format-bot/test/mocks/robot.js | 2 ++ utils/issue-format-bot/test/newissue-handler-test.js | 2 ++ utils/issue-format-bot/test/parse-test.js | 2 ++ utils/issue-format-bot/test/robot-mock-test.js | 2 ++ utils/issue-format-bot/test/validate-test.js | 2 ++ 19 files changed, 39 insertions(+) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index 8bc9f9c76877..b613a9622541 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/lib/alexa.js b/utils/issue-format-bot/lib/alexa.js index 0729cda2103f..911a8327d480 100644 --- a/utils/issue-format-bot/lib/alexa.js +++ b/utils/issue-format-bot/lib/alexa.js @@ -1,3 +1,6 @@ +// Copyright 2016 William Budington +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index 0079f9d168b2..154328cb9b7c 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js index a1ecd4c270c5..b60e19b3388d 100644 --- a/utils/issue-format-bot/lib/labeler.js +++ b/utils/issue-format-bot/lib/labeler.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 35ee967a09e5..6f9e1ad81e0f 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 42e9c168135e..799df052d212 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/lib/validate.js b/utils/issue-format-bot/lib/validate.js index 73bcc56425d6..8dc152cffae6 100644 --- a/utils/issue-format-bot/lib/validate.js +++ b/utils/issue-format-bot/lib/validate.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index eefc5492b56c..cdba2da210a0 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 54305e5cc0b6..5ea20f4cb98c 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 0c063a8596f2..ebac6f7945c6 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js index bc157a1a2fff..7c683e4439e3 100644 --- a/utils/issue-format-bot/test/labeler-test.js +++ b/utils/issue-format-bot/test/labeler-test.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 22c3c0385348..1c9a8682be66 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index eaba24136bc4..9ded69ed9d3d 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 9ef45b678713..b4b1446e261a 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/mocks/robot.js b/utils/issue-format-bot/test/mocks/robot.js index 17425f7c7069..9e0328f95c6f 100644 --- a/utils/issue-format-bot/test/mocks/robot.js +++ b/utils/issue-format-bot/test/mocks/robot.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index a77a9b22a866..db3f7aa81fbd 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index 0e713901e2bf..22a641a31406 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/robot-mock-test.js b/utils/issue-format-bot/test/robot-mock-test.js index 35c60ee6497c..2fe75690016d 100644 --- a/utils/issue-format-bot/test/robot-mock-test.js +++ b/utils/issue-format-bot/test/robot-mock-test.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can diff --git a/utils/issue-format-bot/test/validate-test.js b/utils/issue-format-bot/test/validate-test.js index dbb459f78c0b..00caa737b444 100644 --- a/utils/issue-format-bot/test/validate-test.js +++ b/utils/issue-format-bot/test/validate-test.js @@ -1,3 +1,5 @@ +// Copyright 2017 AJ Jordan +// // This file is part of the HTTPS Everywhere issue management bot. // // The HTTPS Everywhere issue management bot is free software: you can From 0c70ce23a2bccc000dabb58b93dc44503011bf13 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Thu, 3 Aug 2017 13:28:03 -0400 Subject: [PATCH 69/96] Bump to probot@0.8.0 --- utils/issue-format-bot/package-lock.json | 1528 ++++++++++++++++++---- utils/issue-format-bot/package.json | 2 +- 2 files changed, 1262 insertions(+), 268 deletions(-) diff --git a/utils/issue-format-bot/package-lock.json b/utils/issue-format-bot/package-lock.json index 48691e504352..3810ed70dc7d 100644 --- a/utils/issue-format-bot/package-lock.json +++ b/utils/issue-format-bot/package-lock.json @@ -2,6 +2,7 @@ "name": "issue-format-bot", "version": "1.0.0", "lockfileVersion": 1, + "requires": true, "dependencies": { "acorn": { "version": "5.1.1", @@ -14,6 +15,9 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, + "requires": { + "acorn": "3.3.0" + }, "dependencies": { "acorn": { "version": "3.3.0", @@ -27,18 +31,19 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "dependencies": { - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - } + "requires": { + "extend": "3.0.1", + "semver": "5.3.0" } }, "ajv": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=" + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } }, "ajv-keywords": { "version": "1.5.1", @@ -77,12 +82,17 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", - "dev": true + "requires": { + "sprintf-js": "1.0.3" + } }, "arr-diff": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=" + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "1.1.0" + } }, "arr-flatten": { "version": "1.1.0", @@ -103,7 +113,10 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } }, "array-uniq": { "version": "1.0.3", @@ -119,7 +132,10 @@ "arrayify-compact": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/arrayify-compact/-/arrayify-compact-0.2.0.tgz", - "integrity": "sha1-RZFw4VXKErtRRISDnJ1xUHyA7E0=" + "integrity": "sha1-RZFw4VXKErtRRISDnJ1xUHyA7E0=", + "requires": { + "arr-flatten": "1.1.0" + } }, "arrify": { "version": "1.0.1", @@ -166,7 +182,12 @@ "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", - "dev": true + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } }, "bail": { "version": "1.0.1", @@ -187,34 +208,35 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "optional": true + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } }, "binary": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=" + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "requires": { + "buffers": "0.1.1", + "chainsaw": "0.1.0" + } }, "bl": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=" - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } + "requires": { + "readable-stream": "2.3.3" } }, "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=" + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "requires": { + "hoek": "2.16.3" + } }, "bottleneck": { "version": "1.16.0", @@ -224,12 +246,21 @@ "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=" + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } }, "braces": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=" + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } }, "buffer-equal-constant-time": { "version": "1.0.1", @@ -248,56 +279,51 @@ "dev": true }, "bunyan": { - "version": "1.8.10", - "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.10.tgz", - "integrity": "sha1-IB/t0mxwgLYy9BYHL1OpC5pSmBw=" + "version": "1.8.12", + "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.12.tgz", + "integrity": "sha1-8VDw9nSKvdcq6uhPBEA74u8RN5c=", + "requires": { + "dtrace-provider": "0.8.3", + "moment": "2.18.1", + "mv": "2.1.1", + "safe-json-stringify": "1.0.4" + } }, "bunyan-format": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/bunyan-format/-/bunyan-format-0.2.1.tgz", "integrity": "sha1-pLOw2ABwqGUnlBcmnj8A/wL7y0c=", - "dependencies": { - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=" - } + "requires": { + "ansicolors": "0.2.1", + "ansistyles": "0.1.3", + "xtend": "4.0.1" } }, "bunyan-sentry-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/bunyan-sentry-stream/-/bunyan-sentry-stream-1.1.0.tgz", "integrity": "sha1-iLhYDONku54C2ZdHrToqPRLrdu4=", - "dependencies": { - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=" - } + "requires": { + "lodash": "4.17.4" } }, "cache-manager": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/cache-manager/-/cache-manager-2.4.0.tgz", "integrity": "sha1-Jy5O7jpOzrsoH8sIZJmATlmmolE=", - "dependencies": { - "lru-cache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.0.tgz", - "integrity": "sha1-tcvwFVbBaWb+vlTO7A+03JDfbCg=" - } + "requires": { + "async": "1.5.2", + "lru-cache": "4.1.1" } }, "caller-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true + "dev": true, + "requires": { + "callsites": "0.2.0" + } }, "callsites": { "version": "0.2.0", @@ -324,13 +350,23 @@ "chainsaw": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=" + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "requires": { + "traverse": "0.3.9" + } }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, "dependencies": { "supports-color": { "version": "2.0.0", @@ -376,7 +412,12 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } }, "co": { "version": "4.6.0", @@ -404,7 +445,10 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", - "dev": true + "dev": true, + "requires": { + "color-name": "1.1.3" + } }, "color-name": { "version": "1.1.3", @@ -415,7 +459,15 @@ "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=" + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" }, "concat-map": { "version": "0.0.1", @@ -426,7 +478,12 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", - "dev": true + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } }, "cookie": { "version": "0.3.1", @@ -441,17 +498,27 @@ "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=" + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "requires": { + "boom": "2.10.1" + } }, "cwd": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/cwd/-/cwd-0.10.0.tgz", - "integrity": "sha1-FyQAaUBXwioTsM8WFix+S3p/5Wc=" + "integrity": "sha1-FyQAaUBXwioTsM8WFix+S3p/5Wc=", + "requires": { + "find-pkg": "0.1.2", + "fs-exists-sync": "0.1.0" + } }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + }, "dependencies": { "assert-plus": { "version": "1.0.0", @@ -463,7 +530,10 @@ "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=" + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "2.0.0" + } }, "decamelize": { "version": "1.2.0", @@ -481,19 +551,40 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "dev": true + "dev": true, + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + } }, "del": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.1" + }, "dependencies": { "globby": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } } } }, @@ -512,7 +603,11 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", - "dev": true + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } }, "dotenv": { "version": "4.0.0", @@ -523,35 +618,59 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.3.tgz", "integrity": "sha1-uhv8ZJMoXM/PxqtpzVxh10wqQ78=", - "optional": true + "optional": true, + "requires": { + "nan": "2.6.2" + } }, "ecc-jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true + "optional": true, + "requires": { + "jsbn": "0.1.1" + } }, "ecdsa-sig-formatter": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", - "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=" + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "requires": { + "base64url": "2.0.0", + "safe-buffer": "5.1.1" + } }, "error-ex": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=" + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "requires": { + "is-arrayish": "0.2.1" + } }, "es-abstract": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.7.0.tgz", "integrity": "sha1-363ndOAb/Nl/lhgCmMRJyGI/uUw=", - "dev": true + "dev": true, + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "1.1.0", + "is-callable": "1.1.3", + "is-regex": "1.0.4" + } }, "es-to-primitive": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "dev": true + "dev": true, + "requires": { + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" + } }, "escape-string-regexp": { "version": "1.0.5", @@ -564,12 +683,56 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.3.0.tgz", "integrity": "sha1-/NfJY3a780yF7mftABKimWQrEI8=", "dev": true, + "requires": { + "ajv": "5.2.2", + "babel-code-frame": "6.22.0", + "chalk": "1.1.3", + "concat-stream": "1.6.0", + "cross-spawn": "5.1.0", + "debug": "2.6.8", + "doctrine": "2.0.0", + "eslint-scope": "3.7.1", + "espree": "3.4.3", + "esquery": "1.0.0", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.3", + "imurmurhash": "0.1.4", + "inquirer": "3.2.1", + "is-resolvable": "1.0.0", + "js-yaml": "3.8.4", + "json-stable-stringify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "4.0.0", + "progress": "2.0.0", + "require-uncached": "1.0.3", + "semver": "5.3.0", + "strip-json-comments": "2.0.1", + "table": "4.0.1", + "text-table": "0.2.0" + }, "dependencies": { "ajv": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.2.tgz", "integrity": "sha1-R8aNaehvXZUxA7AHSpQw3GPaXjk=", - "dev": true + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "json-schema-traverse": "0.3.1", + "json-stable-stringify": "1.0.1" + } }, "ansi-escapes": { "version": "2.0.0", @@ -587,43 +750,86 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true + "dev": true, + "requires": { + "color-convert": "1.9.0" + } }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true + "dev": true, + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.2.14" + } }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } }, "inquirer": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.2.1.tgz", "integrity": "sha512-QgW3eiPN8gpj/K5vVpHADJJgrrF0ho/dZGylikGX7iqAdRgC9FVKYKWFLx6hZDBFcOLEoSqINYrVPeFAeG/PdA==", "dev": true, + "requires": { + "ansi-escapes": "2.0.0", + "chalk": "2.0.1", + "cli-cursor": "2.1.0", + "cli-width": "2.1.0", + "external-editor": "2.0.4", + "figures": "2.0.0", + "lodash": "4.17.4", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + }, "dependencies": { "chalk": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", - "dev": true + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.2.1" + } } } }, @@ -643,7 +849,10 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true + "dev": true, + "requires": { + "mimic-fn": "1.1.0" + } }, "pluralize": { "version": "4.0.0", @@ -661,13 +870,20 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } }, "run-async": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true + "dev": true, + "requires": { + "is-promise": "2.1.0" + } }, "rx-lite": { "version": "4.0.8", @@ -679,25 +895,44 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } }, "table": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", "integrity": "sha1-qBFsEz+sLGH0pCCrbN9cTWHw5DU=", "dev": true, + "requires": { + "ajv": "4.11.8", + "ajv-keywords": "1.5.1", + "chalk": "1.1.3", + "lodash": "4.17.4", + "slice-ansi": "0.0.4", + "string-width": "2.1.1" + }, "dependencies": { "ajv": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } } } } @@ -707,7 +942,10 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/eslint-config-probot/-/eslint-config-probot-0.1.0.tgz", "integrity": "sha1-Mw+4aGy1O/G5yKOsIlRhxEANT6k=", - "dev": true + "dev": true, + "requires": { + "eslint-config-xo": "0.18.2" + } }, "eslint-config-xo": { "version": "0.18.2", @@ -719,31 +957,45 @@ "version": "3.7.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "dev": true + "dev": true, + "requires": { + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } }, "espree": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/espree/-/espree-3.4.3.tgz", "integrity": "sha1-KRC1zNSc6JPC//+qtP2LOjG4I3Q=", - "dev": true + "dev": true, + "requires": { + "acorn": "5.1.1", + "acorn-jsx": "3.0.1" + } }, "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" }, "esquery": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", - "dev": true + "dev": true, + "requires": { + "estraverse": "4.2.0" + } }, "esrecurse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", - "dev": true + "dev": true, + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + } }, "estraverse": { "version": "4.2.0", @@ -760,23 +1012,41 @@ "expand-brackets": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=" + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "0.1.1" + } }, "expand-range": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=" + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "2.2.3" + } }, "expand-tilde": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", - "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=" + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "requires": { + "os-homedir": "1.0.2" + } }, "expect": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/expect/-/expect-1.20.2.tgz", "integrity": "sha1-1Fj+TFYAQDa64yMkFqP2Nh8E+WU=", - "dev": true + "dev": true, + "requires": { + "define-properties": "1.1.2", + "has": "1.0.1", + "is-equal": "1.5.5", + "is-regex": "1.0.4", + "object-inspect": "1.2.2", + "object-keys": "1.0.11", + "tmatch": "2.0.1" + } }, "extend": { "version": "3.0.1", @@ -786,18 +1056,29 @@ "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=" + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } }, "external-editor": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.4.tgz", "integrity": "sha1-HtkZnanL/i7y96MbL96LDRI2iXI=", - "dev": true + "dev": true, + "requires": { + "iconv-lite": "0.4.18", + "jschardet": "1.5.0", + "tmp": "0.0.31" + } }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=" + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "1.0.0" + } }, "extsprintf": { "version": "1.0.2", @@ -820,7 +1101,11 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true + "dev": true, + "requires": { + "flat-cache": "1.2.2", + "object-assign": "4.1.1" + } }, "filename-regex": { "version": "2.0.1", @@ -830,33 +1115,60 @@ "fill-range": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=" + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } }, "find-file-up": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-0.1.3.tgz", - "integrity": "sha1-z2gJG8+fMApA2kEbN9pczlovvqA=" + "integrity": "sha1-z2gJG8+fMApA2kEbN9pczlovvqA=", + "requires": { + "fs-exists-sync": "0.1.0", + "resolve-dir": "0.1.1" + } }, "find-pkg": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/find-pkg/-/find-pkg-0.1.2.tgz", - "integrity": "sha1-G9wiwG42NlUy4qJIBGhUuXiNpVc=" + "integrity": "sha1-G9wiwG42NlUy4qJIBGhUuXiNpVc=", + "requires": { + "find-file-up": "0.1.3" + } }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=" + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } }, "flat-cache": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz", "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=", - "dev": true + "dev": true, + "requires": { + "circular-json": "0.3.1", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } }, "follow-redirects": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-0.0.7.tgz", - "integrity": "sha1-NLkLqyqRGqNHVx2pDyK9NuzYqRk=" + "integrity": "sha1-NLkLqyqRGqNHVx2pDyK9NuzYqRk=", + "requires": { + "debug": "2.6.8", + "stream-consume": "0.1.0" + } }, "for-in": { "version": "1.0.2", @@ -866,7 +1178,10 @@ "for-own": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=" + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "1.0.2" + } }, "foreach": { "version": "2.0.5", @@ -882,13 +1197,21 @@ "form-data": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=" + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } }, "formatio": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", - "dev": true + "dev": true, + "requires": { + "samsam": "1.2.1" + } }, "fs-exists-sync": { "version": "0.1.0", @@ -904,11 +1227,20 @@ "version": "0.1.31", "resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.31.tgz", "integrity": "sha1-czfwWPu7vvqMn1YaKMqwhJICyYg=", + "requires": { + "graceful-fs": "3.0.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + }, "dependencies": { "graceful-fs": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", - "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=" + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "requires": { + "natives": "1.1.0" + } } } }, @@ -933,6 +1265,9 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + }, "dependencies": { "assert-plus": { "version": "1.0.0", @@ -944,42 +1279,81 @@ "github": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/github/-/github-9.2.0.tgz", - "integrity": "sha1-iohtxA3WNjZwfcr5nfPfJsWfFvw=" + "integrity": "sha1-iohtxA3WNjZwfcr5nfPfJsWfFvw=", + "requires": { + "follow-redirects": "0.0.7", + "https-proxy-agent": "1.0.0", + "mime": "1.3.6", + "netrc": "0.1.4" + } }, "github-app": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/github-app/-/github-app-3.0.0.tgz", - "integrity": "sha512-L4Flp85a4dHn67foggk7NDALwcP30/VB+9L3bSS07QG4Id3lMWiPBF2UZv9l1Kr+VLvFTCnfEiqikzfpt0L5+w==" + "integrity": "sha512-L4Flp85a4dHn67foggk7NDALwcP30/VB+9L3bSS07QG4Id3lMWiPBF2UZv9l1Kr+VLvFTCnfEiqikzfpt0L5+w==", + "requires": { + "github": "9.2.0", + "jsonwebtoken": "7.4.1" + } }, "github-webhook-handler": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/github-webhook-handler/-/github-webhook-handler-0.6.0.tgz", - "integrity": "sha1-CYHJOMFjWZBkoMVeadyp4hOTxpY=" + "integrity": "sha1-CYHJOMFjWZBkoMVeadyp4hOTxpY=", + "requires": { + "bl": "1.1.2", + "buffer-equal-constant-time": "1.0.1" + } }, "glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=" + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } }, "glob-base": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=" + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } }, "glob-parent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=" + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "2.0.1" + } }, "global-modules": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", - "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=" + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "requires": { + "global-prefix": "0.1.5", + "is-windows": "0.2.0" + } }, "global-prefix": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", - "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=" + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "requires": { + "homedir-polyfill": "1.0.1", + "ini": "1.3.4", + "is-windows": "0.2.0", + "which": "1.2.14" + } }, "globals": { "version": "9.18.0", @@ -1000,18 +1374,28 @@ "har-validator": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=" + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } }, "has": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=" + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "requires": { + "function-bind": "1.1.0" + } }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } }, "has-flag": { "version": "2.0.0", @@ -1022,12 +1406,21 @@ "has-glob": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-0.1.1.tgz", - "integrity": "sha1-omHEwqbGZ+DHe3AKfyl8Oe86pYk=" + "integrity": "sha1-omHEwqbGZ+DHe3AKfyl8Oe86pYk=", + "requires": { + "is-glob": "2.0.1" + } }, "hawk": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=" + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } }, "hoek": { "version": "2.16.3", @@ -1037,7 +1430,10 @@ "homedir-polyfill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=" + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "requires": { + "parse-passwd": "1.0.0" + } }, "hosted-git-info": { "version": "2.5.0", @@ -1048,12 +1444,22 @@ "http-signature": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=" + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.1" + } }, "https-proxy-agent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=" + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.8", + "extend": "3.0.1" + } }, "iconv-lite": { "version": "0.4.18", @@ -1076,7 +1482,11 @@ "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } }, "inherits": { "version": "2.0.3", @@ -1097,7 +1507,11 @@ "is-absolute": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", - "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=" + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "requires": { + "is-relative": "0.2.1", + "is-windows": "0.2.0" + } }, "is-alphabetical": { "version": "1.0.0", @@ -1112,7 +1526,11 @@ "is-alphanumerical": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.0.tgz", - "integrity": "sha1-4GSS5xnBvxXewjnk8a9fZ7TW578=" + "integrity": "sha1-4GSS5xnBvxXewjnk8a9fZ7TW578=", + "requires": { + "is-alphabetical": "1.0.0", + "is-decimal": "1.0.0" + } }, "is-arrayish": { "version": "0.2.1", @@ -1123,7 +1541,10 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-arrow-function/-/is-arrow-function-2.0.3.tgz", "integrity": "sha1-Kb4sLY2UUIUri7r7Y1unuNjofsI=", - "dev": true + "dev": true, + "requires": { + "is-callable": "1.1.3" + } }, "is-boolean-object": { "version": "1.0.0", @@ -1140,7 +1561,10 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } }, "is-callable": { "version": "1.1.3", @@ -1168,12 +1592,28 @@ "version": "1.5.5", "resolved": "https://registry.npmjs.org/is-equal/-/is-equal-1.5.5.tgz", "integrity": "sha1-XoXxlX4FKIMkf+s4aWWju6Ffuz0=", - "dev": true + "dev": true, + "requires": { + "has": "1.0.1", + "is-arrow-function": "2.0.3", + "is-boolean-object": "1.0.0", + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-generator-function": "1.0.6", + "is-number-object": "1.0.3", + "is-regex": "1.0.4", + "is-string": "1.0.4", + "is-symbol": "1.0.1", + "object.entries": "1.0.4" + } }, "is-equal-shallow": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=" + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "2.0.0" + } }, "is-extendable": { "version": "0.1.1", @@ -1189,7 +1629,10 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } }, "is-generator-function": { "version": "1.0.6", @@ -1200,7 +1643,10 @@ "is-glob": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=" + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } }, "is-hexadecimal": { "version": "1.0.0", @@ -1210,7 +1656,10 @@ "is-number": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=" + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "3.2.2" + } }, "is-number-object": { "version": "1.0.3", @@ -1228,13 +1677,19 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", - "dev": true + "dev": true, + "requires": { + "is-path-inside": "1.0.0" + } }, "is-path-inside": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", - "dev": true + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } }, "is-plain-obj": { "version": "1.1.0", @@ -1261,18 +1716,27 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true + "dev": true, + "requires": { + "has": "1.0.1" + } }, "is-relative": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", - "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=" + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "requires": { + "is-unc-path": "0.1.2" + } }, "is-resolvable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", - "dev": true + "dev": true, + "requires": { + "tryit": "1.0.3" + } }, "is-string": { "version": "1.0.4", @@ -1294,7 +1758,10 @@ "is-unc-path": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", - "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=" + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "requires": { + "unc-path-regex": "0.1.2" + } }, "is-utf8": { "version": "0.2.1", @@ -1340,7 +1807,10 @@ "isobject": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=" + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } }, "isstream": { "version": "0.1.2", @@ -1350,7 +1820,13 @@ "joi": { "version": "6.10.1", "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", - "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=" + "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", + "requires": { + "hoek": "2.16.3", + "isemail": "1.2.0", + "moment": "2.18.1", + "topo": "1.1.0" + } }, "js-tokens": { "version": "3.0.2", @@ -1362,7 +1838,10 @@ "version": "3.8.4", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.4.tgz", "integrity": "sha1-UgtFZPhlc7qWZir4Woyvp7S1pvY=", - "dev": true + "requires": { + "argparse": "1.0.9", + "esprima": "3.1.3" + } }, "jsbn": { "version": "0.1.1", @@ -1390,7 +1869,10 @@ "json-stable-stringify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=" + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } }, "json-stringify-safe": { "version": "5.0.1", @@ -1405,12 +1887,25 @@ "jsonwebtoken": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.1.tgz", - "integrity": "sha1-fKMk9SFfi+A5zTWmxFu4y3SkSPs=" + "integrity": "sha1-fKMk9SFfi+A5zTWmxFu4y3SkSPs=", + "requires": { + "joi": "6.10.1", + "jws": "3.1.4", + "lodash.once": "4.1.1", + "ms": "2.0.0", + "xtend": "4.0.1" + } }, "jsprim": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, "dependencies": { "assert-plus": { "version": "1.0.0", @@ -1422,60 +1917,108 @@ "jwa": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", - "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=" + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "5.1.1" + } }, "jws": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", - "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=" + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "2.0.0", + "jwa": "1.1.5", + "safe-buffer": "5.1.1" + } }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.5" + } }, "lazy-cache": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", - "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=" + "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=", + "requires": { + "set-getter": "0.1.0" + } }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=" + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } }, "load-pkg": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/load-pkg/-/load-pkg-3.0.1.tgz", - "integrity": "sha1-kjCzfsBOVpADBgvFiVHj7VCNWU8=" + "integrity": "sha1-kjCzfsBOVpADBgvFiVHj7VCNWU8=", + "requires": { + "find-pkg": "0.1.2" + } }, "load-plugins": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/load-plugins/-/load-plugins-2.1.2.tgz", - "integrity": "sha1-4A/99F4gZ7oYj8oEU+twPwSadtA=" + "integrity": "sha1-4A/99F4gZ7oYj8oEU+twPwSadtA=", + "requires": { + "app-name": "0.2.0", + "extend-shallow": "2.0.1", + "resolve-dep": "0.6.0" + } }, "localtunnel": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.8.3.tgz", "integrity": "sha1-3MWSL9hWUQN9S94k/ZMkjQsk6wU=", - "dev": true + "dev": true, + "requires": { + "debug": "2.6.8", + "openurl": "1.1.1", + "request": "2.81.0", + "yargs": "3.29.0" + } }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=" + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } }, "lodash": { "version": "4.17.4", @@ -1507,13 +2050,20 @@ "lookup-path": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/lookup-path/-/lookup-path-0.3.1.tgz", - "integrity": "sha1-pO8kEK4yZpr3AMTLfhsBCVCc8rg=" + "integrity": "sha1-pO8kEK4yZpr3AMTLfhsBCVCc8rg=", + "requires": { + "debug": "2.6.8", + "is-absolute": "0.2.6" + } }, "lru-cache": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "dev": true + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } }, "lsmod": { "version": "1.0.0", @@ -1534,6 +2084,10 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz", "integrity": "sha1-mesFAJOzTf+t5CG5rAtBCpz6F88=", + "requires": { + "buffers": "0.1.1", + "readable-stream": "1.0.34" + }, "dependencies": { "isarray": { "version": "0.0.1", @@ -1543,7 +2097,13 @@ "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } }, "string_decoder": { "version": "0.10.31", @@ -1555,17 +2115,47 @@ "matched": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz", - "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=" + "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=", + "requires": { + "arr-union": "3.1.0", + "async-array-reduce": "0.2.1", + "extend-shallow": "2.0.1", + "fs-exists-sync": "0.1.0", + "glob": "7.1.1", + "has-glob": "0.1.1", + "is-valid-glob": "0.3.0", + "lazy-cache": "2.0.2", + "resolve-dir": "0.1.1" + } }, "mdast-util-compact": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.1.tgz", - "integrity": "sha1-zbX4TitqLTEU3zO9BdnLMuPECDo=" + "integrity": "sha1-zbX4TitqLTEU3zO9BdnLMuPECDo=", + "requires": { + "unist-util-modify-children": "1.1.1", + "unist-util-visit": "1.1.3" + } }, "micromatch": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=" + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.3" + } }, "mime": { "version": "1.3.6", @@ -1580,7 +2170,10 @@ "mime-types": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", - "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=" + "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", + "requires": { + "mime-db": "1.27.0" + } }, "mimic-fn": { "version": "1.1.0", @@ -1591,7 +2184,10 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } }, "minimist": { "version": "0.0.8", @@ -1601,7 +2197,10 @@ "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=" + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } }, "moment": { "version": "2.18.1", @@ -1618,19 +2217,10 @@ "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", "optional": true, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "optional": true - }, - "rimraf": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", - "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", - "optional": true - } + "requires": { + "mkdirp": "0.5.1", + "ncp": "2.0.0", + "rimraf": "2.6.1" } }, "nan": { @@ -1671,12 +2261,21 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.3.0", + "validate-npm-package-license": "3.0.1" + } }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=" + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.0.2" + } }, "number-is-nan": { "version": "1.0.1", @@ -1711,17 +2310,30 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz", "integrity": "sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8=", - "dev": true + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.7.0", + "function-bind": "1.1.0", + "has": "1.0.1" + } }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=" + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } }, "openurl": { "version": "1.1.1", @@ -1733,7 +2345,15 @@ "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + } }, "os-homedir": { "version": "1.0.2", @@ -1744,7 +2364,10 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true + "dev": true, + "requires": { + "lcid": "1.0.0" + } }, "os-tmpdir": { "version": "1.0.2", @@ -1765,22 +2388,42 @@ "p-locate": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=" + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "1.1.0" + } }, "parse-entities": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.1.1.tgz", - "integrity": "sha1-gRLYhHExnyerrk1klksSL+ThuJA=" + "integrity": "sha1-gRLYhHExnyerrk1klksSL+ThuJA=", + "requires": { + "character-entities": "1.2.0", + "character-entities-legacy": "1.1.0", + "character-reference-invalid": "1.1.0", + "is-alphanumerical": "1.0.0", + "is-decimal": "1.0.0", + "is-hexadecimal": "1.0.0" + } }, "parse-glob": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=" + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=" + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "1.3.1" + } }, "parse-passwd": { "version": "1.0.0", @@ -1813,6 +2456,9 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", "dev": true, + "requires": { + "isarray": "0.0.1" + }, "dependencies": { "isarray": { "version": "0.0.1", @@ -1832,54 +2478,95 @@ "resolved": "https://registry.npmjs.org/perjury/-/perjury-0.4.3.tgz", "integrity": "sha1-DX1rxAH7LtULWISudckYwmZtQEw=", "dev": true, + "requires": { + "async": "2.5.0", + "coffee-script": "1.12.6", + "debug": "2.6.8", + "lodash": "4.17.4", + "yargs": "5.0.0" + }, "dependencies": { "async": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", - "dev": true + "dev": true, + "requires": { + "lodash": "4.17.4" + } }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } }, "read-pkg-up": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } }, "strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } }, "window-size": { "version": "0.2.0", @@ -1891,7 +2578,23 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-5.0.0.tgz", "integrity": "sha1-M1UUSXfQV1fbuG1uOOwFYSOzpm4=", - "dev": true + "dev": true, + "requires": { + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "lodash.assign": "4.2.0", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "window-size": "0.2.0", + "y18n": "3.2.1", + "yargs-parser": "3.2.0" + } } } }, @@ -1910,12 +2613,19 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true + "dev": true, + "requires": { + "pinkie": "2.0.4" + } }, "pkg-conf": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.0.0.tgz", - "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=" + "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=", + "requires": { + "find-up": "2.1.0", + "load-json-file": "2.0.0" + } }, "prelude-ls": { "version": "1.1.2", @@ -1929,15 +2639,27 @@ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" }, "probot": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/probot/-/probot-0.7.4.tgz", - "integrity": "sha512-yoFCu0oZ26UUrlD0D0ckgBRw3OS+gE0gw938AfcTAs2x6zxY8J6FcQcfQ/a66pXIEawHPXlwkb2amMOg05UTzg==", - "dependencies": { - "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" - } + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/probot/-/probot-0.8.0.tgz", + "integrity": "sha512-9VthnUQqJ+XLYO/4serdC10CWKhnJOkN17VwaFjK69f2e8HvXkXwUdZBWk6q7sgorZeByfFOOJA5BOobI3LUwg==", + "requires": { + "bottleneck": "1.16.0", + "bunyan": "1.8.12", + "bunyan-format": "0.2.1", + "bunyan-sentry-stream": "1.1.0", + "cache-manager": "2.4.0", + "commander": "2.11.0", + "dotenv": "4.0.0", + "github": "9.2.0", + "github-app": "3.0.0", + "github-webhook-handler": "0.6.0", + "js-yaml": "3.8.4", + "load-plugins": "2.1.2", + "pkg-conf": "2.0.0", + "promise-events": "0.1.3", + "raven": "2.1.1", + "resolve": "1.4.0", + "semver": "5.3.0" } }, "process-nextick-args": { @@ -1959,6 +2681,12 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/pullstream/-/pullstream-0.4.1.tgz", "integrity": "sha1-1vs79a7Wl+gxFQ6xACwlo/iuExQ=", + "requires": { + "over": "0.0.5", + "readable-stream": "1.0.34", + "setimmediate": "1.0.5", + "slice-stream": "1.0.0" + }, "dependencies": { "isarray": { "version": "0.0.1", @@ -1968,7 +2696,13 @@ "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } }, "string_decoder": { "version": "0.10.31", @@ -1991,63 +2725,128 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, "dependencies": { "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, "dependencies": { "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.5" + } } } }, "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=" + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.5" + } } } }, "raven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/raven/-/raven-2.1.0.tgz", - "integrity": "sha1-G2JOVjdNnJ2Tx0RIRhoqNWzjdSc=", - "dependencies": { - "uuid": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", - "integrity": "sha1-Zyj8BFnEUNeWqZwxg3VpvfZy1yg=" - } + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/raven/-/raven-2.1.1.tgz", + "integrity": "sha1-s6l0xsKTFcZ3wHnhaENerRllJc0=", + "requires": { + "cookie": "0.3.1", + "json-stringify-safe": "5.0.1", + "lsmod": "1.0.0", + "stack-trace": "0.0.9", + "timed-out": "4.0.1", + "uuid": "3.1.0" } }, "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "dev": true + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } }, "regex-cache": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", - "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=" + "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", + "requires": { + "is-equal-shallow": "0.1.3", + "is-primitive": "2.0.0" + } }, "remark": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/remark/-/remark-7.0.1.tgz", - "integrity": "sha1-pd5NrPq/D2CkmCbvJMR5gH+QS/s=" + "integrity": "sha1-pd5NrPq/D2CkmCbvJMR5gH+QS/s=", + "requires": { + "remark-parse": "3.0.1", + "remark-stringify": "3.0.1", + "unified": "6.1.5" + } }, "remark-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-3.0.1.tgz", - "integrity": "sha1-G5+EGkTY9PvyJGhQJlRZpOs1TIA=" + "integrity": "sha1-G5+EGkTY9PvyJGhQJlRZpOs1TIA=", + "requires": { + "collapse-white-space": "1.0.3", + "has": "1.0.1", + "is-alphabetical": "1.0.0", + "is-decimal": "1.0.0", + "is-whitespace-character": "1.0.0", + "is-word-character": "1.0.0", + "markdown-escapes": "1.0.0", + "parse-entities": "1.1.1", + "repeat-string": "1.6.1", + "state-toggle": "1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "1.1.0", + "unherit": "1.1.0", + "unist-util-remove-position": "1.1.1", + "vfile-location": "2.0.1", + "xtend": "4.0.1" + } }, "remark-stringify": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-3.0.1.tgz", - "integrity": "sha1-eSQr6+CnUggbWAlRb6DAbt7Aac8=" + "integrity": "sha1-eSQr6+CnUggbWAlRb6DAbt7Aac8=", + "requires": { + "ccount": "1.0.1", + "is-alphanumeric": "1.0.0", + "is-decimal": "1.0.0", + "is-whitespace-character": "1.0.0", + "longest-streak": "2.0.1", + "markdown-escapes": "1.0.0", + "markdown-table": "1.1.0", + "mdast-util-compact": "1.0.1", + "parse-entities": "1.1.1", + "repeat-string": "1.6.1", + "state-toggle": "1.0.0", + "stringify-entities": "1.3.1", + "unherit": "1.1.0", + "xtend": "4.0.1" + } }, "remove-trailing-separator": { "version": "1.0.2", @@ -2072,7 +2871,31 @@ "request": { "version": "2.81.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=" + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } }, "require-directory": { "version": "2.1.1", @@ -2091,6 +2914,10 @@ "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + }, "dependencies": { "resolve-from": { "version": "1.0.1", @@ -2101,24 +2928,44 @@ } }, "resolve": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", - "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "requires": { + "path-parse": "1.0.5" + } }, "resolve-dep": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/resolve-dep/-/resolve-dep-0.6.0.tgz", - "integrity": "sha1-Zz8UQed3hS/WrYE2XOfV2FRVpPs=" + "integrity": "sha1-Zz8UQed3hS/WrYE2XOfV2FRVpPs=", + "requires": { + "arrayify-compact": "0.2.0", + "cwd": "0.10.0", + "extend-shallow": "2.0.1", + "load-pkg": "3.0.1", + "lookup-path": "0.3.1", + "matched": "0.4.4", + "micromatch": "2.3.11", + "resolve": "1.4.0" + } }, "resolve-dir": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", - "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=" + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "requires": { + "expand-tilde": "1.2.2", + "global-modules": "0.2.3" + } }, "rimraf": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=" + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "requires": { + "glob": "7.1.1" + } }, "rx-lite": { "version": "3.1.2", @@ -2130,7 +2977,10 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true + "dev": true, + "requires": { + "rx-lite": "3.1.2" + } }, "safe-buffer": { "version": "5.1.1", @@ -2163,7 +3013,10 @@ "set-getter": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", - "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=" + "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=", + "requires": { + "to-object-path": "0.3.0" + } }, "setimmediate": { "version": "1.0.5", @@ -2174,7 +3027,10 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } }, "shebang-regex": { "version": "1.0.0", @@ -2192,7 +3048,17 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.4.1.tgz", "integrity": "sha512-vFTrO9Wt0ECffDYIPSP/E5bBugt0UjcBQOfQUMh66xzkyPEnhl/vM2LRZi2ajuTdkH07sA6DzrM6KvdvGIH8xw==", - "dev": true + "dev": true, + "requires": { + "diff": "3.3.0", + "formatio": "1.2.0", + "lolex": "1.6.0", + "native-promise-only": "0.8.1", + "path-to-regexp": "1.7.0", + "samsam": "1.2.1", + "text-encoding": "0.6.4", + "type-detect": "4.0.3" + } }, "slice-ansi": { "version": "0.0.4", @@ -2204,6 +3070,9 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/slice-stream/-/slice-stream-1.0.0.tgz", "integrity": "sha1-WzO9ZvATsaf4ZGCwPUY97DmtPqA=", + "requires": { + "readable-stream": "1.0.34" + }, "dependencies": { "isarray": { "version": "0.0.1", @@ -2213,7 +3082,13 @@ "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } }, "string_decoder": { "version": "0.10.31", @@ -2225,13 +3100,19 @@ "sntp": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=" + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "requires": { + "hoek": "2.16.3" + } }, "spdx-correct": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "dev": true + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } }, "spdx-expression-parse": { "version": "1.0.4", @@ -2248,13 +3129,22 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "sshpk": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, "dependencies": { "assert-plus": { "version": "1.0.0", @@ -2282,18 +3172,31 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true + "requires": { + "safe-buffer": "5.1.1" + } }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } }, "stringify-entities": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.1.tgz", - "integrity": "sha1-sVDsLXKsTBtfMktR+2soyc3/BYw=" + "integrity": "sha1-sVDsLXKsTBtfMktR+2soyc3/BYw=", + "requires": { + "character-entities-html4": "1.1.0", + "character-entities-legacy": "1.1.0", + "is-alphanumerical": "1.0.0", + "is-hexadecimal": "1.0.0" + } }, "stringstream": { "version": "0.0.5", @@ -2304,7 +3207,10 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } }, "strip-bom": { "version": "3.0.0", @@ -2326,7 +3232,10 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.1.tgz", "integrity": "sha512-qxzYsob3yv6U+xMzPrv170y8AwGP7i74g+pbixCfD6rgso8BscLT2qXIuz6TpOaiJZ3mFgT5O9lyT9nMU4LfaA==", - "dev": true + "dev": true, + "requires": { + "has-flag": "2.0.0" + } }, "text-encoding": { "version": "0.6.4", @@ -2361,22 +3270,34 @@ "version": "0.0.31", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", - "dev": true + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=" + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "3.2.2" + } }, "topo": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", - "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=" + "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=", + "requires": { + "hoek": "2.16.3" + } }, "tough-cookie": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=" + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "requires": { + "punycode": "1.4.1" + } }, "traverse": { "version": "0.3.9", @@ -2407,7 +3328,10 @@ "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=" + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } }, "tweetnacl": { "version": "0.14.5", @@ -2419,7 +3343,10 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } }, "type-detect": { "version": "4.0.3", @@ -2441,22 +3368,41 @@ "unherit": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.0.tgz", - "integrity": "sha1-a5qu379z3xdWrZ4xbdmBiFhAzX0=" + "integrity": "sha1-a5qu379z3xdWrZ4xbdmBiFhAzX0=", + "requires": { + "inherits": "2.0.3", + "xtend": "4.0.1" + } }, "unified": { "version": "6.1.5", "resolved": "https://registry.npmjs.org/unified/-/unified-6.1.5.tgz", - "integrity": "sha1-cWk3hyYhpjE15iztLzrGoGPG+4c=" + "integrity": "sha1-cWk3hyYhpjE15iztLzrGoGPG+4c=", + "requires": { + "bail": "1.0.1", + "extend": "3.0.1", + "is-plain-obj": "1.1.0", + "trough": "1.0.0", + "vfile": "2.1.0", + "x-is-function": "1.0.4", + "x-is-string": "0.1.0" + } }, "unist-util-modify-children": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-1.1.1.tgz", - "integrity": "sha1-ZtfmpEnm9nIguXarPLi166w55R0=" + "integrity": "sha1-ZtfmpEnm9nIguXarPLi166w55R0=", + "requires": { + "array-iterate": "1.1.1" + } }, "unist-util-remove-position": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.1.tgz", - "integrity": "sha1-WoXBVV/BugwQG4ZwfRXlD6TIcbs=" + "integrity": "sha1-WoXBVV/BugwQG4ZwfRXlD6TIcbs=", + "requires": { + "unist-util-visit": "1.1.3" + } }, "unist-util-stringify-position": { "version": "1.1.1", @@ -2472,6 +3418,14 @@ "version": "0.1.11", "resolved": "https://registry.npmjs.org/unzip/-/unzip-0.1.11.tgz", "integrity": "sha1-iXScY7BY19kNYZ+GuYqhU107l/A=", + "requires": { + "binary": "0.3.0", + "fstream": "0.1.31", + "match-stream": "0.0.2", + "pullstream": "0.4.1", + "readable-stream": "1.0.34", + "setimmediate": "1.0.5" + }, "dependencies": { "isarray": { "version": "0.0.1", @@ -2481,7 +3435,13 @@ "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } }, "string_decoder": { "version": "0.10.31", @@ -2504,17 +3464,29 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "dev": true + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } }, "verror": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", - "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=" + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", + "requires": { + "extsprintf": "1.0.2" + } }, "vfile": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.1.0.tgz", - "integrity": "sha1-086Lgl57jVO4lhZDQSczgZNvAr0=" + "integrity": "sha1-086Lgl57jVO4lhZDQSczgZNvAr0=", + "requires": { + "is-buffer": "1.1.5", + "replace-ext": "1.0.0", + "unist-util-stringify-position": "1.1.1" + } }, "vfile-location": { "version": "2.0.1", @@ -2524,7 +3496,10 @@ "which": { "version": "1.2.14", "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=" + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "requires": { + "isexe": "2.0.0" + } }, "which-module": { "version": "1.0.0", @@ -2548,7 +3523,11 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } }, "wrappy": { "version": "1.0.2", @@ -2559,7 +3538,10 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } }, "x-is-function": { "version": "1.0.4", @@ -2591,13 +3573,25 @@ "version": "3.29.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.29.0.tgz", "integrity": "sha1-GquWYOrnnYuPZ1vK7qtu40ws9pw=", - "dev": true + "dev": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "window-size": "0.1.4", + "y18n": "3.2.1" + } }, "yargs-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-3.2.0.tgz", "integrity": "sha1-UIE1XRnZ0MjF2BrakIy05tGGZk8=", "dev": true, + "requires": { + "camelcase": "3.0.0", + "lodash.assign": "4.2.0" + }, "dependencies": { "camelcase": { "version": "3.0.0", diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 0710f3dcf48c..8d80b06fc1dc 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -32,7 +32,7 @@ }, "dependencies": { "lodash": "^4.17.4", - "probot": "^0.7.4", + "probot": "^0.8.0", "remark": "^7.0.1", "request": "^2.81.0", "strip-markdown": "^3.0.0", From 39c25ac93d71f08b2f5f32d0ad2e16e099d29006 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 7 Aug 2017 11:43:08 -0400 Subject: [PATCH 70/96] Clarify a TODO --- utils/issue-format-bot/test/lib/handlerutil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 1c9a8682be66..97a25c1c8736 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -26,7 +26,7 @@ const vows = require('perjury'), makeContext = require('../mocks/context'), _ = require('lodash'); -// TODO tests +// TODO tests for this file function setup(path, obj) { return { From 62f7f0459143bd30de1e43b5633ddc0a8814b14c Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 7 Aug 2017 11:43:44 -0400 Subject: [PATCH 71/96] Test that we handle colons in freeform comments --- utils/issue-format-bot/test/issueedit-handler-test.js | 2 ++ utils/issue-format-bot/test/newissue-handler-test.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index ebac6f7945c6..4859b2236d6e 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -28,6 +28,8 @@ vows.describe('issue edit handler').addBatch( 'and we pass it the context of a issue edit with a bad type': handlerutil.badType('type of issue'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com', 'take it from here', 'take it from here'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with freeform comments': handlerutil.correctNewRuleset('Type: new ruleset\nDomain:domain10.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!', 'take it from here'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a colon': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons.', 'take it from here'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with multiple colons': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.', 'take it from here'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index db3f7aa81fbd..458606be501e 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -28,6 +28,8 @@ vows.describe('new issue handler').addBatch( 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with freeform comments': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a colon': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons.'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with multiple colons': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.'), 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); From 412a084d4b770b2938b2d3f4b850f19c635091e9 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 7 Aug 2017 11:49:05 -0400 Subject: [PATCH 72/96] Make sure we can handle Markdown links --- utils/issue-format-bot/test/issueedit-handler-test.js | 1 + utils/issue-format-bot/test/newissue-handler-test.js | 1 + 2 files changed, 2 insertions(+) diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 4859b2236d6e..3474b2791041 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -30,6 +30,7 @@ vows.describe('issue edit handler').addBatch( 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with freeform comments': handlerutil.correctNewRuleset('Type: new ruleset\nDomain:domain10.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!', 'take it from here'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a colon': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons.', 'take it from here'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with multiple colons': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.', 'take it from here'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a Markdown link': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nPlease add [domain10.com][].\n\n [domain10.com]: http://domain10.com.', 'take it from here'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 458606be501e..656dcf9423ee 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -30,6 +30,7 @@ vows.describe('new issue handler').addBatch( 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with freeform comments': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a colon': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons.'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with multiple colons': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a Markdown link': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nPlease add [domain10.com][].\n\n [domain10.com]: http://domain10.com.'), 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); From 33b86f723a6f45e19c4a9c4648702fa208ed1da3 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 14 Aug 2017 16:56:09 -0400 Subject: [PATCH 73/96] Move some handler tests to the parse module test These were end-to-end tests, but really what we were asserting on is that the parse module could handle those cases. In the end-to-end tests all we care about is that the handlers have the correct behavior given a successful result from the parse module, regardless of how much the parser had to clean up the input. So move these tests were they belong, which is _just_ passing stuff directly to the parser module, instead of calling through everything in reality. --- .../test/issueedit-handler-test.js | 4 -- .../test/newissue-handler-test.js | 4 -- utils/issue-format-bot/test/parse-test.js | 48 +++++++++---------- 3 files changed, 22 insertions(+), 34 deletions(-) diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 3474b2791041..c54f486a654f 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -27,10 +27,6 @@ vows.describe('issue edit handler').addBatch( 'and we pass it the context of an issue edit with a null body': handlerutil.nullBody('don\'t see any text'), 'and we pass it the context of a issue edit with a bad type': handlerutil.badType('type of issue'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com', 'take it from here', 'take it from here'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with freeform comments': handlerutil.correctNewRuleset('Type: new ruleset\nDomain:domain10.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!', 'take it from here'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a colon': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons.', 'take it from here'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with multiple colons': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.', 'take it from here'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a Markdown link': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nPlease add [domain10.com][].\n\n [domain10.com]: http://domain10.com.', 'take it from here'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 656dcf9423ee..992f5262b66c 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -27,10 +27,6 @@ vows.describe('new issue handler').addBatch( 'and we pass it the context of a new issue with a null body': handlerutil.nullBody('can\'t find any text'), 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with freeform comments': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a colon': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons.'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with multiple colons': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body with a freeform comment with a Markdown link': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com\nPlease add [domain10.com][].\n\n [domain10.com]: http://domain10.com.'), 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') }) ).export(module); diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index 22a641a31406..2deb9f874478 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -23,6 +23,22 @@ const vows = require('perjury'), assert = vows.assert, _ = require('lodash'); +function assertCorrectBody(text) { + return { + topic: function(parse) { + return parse(text); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the object has the right data': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }; +} + vows.describe('issue parser module').addBatch({ 'When we require the module': { topic: function() { @@ -34,19 +50,7 @@ vows.describe('issue parser module').addBatch({ 'it\'s a function': function(err, parse) { assert.isFunction(parse); }, - 'and we pass it a body that\'s a ruleset issue': { - topic: function(parse) { - return parse('Type: ruleset issue\nDomain: example.com'); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the object has the right data': function(err, obj) { - assert.includes(obj, 'domain'); - assert.equal(obj.domain, 'example.com'); - } - }, + 'and we pass it a body that\'s a ruleset issue': assertCorrectBody('Type: ruleset issue\nDomain: example.com'), 'and we pass it a body with funky capitalization': { topic: function(parse) { return parse('tyPe: ruleset issue\nDoMaIn: example.com'); @@ -60,19 +64,7 @@ vows.describe('issue parser module').addBatch({ assert.equal(obj.domain, 'example.com'); } }, - 'and we pass it a body with out-of-order data': { - topic: function(parse) { - return parse('Domain: example.com\nType: ruleset issue'); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the object has the right data': function(err, obj) { - assert.includes(obj, 'domain'); - assert.equal(obj.domain, 'example.com'); - } - }, + 'and we pass it a body with out-of-order data': assertCorrectBody('Domain: example.com\nType: ruleset issue'), 'and we pass it a body with lots of whitespace': { topic: function(parse) { return parse('Type: ruleset issue \nDomain: \t\t example.com \t'); @@ -115,6 +107,10 @@ vows.describe('issue parser module').addBatch({ assert.equal(_.size(obj), 2); } }, + 'and we pass it a body that has a freeform comment': assertCorrectBody('Type: new ruleset\nDomain: example.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!'), + 'and we pass it a body that has a freeform comment with a Markdown link': assertCorrectBody('Type: new ruleset\nDomain: example.com\nPlease add [example.com][].\n\n [example.com]: http://example.com.'), + 'and we pass it a body that has a freeform comment with colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons.'), + 'and we pass it a body that has a freeform comment with multiple colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.'), 'and we pass it a body that isn\'t a valid issue type': { topic: function(parse) { return parse('Type: something else\nDomain: example.com'); From 0f51c4336769c41ced2ef517b8ae7f08bf1d145c Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 15 Aug 2017 01:22:56 -0700 Subject: [PATCH 74/96] Add WIP code to normalize URLs to domains --- utils/issue-format-bot/lib/parse.js | 6 +- utils/issue-format-bot/package-lock.json | 94 +++++++---------------- utils/issue-format-bot/package.json | 1 + utils/issue-format-bot/test/parse-test.js | 13 ++++ 4 files changed, 48 insertions(+), 66 deletions(-) diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 799df052d212..dfd749550296 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -24,7 +24,8 @@ const strip = require('strip-markdown'), remark = require('remark'), processor = remark().use(strip), - _ = require('lodash'); + _ = require('lodash'), + domainFromPartialUrl = require('domain-from-partial-url'); const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature request']; @@ -47,5 +48,8 @@ module.exports = function parseDescription(body) { // Convert to object let normalized = _.fromPairs(lines); + // TODO Markdown mangles this + normalized.domain = domainFromPartialUrl(normalized.domain); + return normalized; }; diff --git a/utils/issue-format-bot/package-lock.json b/utils/issue-format-bot/package-lock.json index 3810ed70dc7d..6c11ee6a1b14 100644 --- a/utils/issue-format-bot/package-lock.json +++ b/utils/issue-format-bot/package-lock.json @@ -54,8 +54,7 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "2.2.1", @@ -275,8 +274,7 @@ "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" }, "bunyan": { "version": "1.8.12", @@ -412,7 +410,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, "requires": { "string-width": "1.0.2", "strip-ansi": "3.0.1", @@ -427,14 +424,12 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "coffee-script": { "version": "1.12.6", "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.6.tgz", - "integrity": "sha1-KFo/cRVokGUGTWv570Vy22ZpXL8=", - "dev": true + "integrity": "sha1-KFo/cRVokGUGTWv570Vy22ZpXL8=" }, "collapse-white-space": { "version": "1.0.3", @@ -538,8 +533,7 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "deep-is": { "version": "0.1.3", @@ -609,6 +603,14 @@ "isarray": "1.0.0" } }, + "domain-from-partial-url": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/domain-from-partial-url/-/domain-from-partial-url-1.0.0.tgz", + "integrity": "sha512-l3qOjBAqPnHxZZeH/H4Oege3y91p1RfePB7h6iEIrK4YIrVxKKfrQYdkpepUJ3Zx3tgRzdXy7RmRc/4knCZ49A==", + "requires": { + "perjury": "0.4.3" + } + }, "dotenv": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", @@ -1258,8 +1260,7 @@ "get-caller-file": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "dev": true + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" }, "getpass": { "version": "0.1.7", @@ -1438,8 +1439,7 @@ "hosted-git-info": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", - "dev": true + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" }, "http-signature": { "version": "1.1.1", @@ -1501,8 +1501,7 @@ "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, "is-absolute": { "version": "0.2.6", @@ -1561,7 +1560,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, "requires": { "builtin-modules": "1.1.1" } @@ -1629,7 +1627,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, "requires": { "number-is-nan": "1.0.1" } @@ -1766,8 +1763,7 @@ "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, "is-valid-glob": { "version": "0.3.0", @@ -1955,7 +1951,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, "requires": { "invert-kv": "1.0.0" } @@ -2028,8 +2023,7 @@ "lodash.assign": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" }, "lodash.once": { "version": "4.1.1", @@ -2261,7 +2255,6 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, "requires": { "hosted-git-info": "2.5.0", "is-builtin-module": "1.0.0", @@ -2280,8 +2273,7 @@ "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "oauth-sign": { "version": "0.8.2", @@ -2364,7 +2356,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, "requires": { "lcid": "1.0.0" } @@ -2477,7 +2468,6 @@ "version": "0.4.3", "resolved": "https://registry.npmjs.org/perjury/-/perjury-0.4.3.tgz", "integrity": "sha1-DX1rxAH7LtULWISudckYwmZtQEw=", - "dev": true, "requires": { "async": "2.5.0", "coffee-script": "1.12.6", @@ -2490,7 +2480,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", - "dev": true, "requires": { "lodash": "4.17.4" } @@ -2499,7 +2488,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, "requires": { "path-exists": "2.1.0", "pinkie-promise": "2.0.1" @@ -2509,7 +2497,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, "requires": { "graceful-fs": "4.1.11", "parse-json": "2.2.0", @@ -2522,7 +2509,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, "requires": { "pinkie-promise": "2.0.1" } @@ -2531,7 +2517,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, "requires": { "graceful-fs": "4.1.11", "pify": "2.3.0", @@ -2542,7 +2527,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, "requires": { "load-json-file": "1.1.0", "normalize-package-data": "2.4.0", @@ -2553,7 +2537,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, "requires": { "find-up": "1.1.2", "read-pkg": "1.1.0" @@ -2563,7 +2546,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, "requires": { "is-utf8": "0.2.1" } @@ -2571,14 +2553,12 @@ "window-size": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", - "dev": true + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=" }, "yargs": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-5.0.0.tgz", "integrity": "sha1-M1UUSXfQV1fbuG1uOOwFYSOzpm4=", - "dev": true, "requires": { "cliui": "3.2.0", "decamelize": "1.2.0", @@ -2606,14 +2586,12 @@ "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, "requires": { "pinkie": "2.0.4" } @@ -2900,14 +2878,12 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, "require-uncached": { "version": "1.0.3", @@ -3007,8 +2983,7 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-getter": { "version": "0.1.0", @@ -3109,7 +3084,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "dev": true, "requires": { "spdx-license-ids": "1.2.2" } @@ -3117,14 +3091,12 @@ "spdx-expression-parse": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", - "dev": true + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" }, "spdx-license-ids": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", - "dev": true + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" }, "sprintf-js": { "version": "1.0.3", @@ -3180,7 +3152,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, "requires": { "code-point-at": "1.1.0", "is-fullwidth-code-point": "1.0.0", @@ -3207,7 +3178,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, "requires": { "ansi-regex": "2.1.1" } @@ -3464,7 +3434,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "dev": true, "requires": { "spdx-correct": "1.0.2", "spdx-expression-parse": "1.0.4" @@ -3504,8 +3473,7 @@ "which-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" }, "window-size": { "version": "0.1.4", @@ -3523,7 +3491,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, "requires": { "string-width": "1.0.2", "strip-ansi": "3.0.1" @@ -3561,8 +3528,7 @@ "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, "yallist": { "version": "2.1.2", @@ -3587,7 +3553,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-3.2.0.tgz", "integrity": "sha1-UIE1XRnZ0MjF2BrakIy05tGGZk8=", - "dev": true, "requires": { "camelcase": "3.0.0", "lodash.assign": "4.2.0" @@ -3596,8 +3561,7 @@ "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" } } } diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 8d80b06fc1dc..8a898a44948d 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -31,6 +31,7 @@ "npm": ">= 4.0.0" }, "dependencies": { + "domain-from-partial-url": "^1.0.0", "lodash": "^4.17.4", "probot": "^0.8.0", "remark": "^7.0.1", diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index 2deb9f874478..9542f1f4048b 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -107,6 +107,19 @@ vows.describe('issue parser module').addBatch({ assert.equal(_.size(obj), 2); } }, + 'and we pass it a body that has a full URL in the domain': { + topic: function(parse) { + return parse('Type: ruleset issue\nDomain: http://example.com/index.html'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the URL was converted into a bare domain': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }, 'and we pass it a body that has a freeform comment': assertCorrectBody('Type: new ruleset\nDomain: example.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!'), 'and we pass it a body that has a freeform comment with a Markdown link': assertCorrectBody('Type: new ruleset\nDomain: example.com\nPlease add [example.com][].\n\n [example.com]: http://example.com.'), 'and we pass it a body that has a freeform comment with colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons.'), From bff589bcd08e2844fb21de5b33df57afe7da82cb Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 23 Aug 2017 01:04:21 -0400 Subject: [PATCH 75/96] Allow issue type of "other" --- .github/ISSUE_TEMPLATE.md | 3 ++- utils/issue-format-bot/lib/parse.js | 3 ++- utils/issue-format-bot/test/parse-test.js | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2a7aac188c01..82a4643ded40 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,11 +1,12 @@ - + Type: ruleset issue Type: new ruleset Type: code issue Type: feature request +Type: other Domain: diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index dfd749550296..1c2923fac021 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -27,7 +27,8 @@ const strip = require('strip-markdown'), _ = require('lodash'), domainFromPartialUrl = require('domain-from-partial-url'); -const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature request']; +// XXX should this be moved to the validator module? +const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature request', 'other']; module.exports = function parseDescription(body) { const plaintext = String(processor.processSync(body)); diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index 9542f1f4048b..ee0a6d2e7d28 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -39,6 +39,21 @@ function assertCorrectBody(text) { }; } +function assertTypeSucceeds(type) { + return { + topic: function(parse) { + return parse('Type: ' + type); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the object is normal data': function(err, obj) { + assert.equal(obj.type, type); + } + }; +} + vows.describe('issue parser module').addBatch({ 'When we require the module': { topic: function() { @@ -124,6 +139,9 @@ vows.describe('issue parser module').addBatch({ 'and we pass it a body that has a freeform comment with a Markdown link': assertCorrectBody('Type: new ruleset\nDomain: example.com\nPlease add [example.com][].\n\n [example.com]: http://example.com.'), 'and we pass it a body that has a freeform comment with colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons.'), 'and we pass it a body that has a freeform comment with multiple colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.'), + 'and we pass it a code issue without any other data': assertTypeSucceeds('code issue'), + 'and we pass it a feature request without any other data': assertTypeSucceeds('feature request'), + 'and we pass it an issue labeled "other" without any other data': assertTypeSucceeds('other'), 'and we pass it a body that isn\'t a valid issue type': { topic: function(parse) { return parse('Type: something else\nDomain: example.com'); From e43bab26c7317b24c9bba622be3cff7760fc04af Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 23 Aug 2017 01:10:38 -0400 Subject: [PATCH 76/96] Enforce semicolons --- utils/issue-format-bot/.eslintrc.json | 5 ++++- utils/issue-format-bot/lib/validate.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/issue-format-bot/.eslintrc.json b/utils/issue-format-bot/.eslintrc.json index 5a8b632a5bad..55951250a06a 100644 --- a/utils/issue-format-bot/.eslintrc.json +++ b/utils/issue-format-bot/.eslintrc.json @@ -248,7 +248,10 @@ "require-await": "error", "require-jsdoc": "off", "rest-spread-spacing": "error", - "semi": "off", + "semi": [ + "error", + "always" + ], "semi-spacing": "error", "semi-style": [ "error", diff --git a/utils/issue-format-bot/lib/validate.js b/utils/issue-format-bot/lib/validate.js index 8dc152cffae6..bfa8557c8fe0 100644 --- a/utils/issue-format-bot/lib/validate.js +++ b/utils/issue-format-bot/lib/validate.js @@ -33,4 +33,4 @@ module.exports = function validate(data) { } return problems; -} +}; From ef46ac26e446c52651ceb2562f1be6c88f383c1a Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 23 Aug 2017 01:25:28 -0400 Subject: [PATCH 77/96] Fix indentation --- utils/issue-format-bot/lib/newissue.js | 30 ++++++++-------- .../issue-format-bot/test/lib/handlerutil.js | 34 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 6f9e1ad81e0f..f582fd1a476f 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -37,21 +37,21 @@ module.exports = function(robot, alexa) { const data = parse(context.payload.issue.body); - // Check if the data is problematic - if (data instanceof Error) { - // Dumb `switch` statement cases aren't technically blocks so saying `const params` in both of them causes redeclaration errors - let params; - switch (data.message) { - case 'invalid type': - params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); - return context.github.issues.createComment(params); - case 'null description': - params = context.issue({body: 'Hi! I can\'t find any text in your description - please edit it to use the issue template.'}); - return context.github.issues.createComment(params); - default: - throw data; - } - } + // Check if the data is problematic + if (data instanceof Error) { + // Dumb `switch` statement cases aren't technically blocks so saying `const params` in both of them causes redeclaration errors + let params; + switch (data.message) { + case 'invalid type': + params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); + return context.github.issues.createComment(params); + case 'null description': + params = context.issue({body: 'Hi! I can\'t find any text in your description - please edit it to use the issue template.'}); + return context.github.issues.createComment(params); + default: + throw data; + } + } const problems = validate(data); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 97a25c1c8736..1498669352eb 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -162,25 +162,25 @@ function correctNewRuleset(issueText, text) { function problematicNewRuleset(text) { return { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset'); + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset'); - handler(context); + handler(context); - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.github.issues.createComment.calledOnce); - }, - 'it includes the problem': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.github.issues.createComment.calledOnce); + }, + 'it includes the problem': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } }; } From c789c33a888f44e1c8635faabbfcee8f7e5274cd Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 23 Aug 2017 01:34:26 -0400 Subject: [PATCH 78/96] Fix undefined domains typecasting to a string --- utils/issue-format-bot/lib/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 1c2923fac021..99f596a135c6 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -50,7 +50,7 @@ module.exports = function parseDescription(body) { let normalized = _.fromPairs(lines); // TODO Markdown mangles this - normalized.domain = domainFromPartialUrl(normalized.domain); + if (normalized.domain) normalized.domain = domainFromPartialUrl(normalized.domain); return normalized; }; From 4da30b9c26deaa6a9d030d6c7a53211d9772aa60 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 23 Aug 2017 01:54:49 -0400 Subject: [PATCH 79/96] Fix full URL parsing --- utils/issue-format-bot/lib/parse.js | 10 +++++++--- utils/issue-format-bot/package-lock.json | 5 +++++ utils/issue-format-bot/package.json | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 99f596a135c6..6bfae4a165d0 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -25,7 +25,9 @@ const strip = require('strip-markdown'), remark = require('remark'), processor = remark().use(strip), _ = require('lodash'), - domainFromPartialUrl = require('domain-from-partial-url'); + domainFromPartialUrl = require('domain-from-partial-url'), + Entities = require('html-entities').AllHtmlEntities, + decode = (new Entities()).decode; // XXX should this be moved to the validator module? const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature request', 'other']; @@ -49,8 +51,10 @@ module.exports = function parseDescription(body) { // Convert to object let normalized = _.fromPairs(lines); - // TODO Markdown mangles this - if (normalized.domain) normalized.domain = domainFromPartialUrl(normalized.domain); + // Markdown mangles full URLs into HTML entities + // (e.g. `http://example.com/` instead of + // `http://example.com/`). So we decode them again. + if (normalized.domain) normalized.domain = domainFromPartialUrl(decode(normalized.domain)); return normalized; }; diff --git a/utils/issue-format-bot/package-lock.json b/utils/issue-format-bot/package-lock.json index 6c11ee6a1b14..9beedbfd28d4 100644 --- a/utils/issue-format-bot/package-lock.json +++ b/utils/issue-format-bot/package-lock.json @@ -1441,6 +1441,11 @@ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, "http-signature": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 8a898a44948d..64e81162eade 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -32,6 +32,7 @@ }, "dependencies": { "domain-from-partial-url": "^1.0.0", + "html-entities": "^1.2.1", "lodash": "^4.17.4", "probot": "^0.8.0", "remark": "^7.0.1", From 0ecb459b84826fd5425646accc21f8453cd40894 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Wed, 23 Aug 2017 23:54:32 -0400 Subject: [PATCH 80/96] Remove issue-format-bot .travis.yml --- utils/issue-format-bot/.travis.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 utils/issue-format-bot/.travis.yml diff --git a/utils/issue-format-bot/.travis.yml b/utils/issue-format-bot/.travis.yml deleted file mode 100644 index e5e69c4740bc..000000000000 --- a/utils/issue-format-bot/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -sudo: false -language: node_js -node_js: - - "7" -notifications: - disabled: true From 7b2dd77857c0c5a3c1bd63c7235721341a0b7a44 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Thu, 24 Aug 2017 00:03:01 -0400 Subject: [PATCH 81/96] Remove full AGPL headers --- utils/issue-format-bot/index.js | 19 +------------------ utils/issue-format-bot/lib/alexa.js | 18 +----------------- utils/issue-format-bot/lib/issueedit.js | 19 +------------------ utils/issue-format-bot/lib/labeler.js | 19 +------------------ utils/issue-format-bot/lib/newissue.js | 19 +------------------ utils/issue-format-bot/lib/parse.js | 19 +------------------ utils/issue-format-bot/lib/validate.js | 19 +------------------ .../issue-format-bot/test/alexa-mock-test.js | 19 +------------------ .../test/context-mock-test.js | 19 +------------------ .../test/issueedit-handler-test.js | 19 +------------------ utils/issue-format-bot/test/labeler-test.js | 19 +------------------ .../issue-format-bot/test/lib/handlerutil.js | 19 +------------------ utils/issue-format-bot/test/mocks/alexa.js | 19 +------------------ utils/issue-format-bot/test/mocks/context.js | 19 +------------------ utils/issue-format-bot/test/mocks/robot.js | 19 +------------------ .../test/newissue-handler-test.js | 19 +------------------ utils/issue-format-bot/test/parse-test.js | 19 +------------------ .../issue-format-bot/test/robot-mock-test.js | 19 +------------------ utils/issue-format-bot/test/validate-test.js | 19 +------------------ 19 files changed, 19 insertions(+), 341 deletions(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index b613a9622541..a9483aa5fe4f 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/lib/alexa.js b/utils/issue-format-bot/lib/alexa.js index 911a8327d480..8847b97eee7f 100644 --- a/utils/issue-format-bot/lib/alexa.js +++ b/utils/issue-format-bot/lib/alexa.js @@ -1,22 +1,6 @@ // Copyright 2016 William Budington // Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index 154328cb9b7c..f9c8f2b31826 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js index b60e19b3388d..ca43526f9d9b 100644 --- a/utils/issue-format-bot/lib/labeler.js +++ b/utils/issue-format-bot/lib/labeler.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index f582fd1a476f..0254f5916a9f 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 6bfae4a165d0..2e6cfabfb022 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ // Takes in an issue body and parses it into key-value pairs, normalizes it, and returns an Object diff --git a/utils/issue-format-bot/lib/validate.js b/utils/issue-format-bot/lib/validate.js index bfa8557c8fe0..d856b31a5134 100644 --- a/utils/issue-format-bot/lib/validate.js +++ b/utils/issue-format-bot/lib/validate.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index cdba2da210a0..ee16afb11b80 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 5ea20f4cb98c..8650c0346596 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ const vows = require('perjury'), assert = vows.assert, diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index c54f486a654f..d6e15a903eca 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js index 7c683e4439e3..25bc57c9c7da 100644 --- a/utils/issue-format-bot/test/labeler-test.js +++ b/utils/issue-format-bot/test/labeler-test.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 1498669352eb..c7f17b442602 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index 9ded69ed9d3d..fe6f94941ce9 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index b4b1446e261a..41ed97f4f030 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/mocks/robot.js b/utils/issue-format-bot/test/mocks/robot.js index 9e0328f95c6f..e63c1589271b 100644 --- a/utils/issue-format-bot/test/mocks/robot.js +++ b/utils/issue-format-bot/test/mocks/robot.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 992f5262b66c..05c5967ace7a 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index ee0a6d2e7d28..dfd741dd47d6 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/robot-mock-test.js b/utils/issue-format-bot/test/robot-mock-test.js index 2fe75690016d..3fd67ae0149e 100644 --- a/utils/issue-format-bot/test/robot-mock-test.js +++ b/utils/issue-format-bot/test/robot-mock-test.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; diff --git a/utils/issue-format-bot/test/validate-test.js b/utils/issue-format-bot/test/validate-test.js index 00caa737b444..e91fd71bfc6e 100644 --- a/utils/issue-format-bot/test/validate-test.js +++ b/utils/issue-format-bot/test/validate-test.js @@ -1,21 +1,4 @@ -// Copyright 2017 AJ Jordan -// -// This file is part of the HTTPS Everywhere issue management bot. -// -// The HTTPS Everywhere issue management bot is free software: you can -// redistribute it and/or modify it under the terms of the GNU Affero -// General Public License as published by the Free Software -// Foundation, either version 3 of the License, or (at your option) -// any later version. -// -// The HTTPS Everywhere issue management bot is distributed in the -// hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public -// License along with the HTTPS Everywhere issue management bot. If -// not, see . +// Copyright 2017 AJ Jordan, AGPLv3+ 'use strict'; From e45db864f2d67480f089e8eb569bf82e5c48f442 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Thu, 24 Aug 2017 00:08:55 -0400 Subject: [PATCH 82/96] Make issue-format-bot indentation 2 spaces --- utils/issue-format-bot/.eslintrc.json | 5 +- utils/issue-format-bot/index.js | 20 +- utils/issue-format-bot/lib/alexa.js | 50 +-- utils/issue-format-bot/lib/issueedit.js | 102 +++--- utils/issue-format-bot/lib/labeler.js | 36 +-- utils/issue-format-bot/lib/newissue.js | 98 +++--- utils/issue-format-bot/lib/parse.js | 48 +-- utils/issue-format-bot/lib/validate.js | 22 +- .../issue-format-bot/test/alexa-mock-test.js | 138 ++++----- .../test/context-mock-test.js | 88 +++--- .../test/issueedit-handler-test.js | 14 +- utils/issue-format-bot/test/labeler-test.js | 130 ++++---- .../issue-format-bot/test/lib/handlerutil.js | 292 +++++++++--------- utils/issue-format-bot/test/mocks/alexa.js | 68 ++-- utils/issue-format-bot/test/mocks/context.js | 34 +- utils/issue-format-bot/test/mocks/robot.js | 2 +- .../test/newissue-handler-test.js | 14 +- utils/issue-format-bot/test/parse-test.js | 270 ++++++++-------- .../issue-format-bot/test/robot-mock-test.js | 30 +- utils/issue-format-bot/test/validate-test.js | 96 +++--- 20 files changed, 778 insertions(+), 779 deletions(-) diff --git a/utils/issue-format-bot/.eslintrc.json b/utils/issue-format-bot/.eslintrc.json index 55951250a06a..b85af32eee51 100644 --- a/utils/issue-format-bot/.eslintrc.json +++ b/utils/issue-format-bot/.eslintrc.json @@ -87,7 +87,7 @@ "id-blacklist": "error", "id-length": "off", "id-match": "error", - "indent": "off", + "indent": [2, 2], "indent-legacy": "off", "init-declarations": "off", "jsx-quotes": "error", @@ -153,8 +153,7 @@ "no-mixed-operators": "error", "no-mixed-requires": "off", "no-mixed-spaces-and-tabs": [ - "error", - "smart-tabs" + "error" ], "no-multi-assign": "error", "no-multi-spaces": "error", diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index a9483aa5fe4f..28de707c2439 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -3,20 +3,20 @@ 'use strict'; const alexa = require('./lib/alexa'), - newissue = require('./lib/newissue'), - issueedit = require('./lib/issueedit'); + newissue = require('./lib/newissue'), + issueedit = require('./lib/issueedit'); module.exports = robot => { - robot.log('HTTPS Everywhere ruleset parser started.'); + robot.log('HTTPS Everywhere ruleset parser started.'); - alexa((err, domains) => { - if (err) throw err; + alexa((err, domains) => { + if (err) throw err; - robot.log('Retrieved Alexa rankings.'); + robot.log('Retrieved Alexa rankings.'); - robot.on('issues.opened', newissue(robot, domains)); - robot.on('issues.edited', issueedit(robot, domains)); + robot.on('issues.opened', newissue(robot, domains)); + robot.on('issues.edited', issueedit(robot, domains)); - robot.log('Listening for new issues and issue edits.'); - }); + robot.log('Listening for new issues and issue edits.'); + }); }; diff --git a/utils/issue-format-bot/lib/alexa.js b/utils/issue-format-bot/lib/alexa.js index 8847b97eee7f..5ff1824060cb 100644 --- a/utils/issue-format-bot/lib/alexa.js +++ b/utils/issue-format-bot/lib/alexa.js @@ -5,7 +5,7 @@ 'use strict'; const request = require('request'), - unzip = require('unzip'); + unzip = require('unzip'); // (Heavily) modified from code by @Hainish in utils/labeller. Thanks, @Hainish! @@ -14,28 +14,28 @@ const request = require('request'), module.exports = function getAlexa(cb) { - const alexa = []; - const csvRegex = /^[0-9]+,(.+)/; - - request.get('https://s3.amazonaws.com/alexa-static/top-1m.csv.zip') - .on('error', err => { - cb(err); - }) - // Dumb ESLint. It's not my fault this person named it like that!? - .pipe(unzip.Parse()) // eslint-disable-line new-cap - .on('entry', entry => { - // TODO this use of readline is super confusing?? - const lineReader = require('readline').createInterface({ - input: entry - }); - - lineReader.on('line', line => { - const domain = line.match(csvRegex)[1]; - alexa.push(domain); - }); - - lineReader.on('close', () => { - cb(null, alexa); - }); - }); + const alexa = []; + const csvRegex = /^[0-9]+,(.+)/; + + request.get('https://s3.amazonaws.com/alexa-static/top-1m.csv.zip') + .on('error', err => { + cb(err); + }) + // Dumb ESLint. It's not my fault this person named it like that!? + .pipe(unzip.Parse()) // eslint-disable-line new-cap + .on('entry', entry => { + // TODO this use of readline is super confusing?? + const lineReader = require('readline').createInterface({ + input: entry + }); + + lineReader.on('line', line => { + const domain = line.match(csvRegex)[1]; + alexa.push(domain); + }); + + lineReader.on('close', () => { + cb(null, alexa); + }); + }); }; diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index f9c8f2b31826..da9030c4b4bb 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -3,59 +3,59 @@ 'use strict'; const parse = require('./parse'), - validate = require('./validate'), - labeler = require('./labeler'), - _ = require('lodash'); + validate = require('./validate'), + labeler = require('./labeler'), + _ = require('lodash'); // TODO make this share more with newissue.js? module.exports = function(robot, alexa) { - return async context => { - robot.log('Issue #' + context.payload.issue.number + ' edited; responding.'); - - // Check if the "issue" is really a PR - // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. - if (_.has(context.payload.issue, 'pull_request')) { - robot.log('Issue is a Pull Request; aborting.'); - return; - } - - const data = parse(context.payload.issue.body); - - // Check if the data is problematic - if (data instanceof Error) { - // Dumb `switch` statement cases aren't technically blocks so saying `const params` in both of them causes redeclaration errors - let params; - switch (data.message) { - case 'invalid type': - params = context.issue({body: 'Sorry, I still couldn\'t understand the type of issue you specified. Did you look at the issue template?\n\nPlease try again.'}); - return context.github.issues.createComment(params); - case 'null description': - params = context.issue({body: 'I still don\'t see any text in your description - please edit it to use the issue template. Thank you!'}); - return context.github.issues.createComment(params); - default: - throw data; - } - } - - const problems = validate(data); - - if (problems.length === 0) { - // User submission is OK - const params = context.issue({body: 'Thanks! Your edit helped me out. I\'ll take it from here now.'}); - await context.github.issues.createComment(params); - - return labeler(context, data, alexa); - } else { - // Submit a comment telling them what the issues were - let comment = 'Thanks for editing!\n\n'; - comment += 'I\'m sorry, but I still couldn\'t to understand your submission. '; - comment += 'Here are the problems I ran into this time:\n\n'; - problems.forEach(problem => comment += ` * ${problem}\n`); - comment += '\nIf you edit your issue again, I\'ll try again and report back if I have problems again.'; - const params = context.issue({body: comment}); - return context.github.issues.createComment(params); - - } - }; + return async context => { + robot.log('Issue #' + context.payload.issue.number + ' edited; responding.'); + + // Check if the "issue" is really a PR + // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. + if (_.has(context.payload.issue, 'pull_request')) { + robot.log('Issue is a Pull Request; aborting.'); + return; + } + + const data = parse(context.payload.issue.body); + + // Check if the data is problematic + if (data instanceof Error) { + // Dumb `switch` statement cases aren't technically blocks so saying `const params` in both of them causes redeclaration errors + let params; + switch (data.message) { + case 'invalid type': + params = context.issue({body: 'Sorry, I still couldn\'t understand the type of issue you specified. Did you look at the issue template?\n\nPlease try again.'}); + return context.github.issues.createComment(params); + case 'null description': + params = context.issue({body: 'I still don\'t see any text in your description - please edit it to use the issue template. Thank you!'}); + return context.github.issues.createComment(params); + default: + throw data; + } + } + + const problems = validate(data); + + if (problems.length === 0) { + // User submission is OK + const params = context.issue({body: 'Thanks! Your edit helped me out. I\'ll take it from here now.'}); + await context.github.issues.createComment(params); + + return labeler(context, data, alexa); + } else { + // Submit a comment telling them what the issues were + let comment = 'Thanks for editing!\n\n'; + comment += 'I\'m sorry, but I still couldn\'t to understand your submission. '; + comment += 'Here are the problems I ran into this time:\n\n'; + problems.forEach(problem => comment += ` * ${problem}\n`); + comment += '\nIf you edit your issue again, I\'ll try again and report back if I have problems again.'; + const params = context.issue({body: comment}); + return context.github.issues.createComment(params); + + } + }; }; diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js index ca43526f9d9b..9d31150b249a 100644 --- a/utils/issue-format-bot/lib/labeler.js +++ b/utils/issue-format-bot/lib/labeler.js @@ -3,25 +3,25 @@ 'use strict'; module.exports = function label(context, data, alexa) { - const alexaPosition = alexa.indexOf(data.domain); - const labels = []; + const alexaPosition = alexa.indexOf(data.domain); + const labels = []; - // TODO remove existing labels in case of edits + // TODO remove existing labels in case of edits - if (alexaPosition === -1) { - return; - } else if (alexaPosition < 100) { - labels.push('top-100'); - } else if (alexaPosition < 1000) { - labels.push('top-1k'); - } else if (alexaPosition < 10000) { - labels.push('top-10k'); - } else if (alexaPosition < 100000) { - labels.push('top-100k'); - } else if (alexaPosition < 1000000) { - labels.push('top-1m'); - } + if (alexaPosition === -1) { + return; + } else if (alexaPosition < 100) { + labels.push('top-100'); + } else if (alexaPosition < 1000) { + labels.push('top-1k'); + } else if (alexaPosition < 10000) { + labels.push('top-10k'); + } else if (alexaPosition < 100000) { + labels.push('top-100k'); + } else if (alexaPosition < 1000000) { + labels.push('top-1m'); + } - const params = context.issue({labels}); - return context.github.issues.addLabels(params); + const params = context.issue({labels}); + return context.github.issues.addLabels(params); }; diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 0254f5916a9f..f744e74b1a68 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -3,55 +3,55 @@ 'use strict'; const parse = require('./parse'), - validate = require('./validate'), - labeler = require('./labeler.js'), - _ = require('lodash'); + validate = require('./validate'), + labeler = require('./labeler.js'), + _ = require('lodash'); module.exports = function(robot, alexa) { - return context => { - robot.log('Issue #' + context.payload.issue.number + ' created; responding.'); - - // Check if the "issue" is really a PR - // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. - if (_.has(context.payload.issue, 'pull_request')) { - robot.log('Issue is a Pull Request; aborting.'); - return; - } - - const data = parse(context.payload.issue.body); - - // Check if the data is problematic - if (data instanceof Error) { - // Dumb `switch` statement cases aren't technically blocks so saying `const params` in both of them causes redeclaration errors - let params; - switch (data.message) { - case 'invalid type': - params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); - return context.github.issues.createComment(params); - case 'null description': - params = context.issue({body: 'Hi! I can\'t find any text in your description - please edit it to use the issue template.'}); - return context.github.issues.createComment(params); - default: - throw data; - } - } - - const problems = validate(data); - - if (problems.length === 0) { - // User submission is OK - - return labeler(context, data, alexa); - } else { - // Submit a comment telling them what the issues were - let comment = 'Thanks for your contribution to HTTPS Everywhere! '; - comment += 'Unfortunately, I wasn\'t able to understand your submission. '; - comment += 'Here are the problems I ran into:\n\n'; - problems.forEach(problem => comment += ` * ${problem}\n`); - comment += '\nIf you edit your issue, I\'ll try again and report back if I have problems again.'; - const params = context.issue({body: comment}); - return context.github.issues.createComment(params); - - } - }; + return context => { + robot.log('Issue #' + context.payload.issue.number + ' created; responding.'); + + // Check if the "issue" is really a PR + // I can't really tell if GitHub will ever send us something like this, honestly... but bettter safe than sorry. + if (_.has(context.payload.issue, 'pull_request')) { + robot.log('Issue is a Pull Request; aborting.'); + return; + } + + const data = parse(context.payload.issue.body); + + // Check if the data is problematic + if (data instanceof Error) { + // Dumb `switch` statement cases aren't technically blocks so saying `const params` in both of them causes redeclaration errors + let params; + switch (data.message) { + case 'invalid type': + params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); + return context.github.issues.createComment(params); + case 'null description': + params = context.issue({body: 'Hi! I can\'t find any text in your description - please edit it to use the issue template.'}); + return context.github.issues.createComment(params); + default: + throw data; + } + } + + const problems = validate(data); + + if (problems.length === 0) { + // User submission is OK + + return labeler(context, data, alexa); + } else { + // Submit a comment telling them what the issues were + let comment = 'Thanks for your contribution to HTTPS Everywhere! '; + comment += 'Unfortunately, I wasn\'t able to understand your submission. '; + comment += 'Here are the problems I ran into:\n\n'; + problems.forEach(problem => comment += ` * ${problem}\n`); + comment += '\nIf you edit your issue, I\'ll try again and report back if I have problems again.'; + const params = context.issue({body: comment}); + return context.github.issues.createComment(params); + + } + }; }; diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index 2e6cfabfb022..b2fdc3e8447f 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -5,39 +5,39 @@ 'use strict'; const strip = require('strip-markdown'), - remark = require('remark'), - processor = remark().use(strip), - _ = require('lodash'), - domainFromPartialUrl = require('domain-from-partial-url'), - Entities = require('html-entities').AllHtmlEntities, - decode = (new Entities()).decode; + remark = require('remark'), + processor = remark().use(strip), + _ = require('lodash'), + domainFromPartialUrl = require('domain-from-partial-url'), + Entities = require('html-entities').AllHtmlEntities, + decode = (new Entities()).decode; // XXX should this be moved to the validator module? const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature request', 'other']; module.exports = function parseDescription(body) { - const plaintext = String(processor.processSync(body)); + const plaintext = String(processor.processSync(body)); - // Check if there's no description at all - if (plaintext.trim().length === 0) return new Error('null description'); + // Check if there's no description at all + if (plaintext.trim().length === 0) return new Error('null description'); - // Split by newlines, filter blanks, split into trimmed key-value and lowercase everything - const lines = plaintext.split('\n') - .filter(line => _.compact(line).length !== 0) - .map(line => line.split(':').map(key => key.trim())) - .map(line => [line[0].toLowerCase(), line[1]]); - // Filter result looks like [ [ 'Type', 'ruleset issue' ] ] - const type = lines.filter(line => line[0] === 'type')[0][1]; + // Split by newlines, filter blanks, split into trimmed key-value and lowercase everything + const lines = plaintext.split('\n') + .filter(line => _.compact(line).length !== 0) + .map(line => line.split(':').map(key => key.trim())) + .map(line => [line[0].toLowerCase(), line[1]]); + // Filter result looks like [ [ 'Type', 'ruleset issue' ] ] + const type = lines.filter(line => line[0] === 'type')[0][1]; - if (!validTypes.includes(type)) return new Error('invalid type'); + if (!validTypes.includes(type)) return new Error('invalid type'); - // Convert to object - let normalized = _.fromPairs(lines); + // Convert to object + let normalized = _.fromPairs(lines); - // Markdown mangles full URLs into HTML entities - // (e.g. `http://example.com/` instead of - // `http://example.com/`). So we decode them again. - if (normalized.domain) normalized.domain = domainFromPartialUrl(decode(normalized.domain)); + // Markdown mangles full URLs into HTML entities + // (e.g. `http://example.com/` instead of + // `http://example.com/`). So we decode them again. + if (normalized.domain) normalized.domain = domainFromPartialUrl(decode(normalized.domain)); - return normalized; + return normalized; }; diff --git a/utils/issue-format-bot/lib/validate.js b/utils/issue-format-bot/lib/validate.js index d856b31a5134..8806cdf9380c 100644 --- a/utils/issue-format-bot/lib/validate.js +++ b/utils/issue-format-bot/lib/validate.js @@ -3,17 +3,17 @@ 'use strict'; module.exports = function validate(data) { - const problems = []; + const problems = []; - // Validate that the user submitted all necessary data based on submission type - switch (data.type) { - case 'new ruleset': - if (!data.domain) problems.push('Submission is missing domain information'); - break; - case 'ruleset issue': - if (!data.domain) problems.push('Submission is missing domain information'); - break; - } + // Validate that the user submitted all necessary data based on submission type + switch (data.type) { + case 'new ruleset': + if (!data.domain) problems.push('Submission is missing domain information'); + break; + case 'ruleset issue': + if (!data.domain) problems.push('Submission is missing domain information'); + break; + } - return problems; + return problems; }; diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index ee16afb11b80..375843b0bb62 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -3,75 +3,75 @@ 'use strict'; const vows = require('perjury'), - assert = vows.assert; + assert = vows.assert; vows.describe('alexa mock array').addBatch({ - 'When we require the module': { - topic: function() { - return require('./mocks/alexa'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s an array': function(err, alexa) { - assert.isArray(alexa); - }, - 'its length is 1000': function(err, alexa) { - assert.equal(alexa.length, 1000); - }, - 'its 999th element has the right text': function(err, alexa) { - assert.equal(alexa[999], 'domain1000.com'); - }, - 'its 1000th element is undefined': function(err, alexa) { - assert.isUndefined(alexa[1000]); - }, - 'and we get a nonexistant property': function(err, alexa) { - assert.isUndefined(alexa.foobar); - }, - 'and we assign a property': { - topic: function(alexa) { - alexa.someProp = 'Hello world!'; - return alexa; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'the property is there': function(err, alexa) { - assert.equal(alexa.someProp, 'Hello world!'); - } - }, - 'and we call Array#indexOf with a domain in the array': { - topic: function(alexa) { - return alexa.indexOf('domain1000.com'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it returns the right position': function(err, index) { - assert.equal(index, 999); - } - }, - 'and we call Array#indexOf with a domain not in the array': { - topic: function(alexa) { - return alexa.indexOf('domain1000000000.com'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it returns no match': function(err, index) { - assert.equal(index, -1); - } - }, - 'and we call Array#indexOf with something not a domain at all': { - topic: function(alexa) { - return alexa.indexOf('foobar!'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it returns no match': function(err, index) { - assert.equal(index, -1); - } - } - } + 'When we require the module': { + topic: function() { + return require('./mocks/alexa'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s an array': function(err, alexa) { + assert.isArray(alexa); + }, + 'its length is 1000': function(err, alexa) { + assert.equal(alexa.length, 1000); + }, + 'its 999th element has the right text': function(err, alexa) { + assert.equal(alexa[999], 'domain1000.com'); + }, + 'its 1000th element is undefined': function(err, alexa) { + assert.isUndefined(alexa[1000]); + }, + 'and we get a nonexistant property': function(err, alexa) { + assert.isUndefined(alexa.foobar); + }, + 'and we assign a property': { + topic: function(alexa) { + alexa.someProp = 'Hello world!'; + return alexa; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'the property is there': function(err, alexa) { + assert.equal(alexa.someProp, 'Hello world!'); + } + }, + 'and we call Array#indexOf with a domain in the array': { + topic: function(alexa) { + return alexa.indexOf('domain1000.com'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns the right position': function(err, index) { + assert.equal(index, 999); + } + }, + 'and we call Array#indexOf with a domain not in the array': { + topic: function(alexa) { + return alexa.indexOf('domain1000000000.com'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns no match': function(err, index) { + assert.equal(index, -1); + } + }, + 'and we call Array#indexOf with something not a domain at all': { + topic: function(alexa) { + return alexa.indexOf('foobar!'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns no match': function(err, index) { + assert.equal(index, -1); + } + } + } }).export(module); diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 8650c0346596..22b799d50de8 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -1,56 +1,56 @@ // Copyright 2017 AJ Jordan, AGPLv3+ const vows = require('perjury'), - assert = vows.assert, - _ = require('lodash'); + assert = vows.assert, + _ = require('lodash'); function assertProp(prop, asserter) { - return function(err, context) { - assert.isTrue(_.has(context, prop)); - asserter(_.get(context, prop)); - }; + return function(err, context) { + assert.isTrue(_.has(context, prop)); + asserter(_.get(context, prop)); + }; } function assertSinonSpy(prop) { - return function(err, context) { - assert.isFunction(_.get(context, prop)); - assert.isDefined(_.get(context, prop).called); - }; + return function(err, context) { + assert.isFunction(_.get(context, prop)); + assert.isDefined(_.get(context, prop).called); + }; } vows.describe('context mock object').addBatch({ - 'When we require the module': { - topic: function() { - return require('./mocks/context'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s an object': function(err, makeContext) { - assert.isObject(makeContext); - }, - 'it has an issue() factory function': function(err, makeContext) { - assert.isFunction(makeContext.issue); - }, - // TODO test that issue numbers aren't the same - 'and we call makeContext.issue()': { - topic: function(makeContext) { - return makeContext.issue('Hello world'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it returns an object': function(err, context) { - assert.isObject(context); - }, - 'context.payload.issue is an object': assertProp('payload.issue', assert.isObject), - 'context.payload.issue.number is a number': assertProp('payload.issue.number', assert.isNumber), - 'context.payload.issue.body is a string': assertProp('payload.issue.body', assert.isString), - 'context.github is an object': assertProp('github', assert.isObject), - 'context.github.issues is an object': assertProp('github.issues', assert.isObject), - 'context.github.issues.createComment is a Sinon spy': assertSinonSpy('github.issues.createComment'), - 'context.github.issues.addLabels is a Sinon spy': assertSinonSpy('github.issues.addLabels'), - 'context.issue is a Sinon spy': assertSinonSpy('issue') - } - } + 'When we require the module': { + topic: function() { + return require('./mocks/context'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s an object': function(err, makeContext) { + assert.isObject(makeContext); + }, + 'it has an issue() factory function': function(err, makeContext) { + assert.isFunction(makeContext.issue); + }, + // TODO test that issue numbers aren't the same + 'and we call makeContext.issue()': { + topic: function(makeContext) { + return makeContext.issue('Hello world'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns an object': function(err, context) { + assert.isObject(context); + }, + 'context.payload.issue is an object': assertProp('payload.issue', assert.isObject), + 'context.payload.issue.number is a number': assertProp('payload.issue.number', assert.isNumber), + 'context.payload.issue.body is a string': assertProp('payload.issue.body', assert.isString), + 'context.github is an object': assertProp('github', assert.isObject), + 'context.github.issues is an object': assertProp('github.issues', assert.isObject), + 'context.github.issues.createComment is a Sinon spy': assertSinonSpy('github.issues.createComment'), + 'context.github.issues.addLabels is a Sinon spy': assertSinonSpy('github.issues.addLabels'), + 'context.issue is a Sinon spy': assertSinonSpy('issue') + } + } }).export(module); diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index d6e15a903eca..83b2a78a04bd 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -3,13 +3,13 @@ 'use strict'; const vows = require('perjury'), - handlerutil = require('./lib/handlerutil'); + handlerutil = require('./lib/handlerutil'); vows.describe('issue edit handler').addBatch( - handlerutil.setup('../../lib/issueedit', { - 'and we pass it the context of an issue edit with a null body': handlerutil.nullBody('don\'t see any text'), - 'and we pass it the context of a issue edit with a bad type': handlerutil.badType('type of issue'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com', 'take it from here', 'take it from here'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') - }) + handlerutil.setup('../../lib/issueedit', { + 'and we pass it the context of an issue edit with a null body': handlerutil.nullBody('don\'t see any text'), + 'and we pass it the context of a issue edit with a bad type': handlerutil.badType('type of issue'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com', 'take it from here', 'take it from here'), + 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') + }) ).export(module); diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js index 25bc57c9c7da..8e362eee5b72 100644 --- a/utils/issue-format-bot/test/labeler-test.js +++ b/utils/issue-format-bot/test/labeler-test.js @@ -3,9 +3,9 @@ 'use strict'; const vows = require('perjury'), - assert = vows.assert, - makeContext = require('./mocks/context'), - alexa = require('./mocks/alexa'); + assert = vows.assert, + makeContext = require('./mocks/context'), + alexa = require('./mocks/alexa'); // Note: we only test top 100 and top 1000 because the Alexa mock supports only 1000 items // (Or in other words, `new Array(1000000)` hung my Node REPL process when I tried it.) @@ -13,77 +13,77 @@ const vows = require('perjury'), // We have to do this funky thing so the tests run in serial // If they run in parallel, Sinon spies don't reset deterministically and one of the assertions will fail because the spy's been called more than once from another suite function setup(name, obj) { - const ret = { - 'When we require the module': { - topic: function() { - return require('../lib/labeler'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s a function': function(err, labeler) { - assert.isFunction(labeler); - } - } - }; + const ret = { + 'When we require the module': { + topic: function() { + return require('../lib/labeler'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s a function': function(err, labeler) { + assert.isFunction(labeler); + } + } + }; - ret['When we require the module'][name] = obj; + ret['When we require the module'][name] = obj; - return ret; + return ret; } function resetSpies(context) { - return context.github.issues.addLabels.reset(); + return context.github.issues.addLabels.reset(); } vows.describe('issue labeler module').addBatch(setup( - 'and we pass it an issue in the top 100 domains', { - topic: function(labeler) { - const context = makeContext.issue(); - // XXX should we test on the boundaries of different labels instead of in the middle? - labeler(context, {domain: 'domain10.com'}, alexa); - return context; - }, - teardown: resetSpies, - 'it works': function(err) { - assert.ifError(err); - }, - 'it adds labels to the issue only once': function(err, context) { - assert.ok(context.github.issues.addLabels.calledOnce); - }, - 'the label was the top-100 label': function(err, context) { - // XXX should we test addLabels() arguments? - // Currently we don't because context.issue is a Sinon spy that returns nothing, which gets passed to addLabels() - const args = context.issue.args[0]; + 'and we pass it an issue in the top 100 domains', { + topic: function(labeler) { + const context = makeContext.issue(); + // XXX should we test on the boundaries of different labels instead of in the middle? + labeler(context, {domain: 'domain10.com'}, alexa); + return context; + }, + teardown: resetSpies, + 'it works': function(err) { + assert.ifError(err); + }, + 'it adds labels to the issue only once': function(err, context) { + assert.ok(context.github.issues.addLabels.calledOnce); + }, + 'the label was the top-100 label': function(err, context) { + // XXX should we test addLabels() arguments? + // Currently we don't because context.issue is a Sinon spy that returns nothing, which gets passed to addLabels() + const args = context.issue.args[0]; - assert.isObject(args[0]); - assert.isArray(args[0].labels); - assert.deepEqual(args[0].labels, ['top-100']); - } - } + assert.isObject(args[0]); + assert.isArray(args[0].labels); + assert.deepEqual(args[0].labels, ['top-100']); + } + } )).addBatch(setup( - 'and we pass it an issue in the top 1,000 domains', { - topic: function(labeler) { - const context = makeContext.issue(); - // XXX should we test on the boundaries of different labels instead of in the middle? - labeler(context, {domain: 'domain500.com'}, alexa); - return context; - }, - teardown: resetSpies, - 'it works': function(err) { - assert.ifError(err); - }, - 'it adds labels to the issue only once': function(err, context) { - assert.ok(context.github.issues.addLabels.calledOnce); - }, - 'the label was the top-1k label': function(err, context) { - // XXX should we test addLabels() arguments? - // Currently we don't because context.issue is a Sinon spy that returns nothing, which gets passed to addLabels() - const args = context.issue.args[0]; + 'and we pass it an issue in the top 1,000 domains', { + topic: function(labeler) { + const context = makeContext.issue(); + // XXX should we test on the boundaries of different labels instead of in the middle? + labeler(context, {domain: 'domain500.com'}, alexa); + return context; + }, + teardown: resetSpies, + 'it works': function(err) { + assert.ifError(err); + }, + 'it adds labels to the issue only once': function(err, context) { + assert.ok(context.github.issues.addLabels.calledOnce); + }, + 'the label was the top-1k label': function(err, context) { + // XXX should we test addLabels() arguments? + // Currently we don't because context.issue is a Sinon spy that returns nothing, which gets passed to addLabels() + const args = context.issue.args[0]; - assert.isObject(args[0]); - assert.isArray(args[0].labels); - assert.deepEqual(args[0].labels, ['top-1k']); - } - } + assert.isObject(args[0]); + assert.isArray(args[0].labels); + assert.deepEqual(args[0].labels, ['top-1k']); + } + } )).export(module); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index c7f17b442602..3ff224642f8b 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -3,168 +3,168 @@ 'use strict'; const vows = require('perjury'), - assert = vows.assert, - robot = require('../mocks/robot'), - alexa = require('../mocks/alexa'), - makeContext = require('../mocks/context'), - _ = require('lodash'); + assert = vows.assert, + robot = require('../mocks/robot'), + alexa = require('../mocks/alexa'), + makeContext = require('../mocks/context'), + _ = require('lodash'); // TODO tests for this file function setup(path, obj) { - return { - 'When we require the module': { - topic: function() { - return require(path); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s a function': function(err, newissue) { - assert.isFunction(newissue); - }, - // We insert the provided object here - 'and we initialize it with a robot': _.assign({ - topic: function(newissue) { - return newissue(robot, alexa); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it returns a function': function(err, handler) { - assert.isFunction(handler); - } - }, obj) - } - }; + return { + 'When we require the module': { + topic: function() { + return require(path); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s a function': function(err, newissue) { + assert.isFunction(newissue); + }, + // We insert the provided object here + 'and we initialize it with a robot': _.assign({ + topic: function(newissue) { + return newissue(robot, alexa); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns a function': function(err, handler) { + assert.isFunction(handler); + } + }, obj) + } + }; } function nullBody(text) { - return { - topic: function(handler) { - const context = makeContext.issue(''); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } - }; + return { + topic: function(handler) { + const context = makeContext.issue(''); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } + }; } function badType(text) { - return { - topic: function(handler) { - const context = makeContext.issue('Type: invalid'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } - }; + return { + topic: function(handler) { + const context = makeContext.issue('Type: invalid'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } + }; } function correctNewRuleset(issueText, text) { - const expectingEdit = Boolean(text); - - let obj = { - topic: function(handler) { - const context = makeContext.issue(issueText); - - const result = handler(context); - - // Edit handler is an AsyncFunction, new issue handler is a Function - if (result && result.then) { - // Perjury doesn't support promises, so we manually invoke the callback - result.then(() => { - this.callback(null, context); - }); - } else { - return context; - } - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it labels the issue appropriately': function(err, context) { - assert.isTrue(context.github.issues.addLabels.calledOnce); - - // I'm not really sure why these magic numbers work? But they do, sooo... - // With apologies to whoever's come to edit this - const args = context.issue.args[expectingEdit ? 1 : 0]; - - assert.isObject(args[0]); - assert.isArray(args[0].labels); - assert.deepEqual(args[0].labels, ['top-100']); - } - }; - - if (text) { - obj['it only creates one comment'] = function(err, context) { - assert.isTrue(context.github.issues.createComment.calledOnce); - }; - - obj['it says the user fixed it'] = function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - }; - } else { - obj['it doesn\'t comment'] = function(err, context) { - // Once for the labels, once for the comment - assert.isTrue(context.issue.calledOnce); - }; - } - - return obj; + const expectingEdit = Boolean(text); + + let obj = { + topic: function(handler) { + const context = makeContext.issue(issueText); + + const result = handler(context); + + // Edit handler is an AsyncFunction, new issue handler is a Function + if (result && result.then) { + // Perjury doesn't support promises, so we manually invoke the callback + result.then(() => { + this.callback(null, context); + }); + } else { + return context; + } + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it labels the issue appropriately': function(err, context) { + assert.isTrue(context.github.issues.addLabels.calledOnce); + + // I'm not really sure why these magic numbers work? But they do, sooo... + // With apologies to whoever's come to edit this + const args = context.issue.args[expectingEdit ? 1 : 0]; + + assert.isObject(args[0]); + assert.isArray(args[0].labels); + assert.deepEqual(args[0].labels, ['top-100']); + } + }; + + if (text) { + obj['it only creates one comment'] = function(err, context) { + assert.isTrue(context.github.issues.createComment.calledOnce); + }; + + obj['it says the user fixed it'] = function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + }; + } else { + obj['it doesn\'t comment'] = function(err, context) { + // Once for the labels, once for the comment + assert.isTrue(context.issue.calledOnce); + }; + } + + return obj; } function problematicNewRuleset(text) { - return { - topic: function(handler) { - const context = makeContext.issue('Type: new ruleset'); - - handler(context); - - return context; - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.github.issues.createComment.calledOnce); - }, - 'it includes the problem': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } - }; + return { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.github.issues.createComment.calledOnce); + }, + 'it includes the problem': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } + }; } module.exports.setup = setup; diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index fe6f94941ce9..68fff0c709f7 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -7,41 +7,41 @@ const SIZE = 1000; const regex = /^domain(\d+).com$/; function indexOf(str) { - const match = regex.exec(str); - - if (match && Number(match[1]) <= SIZE) { - return Number(match[1]) - 1; - } else { - - /* - ESLint is too dumb to realize that this always has a - bound `this` from the Proxy, so it's not invalid; - that Function#apply is clearer here than using - Reflect.apply and isn't the usual overly verbose - syntax people use; and that using `arguments` is - clearer than using spread syntax (and is one of the - rare cases where there isn't really a significant - advantage to spread syntax). So we disable it for - this line. - - TODO: report this upstream - */ - - /* eslint-disable */ - return Array.prototype.indexOf.apply(this, arguments); - /* eslint-enable */ - } + const match = regex.exec(str); + + if (match && Number(match[1]) <= SIZE) { + return Number(match[1]) - 1; + } else { + + /* + ESLint is too dumb to realize that this always has a + bound `this` from the Proxy, so it's not invalid; + that Function#apply is clearer here than using + Reflect.apply and isn't the usual overly verbose + syntax people use; and that using `arguments` is + clearer than using spread syntax (and is one of the + rare cases where there isn't really a significant + advantage to spread syntax). So we disable it for + this line. + + TODO: report this upstream + */ + + /* eslint-disable */ + return Array.prototype.indexOf.apply(this, arguments); + /* eslint-enable */ + } } module.exports = new Proxy(new Array(SIZE), { - get: function(target, name) { - // Override Array#indexOf - if (name === 'indexOf') { - return indexOf.bind(target); - } - - // Node REPL uses symbols apparently, which throw TypeErrors when isNaN coerces them, so do those first - if (typeof name === 'symbol' || isNaN(name) || name >= SIZE) return target[name]; - return `domain${Number(name) + 1}.com`; - } + get: function(target, name) { + // Override Array#indexOf + if (name === 'indexOf') { + return indexOf.bind(target); + } + + // Node REPL uses symbols apparently, which throw TypeErrors when isNaN coerces them, so do those first + if (typeof name === 'symbol' || isNaN(name) || name >= SIZE) return target[name]; + return `domain${Number(name) + 1}.com`; + } }); diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 41ed97f4f030..69982769787e 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -7,21 +7,21 @@ const sinon = require('sinon'); let issueNumber = 1; module.exports = { - issue(body) { - return { - payload: { - issue: { - number: issueNumber++, - body - } - }, - github: { - issues: { - createComment: sinon.spy(), - addLabels: sinon.spy() - } - }, - issue: sinon.spy() - }; - } + issue(body) { + return { + payload: { + issue: { + number: issueNumber++, + body + } + }, + github: { + issues: { + createComment: sinon.spy(), + addLabels: sinon.spy() + } + }, + issue: sinon.spy() + }; + } }; diff --git a/utils/issue-format-bot/test/mocks/robot.js b/utils/issue-format-bot/test/mocks/robot.js index e63c1589271b..f9f72ec6797a 100644 --- a/utils/issue-format-bot/test/mocks/robot.js +++ b/utils/issue-format-bot/test/mocks/robot.js @@ -5,5 +5,5 @@ function noop() {} module.exports = { - log: noop + log: noop }; diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 05c5967ace7a..11059e3236e8 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -3,13 +3,13 @@ 'use strict'; const vows = require('perjury'), - handlerutil = require('./lib/handlerutil'); + handlerutil = require('./lib/handlerutil'); vows.describe('new issue handler').addBatch( - handlerutil.setup('../../lib/newissue', { - 'and we pass it the context of a new issue with a null body': handlerutil.nullBody('can\'t find any text'), - 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), - 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com'), - 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') - }) + handlerutil.setup('../../lib/newissue', { + 'and we pass it the context of a new issue with a null body': handlerutil.nullBody('can\'t find any text'), + 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), + 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com'), + 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') + }) ).export(module); diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index dfd741dd47d6..932e1dc0a926 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -3,147 +3,147 @@ 'use strict'; const vows = require('perjury'), - assert = vows.assert, - _ = require('lodash'); + assert = vows.assert, + _ = require('lodash'); function assertCorrectBody(text) { - return { - topic: function(parse) { - return parse(text); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the object has the right data': function(err, obj) { - assert.includes(obj, 'domain'); - assert.equal(obj.domain, 'example.com'); - } - }; + return { + topic: function(parse) { + return parse(text); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the object has the right data': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }; } function assertTypeSucceeds(type) { - return { - topic: function(parse) { - return parse('Type: ' + type); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the object is normal data': function(err, obj) { - assert.equal(obj.type, type); - } - }; + return { + topic: function(parse) { + return parse('Type: ' + type); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the object is normal data': function(err, obj) { + assert.equal(obj.type, type); + } + }; } vows.describe('issue parser module').addBatch({ - 'When we require the module': { - topic: function() { - return require('../lib/parse'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s a function': function(err, parse) { - assert.isFunction(parse); - }, - 'and we pass it a body that\'s a ruleset issue': assertCorrectBody('Type: ruleset issue\nDomain: example.com'), - 'and we pass it a body with funky capitalization': { - topic: function(parse) { - return parse('tyPe: ruleset issue\nDoMaIn: example.com'); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the capitalization didn\'t matter': function(err, obj) { - assert.includes(obj, 'domain'); - assert.equal(obj.domain, 'example.com'); - } - }, - 'and we pass it a body with out-of-order data': assertCorrectBody('Domain: example.com\nType: ruleset issue'), - 'and we pass it a body with lots of whitespace': { - topic: function(parse) { - return parse('Type: ruleset issue \nDomain: \t\t example.com \t'); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the whitespace was trimmed': function(err, obj) { - assert.includes(obj, 'domain'); - assert.equal(obj.domain, 'example.com'); - } - }, - 'and we pass it a body with many newlines': { - topic: function(parse) { - return parse('\n\nType: ruleset issue\n\n\n\nDomain: example.com\n\n'); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the newlines were ignored': function(err, obj) { - assert.equal(_.size(obj), 2); - } - }, - 'and we pass it a body with some Markdown comments': { - topic: function(parse) { - // TODO this should test for comments on the same line too, but see wooorm/strip-markdown#14 - return parse('\nType: ruleset issue\n\nDomain: example.com'); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the object has the right data': function(err, obj) { - assert.includes(obj, 'domain'); - assert.equal(obj.domain, 'example.com'); - }, - 'the object doesn\'t have a bunch of extra keys': function(err, obj) { - assert.equal(_.size(obj), 2); - } - }, - 'and we pass it a body that has a full URL in the domain': { - topic: function(parse) { - return parse('Type: ruleset issue\nDomain: http://example.com/index.html'); - }, - 'it returns an object': function(err, obj) { - assert.ifError(err); - assert.isObject(obj); - }, - 'the URL was converted into a bare domain': function(err, obj) { - assert.includes(obj, 'domain'); - assert.equal(obj.domain, 'example.com'); - } - }, - 'and we pass it a body that has a freeform comment': assertCorrectBody('Type: new ruleset\nDomain: example.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!'), - 'and we pass it a body that has a freeform comment with a Markdown link': assertCorrectBody('Type: new ruleset\nDomain: example.com\nPlease add [example.com][].\n\n [example.com]: http://example.com.'), - 'and we pass it a body that has a freeform comment with colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons.'), - 'and we pass it a body that has a freeform comment with multiple colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.'), - 'and we pass it a code issue without any other data': assertTypeSucceeds('code issue'), - 'and we pass it a feature request without any other data': assertTypeSucceeds('feature request'), - 'and we pass it an issue labeled "other" without any other data': assertTypeSucceeds('other'), - 'and we pass it a body that isn\'t a valid issue type': { - topic: function(parse) { - return parse('Type: something else\nDomain: example.com'); - }, - 'it returns the right error': function(err, obj) { - assert.ifError(err); - assert.instanceOf(obj, Error); - assert.equal(obj.message, 'invalid type'); - } - }, - 'and we pass it a null body': { - topic: function(parse) { - return parse(''); - }, - 'it returns the right error': function(err, obj) { - assert.ifError(err); - assert.instanceOf(obj, Error); - assert.equal(obj.message, 'null description'); - } - } - } + 'When we require the module': { + topic: function() { + return require('../lib/parse'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s a function': function(err, parse) { + assert.isFunction(parse); + }, + 'and we pass it a body that\'s a ruleset issue': assertCorrectBody('Type: ruleset issue\nDomain: example.com'), + 'and we pass it a body with funky capitalization': { + topic: function(parse) { + return parse('tyPe: ruleset issue\nDoMaIn: example.com'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the capitalization didn\'t matter': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }, + 'and we pass it a body with out-of-order data': assertCorrectBody('Domain: example.com\nType: ruleset issue'), + 'and we pass it a body with lots of whitespace': { + topic: function(parse) { + return parse('Type: ruleset issue \nDomain: \t\t example.com \t'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the whitespace was trimmed': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }, + 'and we pass it a body with many newlines': { + topic: function(parse) { + return parse('\n\nType: ruleset issue\n\n\n\nDomain: example.com\n\n'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the newlines were ignored': function(err, obj) { + assert.equal(_.size(obj), 2); + } + }, + 'and we pass it a body with some Markdown comments': { + topic: function(parse) { + // TODO this should test for comments on the same line too, but see wooorm/strip-markdown#14 + return parse('\nType: ruleset issue\n\nDomain: example.com'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the object has the right data': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + }, + 'the object doesn\'t have a bunch of extra keys': function(err, obj) { + assert.equal(_.size(obj), 2); + } + }, + 'and we pass it a body that has a full URL in the domain': { + topic: function(parse) { + return parse('Type: ruleset issue\nDomain: http://example.com/index.html'); + }, + 'it returns an object': function(err, obj) { + assert.ifError(err); + assert.isObject(obj); + }, + 'the URL was converted into a bare domain': function(err, obj) { + assert.includes(obj, 'domain'); + assert.equal(obj.domain, 'example.com'); + } + }, + 'and we pass it a body that has a freeform comment': assertCorrectBody('Type: new ruleset\nDomain: example.com\nAnd let me say, what a great GitHub bot HTTPS Everywhere has!'), + 'and we pass it a body that has a freeform comment with a Markdown link': assertCorrectBody('Type: new ruleset\nDomain: example.com\nPlease add [example.com][].\n\n [example.com]: http://example.com.'), + 'and we pass it a body that has a freeform comment with colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons.'), + 'and we pass it a body that has a freeform comment with multiple colons': assertCorrectBody('Type: new ruleset\nDomain: example.com\nHere\'s a secret: I like colons. Another secret: I like them a lot.'), + 'and we pass it a code issue without any other data': assertTypeSucceeds('code issue'), + 'and we pass it a feature request without any other data': assertTypeSucceeds('feature request'), + 'and we pass it an issue labeled "other" without any other data': assertTypeSucceeds('other'), + 'and we pass it a body that isn\'t a valid issue type': { + topic: function(parse) { + return parse('Type: something else\nDomain: example.com'); + }, + 'it returns the right error': function(err, obj) { + assert.ifError(err); + assert.instanceOf(obj, Error); + assert.equal(obj.message, 'invalid type'); + } + }, + 'and we pass it a null body': { + topic: function(parse) { + return parse(''); + }, + 'it returns the right error': function(err, obj) { + assert.ifError(err); + assert.instanceOf(obj, Error); + assert.equal(obj.message, 'null description'); + } + } + } }).export(module); diff --git a/utils/issue-format-bot/test/robot-mock-test.js b/utils/issue-format-bot/test/robot-mock-test.js index 3fd67ae0149e..f0c488466764 100644 --- a/utils/issue-format-bot/test/robot-mock-test.js +++ b/utils/issue-format-bot/test/robot-mock-test.js @@ -3,21 +3,21 @@ 'use strict'; const vows = require('perjury'), - assert = vows.assert; + assert = vows.assert; vows.describe('robot mock object').addBatch({ - 'When we require the module': { - topic: function() { - return require('./mocks/robot'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s an object': function(err, robot) { - assert.isObject(robot); - }, - 'we can call log() on it': function(err, robot) { - return robot.log('Hello, world!'); - } - } + 'When we require the module': { + topic: function() { + return require('./mocks/robot'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s an object': function(err, robot) { + assert.isObject(robot); + }, + 'we can call log() on it': function(err, robot) { + return robot.log('Hello, world!'); + } + } }).export(module); diff --git a/utils/issue-format-bot/test/validate-test.js b/utils/issue-format-bot/test/validate-test.js index e91fd71bfc6e..a3821aac7e5b 100644 --- a/utils/issue-format-bot/test/validate-test.js +++ b/utils/issue-format-bot/test/validate-test.js @@ -3,60 +3,60 @@ 'use strict'; const vows = require('perjury'), - assert = vows.assert; + assert = vows.assert; function missingRequiredDomain(type) { - return { - topic: function(validate) { - return validate({ - type - }); - }, - 'it returns an array': function(err, problems) { - assert.ifError(err); - assert.isArray(problems); - }, - 'the array has only one problem': function(err, problems) { - assert.equal(problems.length, 1); - }, - 'the array has a missing domain problem': function(err, problems) { - assert.isTrue(problems[0].includes('missing domain')); - } - }; + return { + topic: function(validate) { + return validate({ + type + }); + }, + 'it returns an array': function(err, problems) { + assert.ifError(err); + assert.isArray(problems); + }, + 'the array has only one problem': function(err, problems) { + assert.equal(problems.length, 1); + }, + 'the array has a missing domain problem': function(err, problems) { + assert.isTrue(problems[0].includes('missing domain')); + } + }; } function hasRequiredDomain(type) { - return { - topic: function(validate) { - return validate({ - type, - domain: 'example.com' - }); - }, - 'it returns an array': function(err, problems) { - assert.ifError(err); - assert.isArray(problems); - }, - 'the array has no problems': function(err, problems) { - assert.equal(problems.length, 0); - } - }; + return { + topic: function(validate) { + return validate({ + type, + domain: 'example.com' + }); + }, + 'it returns an array': function(err, problems) { + assert.ifError(err); + assert.isArray(problems); + }, + 'the array has no problems': function(err, problems) { + assert.equal(problems.length, 0); + } + }; } vows.describe('data validator module').addBatch({ - 'When we require the module': { - topic: function() { - return require('../lib/validate'); - }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it\'s a function': function(err, validate) { - assert.isFunction(validate); - }, - 'and we pass it a new ruleset without a domain': missingRequiredDomain('new ruleset'), - 'and we pass it a ruleset issue without a domain': missingRequiredDomain('ruleset issue'), - 'and we pass it a new ruleset with a domain': hasRequiredDomain('new ruleset'), - 'and we pass it a ruleset issue with a domain': hasRequiredDomain('ruleset issue') - } + 'When we require the module': { + topic: function() { + return require('../lib/validate'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it\'s a function': function(err, validate) { + assert.isFunction(validate); + }, + 'and we pass it a new ruleset without a domain': missingRequiredDomain('new ruleset'), + 'and we pass it a ruleset issue without a domain': missingRequiredDomain('ruleset issue'), + 'and we pass it a new ruleset with a domain': hasRequiredDomain('new ruleset'), + 'and we pass it a ruleset issue with a domain': hasRequiredDomain('ruleset issue') + } }).export(module); From 13baa7ef6b6be629c1a91696a21b48e0775e73e6 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Thu, 24 Aug 2017 01:38:16 -0400 Subject: [PATCH 83/96] Refresh Alexa data daily --- utils/issue-format-bot/lib/alexa.js | 39 ++++++- utils/issue-format-bot/lib/labeler.js | 2 +- .../issue-format-bot/test/alexa-mock-test.js | 104 +++++++++--------- utils/issue-format-bot/test/mocks/alexa.js | 4 +- 4 files changed, 97 insertions(+), 52 deletions(-) diff --git a/utils/issue-format-bot/lib/alexa.js b/utils/issue-format-bot/lib/alexa.js index 5ff1824060cb..cc15a8f52d3e 100644 --- a/utils/issue-format-bot/lib/alexa.js +++ b/utils/issue-format-bot/lib/alexa.js @@ -12,7 +12,10 @@ const request = require('request'), // TODO make this return Promises // TODO test this file -module.exports = function getAlexa(cb) { +const DAY = 1000 * 60 * 60 * 24, + obj = {data: null}; + +function retrieveAlexa(cb) { const alexa = []; const csvRegex = /^[0-9]+,(.+)/; @@ -38,4 +41,38 @@ module.exports = function getAlexa(cb) { cb(null, alexa); }); }); +} + +module.exports = function getAlexa(cb) { + // If the data has already been retrieved, just return it + if (obj.data) { + cb(null, obj); + return; + } + + // If it hasn't, invoke the retrieval function and schedule + // refreshes if we don't run into problems + retrieveAlexa((err, data) => { + if (err) { + cb(err, null); + return; + } + + // We return an object so that setInterval can change the Array + // the `data` property points to + obj.data = data; + + setInterval(retrieveAlexa, DAY, (_err, _data) => { + // This is the callback function passed to retrieveAlexa() + + if (_err) { + cb(_err, null); + return; + } + + obj.data = _data; + }); + + cb(null, obj); + }); }; diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js index 9d31150b249a..5fba32ac897a 100644 --- a/utils/issue-format-bot/lib/labeler.js +++ b/utils/issue-format-bot/lib/labeler.js @@ -3,7 +3,7 @@ 'use strict'; module.exports = function label(context, data, alexa) { - const alexaPosition = alexa.indexOf(data.domain); + const alexaPosition = alexa.data.indexOf(data.domain); const labels = []; // TODO remove existing labels in case of edits diff --git a/utils/issue-format-bot/test/alexa-mock-test.js b/utils/issue-format-bot/test/alexa-mock-test.js index 375843b0bb62..9d1647b98316 100644 --- a/utils/issue-format-bot/test/alexa-mock-test.js +++ b/utils/issue-format-bot/test/alexa-mock-test.js @@ -13,64 +13,70 @@ vows.describe('alexa mock array').addBatch({ 'it works': function(err) { assert.ifError(err); }, - 'it\'s an array': function(err, alexa) { - assert.isArray(alexa); + 'it\'s an object with an array property': function(err, obj) { + assert.isObject(obj); + assert.isArray(obj.data); }, - 'its length is 1000': function(err, alexa) { - assert.equal(alexa.length, 1000); - }, - 'its 999th element has the right text': function(err, alexa) { - assert.equal(alexa[999], 'domain1000.com'); - }, - 'its 1000th element is undefined': function(err, alexa) { - assert.isUndefined(alexa[1000]); - }, - 'and we get a nonexistant property': function(err, alexa) { - assert.isUndefined(alexa.foobar); - }, - 'and we assign a property': { - topic: function(alexa) { - alexa.someProp = 'Hello world!'; - return alexa; + 'and we examine just the data property': { + topic: function(obj) { + return obj.data; }, - 'it works': function(err) { - assert.ifError(err); + 'its length is 1000': function(err, alexa) { + assert.equal(alexa.length, 1000); }, - 'the property is there': function(err, alexa) { - assert.equal(alexa.someProp, 'Hello world!'); - } - }, - 'and we call Array#indexOf with a domain in the array': { - topic: function(alexa) { - return alexa.indexOf('domain1000.com'); + 'its 999th element has the right text': function(err, alexa) { + assert.equal(alexa[999], 'domain1000.com'); }, - 'it works': function(err) { - assert.ifError(err); + 'its 1000th element is undefined': function(err, alexa) { + assert.isUndefined(alexa[1000]); }, - 'it returns the right position': function(err, index) { - assert.equal(index, 999); - } - }, - 'and we call Array#indexOf with a domain not in the array': { - topic: function(alexa) { - return alexa.indexOf('domain1000000000.com'); + 'and we get a nonexistant property': function(err, alexa) { + assert.isUndefined(alexa.foobar); }, - 'it works': function(err) { - assert.ifError(err); + 'and we assign a property': { + topic: function(alexa) { + alexa.someProp = 'Hello world!'; + return alexa; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'the property is there': function(err, alexa) { + assert.equal(alexa.someProp, 'Hello world!'); + } }, - 'it returns no match': function(err, index) { - assert.equal(index, -1); - } - }, - 'and we call Array#indexOf with something not a domain at all': { - topic: function(alexa) { - return alexa.indexOf('foobar!'); + 'and we call Array#indexOf with a domain in the array': { + topic: function(alexa) { + return alexa.indexOf('domain1000.com'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns the right position': function(err, index) { + assert.equal(index, 999); + } }, - 'it works': function(err) { - assert.ifError(err); + 'and we call Array#indexOf with a domain not in the array': { + topic: function(alexa) { + return alexa.indexOf('domain1000000000.com'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns no match': function(err, index) { + assert.equal(index, -1); + } }, - 'it returns no match': function(err, index) { - assert.equal(index, -1); + 'and we call Array#indexOf with something not a domain at all': { + topic: function(alexa) { + return alexa.indexOf('foobar!'); + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it returns no match': function(err, index) { + assert.equal(index, -1); + } } } } diff --git a/utils/issue-format-bot/test/mocks/alexa.js b/utils/issue-format-bot/test/mocks/alexa.js index 68fff0c709f7..aafacd9bb160 100644 --- a/utils/issue-format-bot/test/mocks/alexa.js +++ b/utils/issue-format-bot/test/mocks/alexa.js @@ -33,7 +33,7 @@ function indexOf(str) { } } -module.exports = new Proxy(new Array(SIZE), { +const arr = new Proxy(new Array(SIZE), { get: function(target, name) { // Override Array#indexOf if (name === 'indexOf') { @@ -45,3 +45,5 @@ module.exports = new Proxy(new Array(SIZE), { return `domain${Number(name) + 1}.com`; } }); + +module.exports = {data: arr}; From 3a07d85ec3e9e95acceae14699d24d93a08fcb14 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Thu, 24 Aug 2017 01:44:06 -0400 Subject: [PATCH 84/96] Add logging to Alexa refreshes --- utils/issue-format-bot/index.js | 4 +--- utils/issue-format-bot/lib/alexa.js | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/issue-format-bot/index.js b/utils/issue-format-bot/index.js index 28de707c2439..fb5ddce6970e 100644 --- a/utils/issue-format-bot/index.js +++ b/utils/issue-format-bot/index.js @@ -9,11 +9,9 @@ const alexa = require('./lib/alexa'), module.exports = robot => { robot.log('HTTPS Everywhere ruleset parser started.'); - alexa((err, domains) => { + alexa(robot.log, (err, domains) => { if (err) throw err; - robot.log('Retrieved Alexa rankings.'); - robot.on('issues.opened', newissue(robot, domains)); robot.on('issues.edited', issueedit(robot, domains)); diff --git a/utils/issue-format-bot/lib/alexa.js b/utils/issue-format-bot/lib/alexa.js index cc15a8f52d3e..1c1d4af2bbe3 100644 --- a/utils/issue-format-bot/lib/alexa.js +++ b/utils/issue-format-bot/lib/alexa.js @@ -43,7 +43,7 @@ function retrieveAlexa(cb) { }); } -module.exports = function getAlexa(cb) { +module.exports = function getAlexa(log, cb) { // If the data has already been retrieved, just return it if (obj.data) { cb(null, obj); @@ -58,6 +58,8 @@ module.exports = function getAlexa(cb) { return; } + log('Retrieved Alexa rankings.'); + // We return an object so that setInterval can change the Array // the `data` property points to obj.data = data; @@ -71,6 +73,8 @@ module.exports = function getAlexa(cb) { } obj.data = _data; + + log('Refreshed Alexa rankings.'); }); cb(null, obj); From 160697ae9e8d9ac7a2480fa6e2bbc72f33f97346 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 28 Aug 2017 01:42:54 -0400 Subject: [PATCH 85/96] Look for issues with zero or >1 types provided --- utils/issue-format-bot/lib/issueedit.js | 6 +++ utils/issue-format-bot/lib/newissue.js | 6 +++ utils/issue-format-bot/lib/parse.js | 15 ++++-- .../test/issueedit-handler-test.js | 5 +- .../issue-format-bot/test/lib/handlerutil.js | 50 +++++++++++++++++++ .../test/newissue-handler-test.js | 4 +- utils/issue-format-bot/test/parse-test.js | 20 ++++++++ 7 files changed, 101 insertions(+), 5 deletions(-) diff --git a/utils/issue-format-bot/lib/issueedit.js b/utils/issue-format-bot/lib/issueedit.js index da9030c4b4bb..7574de3d2824 100644 --- a/utils/issue-format-bot/lib/issueedit.js +++ b/utils/issue-format-bot/lib/issueedit.js @@ -30,6 +30,12 @@ module.exports = function(robot, alexa) { case 'invalid type': params = context.issue({body: 'Sorry, I still couldn\'t understand the type of issue you specified. Did you look at the issue template?\n\nPlease try again.'}); return context.github.issues.createComment(params); + case 'multiple types': + params = context.issue({body: 'Sorry, but I\'m still seeing more than one type. Can you edit your issue and delete all but one of the types in your issue?'}); + return context.github.issues.createComment(params); + case 'no type': + params = context.issue({body: 'I still don\'t see the type of issue in your description. Can you edit your issue to add this (perhaps referring to the [issue template](https://github.com/EFForg/https-everywhere/blob/master/.github/ISSUE_TEMPLATE.md)?)'}); + return context.github.issues.createComment(params); case 'null description': params = context.issue({body: 'I still don\'t see any text in your description - please edit it to use the issue template. Thank you!'}); return context.github.issues.createComment(params); diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index f744e74b1a68..20a8598d3ec0 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -28,6 +28,12 @@ module.exports = function(robot, alexa) { case 'invalid type': params = context.issue({body: 'Hey there, I didn\'t understand the type of issue you specified. Please edit it and try again.'}); return context.github.issues.createComment(params); + case 'multiple types': + params = context.issue({body: 'Hello! You seem to have specified more than one type. Can you edit your issue and delete all but one of the types in your issue?'}); + return context.github.issues.createComment(params); + case 'no type': + params = context.issue({body: 'Hey, I couldn\'t find the type of issue in your description. Can you edit your issue to add this (perhaps referring to the [issue template](https://github.com/EFForg/https-everywhere/blob/master/.github/ISSUE_TEMPLATE.md)?)'}); + return context.github.issues.createComment(params); case 'null description': params = context.issue({body: 'Hi! I can\'t find any text in your description - please edit it to use the issue template.'}); return context.github.issues.createComment(params); diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index b2fdc3e8447f..f4d32775938f 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -12,9 +12,11 @@ const strip = require('strip-markdown'), Entities = require('html-entities').AllHtmlEntities, decode = (new Entities()).decode; -// XXX should this be moved to the validator module? +// XXX should type validation be moved to the validator module? const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature request', 'other']; +// XXX the Error API in this module is pretty funky and could use a better design + module.exports = function parseDescription(body) { const plaintext = String(processor.processSync(body)); @@ -26,8 +28,15 @@ module.exports = function parseDescription(body) { .filter(line => _.compact(line).length !== 0) .map(line => line.split(':').map(key => key.trim())) .map(line => [line[0].toLowerCase(), line[1]]); - // Filter result looks like [ [ 'Type', 'ruleset issue' ] ] - const type = lines.filter(line => line[0] === 'type')[0][1]; + + const types = lines.filter(line => line[0] === 'type'); + + // XXX should we check for duplicates of *all* keys? + if (types.length === 0) return new Error('no type'); + if (types.length > 1) return new Error('multiple types'); + + // `types` looks like [ [ 'Type', 'ruleset issue' ] ] + const type = types[0][1]; if (!validTypes.includes(type)) return new Error('invalid type'); diff --git a/utils/issue-format-bot/test/issueedit-handler-test.js b/utils/issue-format-bot/test/issueedit-handler-test.js index 83b2a78a04bd..35db203566d5 100644 --- a/utils/issue-format-bot/test/issueedit-handler-test.js +++ b/utils/issue-format-bot/test/issueedit-handler-test.js @@ -10,6 +10,9 @@ vows.describe('issue edit handler').addBatch( 'and we pass it the context of an issue edit with a null body': handlerutil.nullBody('don\'t see any text'), 'and we pass it the context of a issue edit with a bad type': handlerutil.badType('type of issue'), 'and we pass it the context of a issue edit with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com', 'take it from here', 'take it from here'), - 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') + 'and we pass it the context of a issue edit with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information'), + 'and we pass it the context of a new issue with multiple types': handlerutil.multipleTypes('more than one type'), + 'and we pass it the context of a new issue with no type': handlerutil.noType('see the type of issue') }) + ).export(module); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 3ff224642f8b..15027101c071 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -87,6 +87,54 @@ function badType(text) { }; } +function multipleTypes(text) { + return { + topic: function(handler) { + const context = makeContext.issue('Type: new ruleset\nType: ruleset issue'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } + }; +} + +function noType(text) { + return { + topic: function(handler) { + const context = makeContext.issue('I didn\'t read instructions but I DID find a ruleset issue'); + + handler(context); + + return context; + }, + 'it works': function(err) { + assert.ifError(err); + }, + 'it only creates one comment': function(err, context) { + assert.isTrue(context.issue.calledOnce); + }, + 'it creates a comment with the right message': function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + } + }; +} + function correctNewRuleset(issueText, text) { const expectingEdit = Boolean(text); @@ -170,5 +218,7 @@ function problematicNewRuleset(text) { module.exports.setup = setup; module.exports.nullBody = nullBody; module.exports.badType = badType; +module.exports.multipleTypes = multipleTypes; +module.exports.noType = noType; module.exports.correctNewRuleset = correctNewRuleset; module.exports.problematicNewRuleset = problematicNewRuleset; diff --git a/utils/issue-format-bot/test/newissue-handler-test.js b/utils/issue-format-bot/test/newissue-handler-test.js index 11059e3236e8..211ff8ba60cf 100644 --- a/utils/issue-format-bot/test/newissue-handler-test.js +++ b/utils/issue-format-bot/test/newissue-handler-test.js @@ -10,6 +10,8 @@ vows.describe('new issue handler').addBatch( 'and we pass it the context of a new issue with a null body': handlerutil.nullBody('can\'t find any text'), 'and we pass it the context of a new issue with a bad type': handlerutil.badType('type of issue'), 'and we pass it the context of a new issue with a type of "new ruleset" and a correct body': handlerutil.correctNewRuleset('Type: new ruleset\nDomain: domain10.com'), - 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information') + 'and we pass it the context of a new issue with a type of "new ruleset" and a problematic body': handlerutil.problematicNewRuleset('missing domain information'), + 'and we pass it the context of a new issue with multiple types': handlerutil.multipleTypes('more than one type'), + 'and we pass it the context of a new issue with no type': handlerutil.noType('find the type of issue') }) ).export(module); diff --git a/utils/issue-format-bot/test/parse-test.js b/utils/issue-format-bot/test/parse-test.js index 932e1dc0a926..e2ea603c4e3d 100644 --- a/utils/issue-format-bot/test/parse-test.js +++ b/utils/issue-format-bot/test/parse-test.js @@ -135,6 +135,26 @@ vows.describe('issue parser module').addBatch({ assert.equal(obj.message, 'invalid type'); } }, + 'and we pass it a body with more than one type': { + topic: function(parse) { + return parse('Type: new ruleset\nType: ruleset issue'); + }, + 'it returns the right error': function(err, obj) { + assert.ifError(err); + assert.instanceOf(obj, Error); + assert.equal(obj.message, 'multiple types'); + } + }, + 'and we pass it a body with no type': { + topic: function(parse) { + return parse('I tried turning it off and on again and it still doesn\'t work'); + }, + 'it returns the right error': function(err, obj) { + assert.ifError(err); + assert.instanceOf(obj, Error); + assert.equal(obj.message, 'no type'); + } + }, 'and we pass it a null body': { topic: function(parse) { return parse(''); From 4c5e5eb941893d1314df162a3fabb7dc88194b99 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 28 Aug 2017 01:53:17 -0400 Subject: [PATCH 86/96] DRY up test/lib/handlerutil --- .../issue-format-bot/test/lib/handlerutil.js | 115 ++++++------------ 1 file changed, 40 insertions(+), 75 deletions(-) diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index 15027101c071..af084c551dbb 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -11,15 +11,34 @@ const vows = require('perjury'), // TODO tests for this file +// INTERNAL UTILITY FUNCTIONS + +function itWorks(err) { + assert.ifError(err); +} + +function createsOneComment(err, context) { + assert.isTrue(context.github.issues.createComment.calledOnce); +} + +function createsCommentWithMessage(text) { + return function(err, context) { + // args[0] is first call arguments, second [0] is first arg + assert.isObject(context.issue.args[0][0]); + // TODO try to find a more decoupled way than matching text + assert.isTrue(context.issue.args[0][0].body.includes(text)); + }; +} + +// EXPORTS + function setup(path, obj) { return { 'When we require the module': { topic: function() { return require(path); }, - 'it works': function(err) { - assert.ifError(err); - }, + 'it works': itWorks, 'it\'s a function': function(err, newissue) { assert.isFunction(newissue); }, @@ -48,18 +67,9 @@ function nullBody(text) { return context; }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } + 'it works': itWorks, + 'it only creates one comment': createsOneComment, + 'it creates a comment with the right message': createsCommentWithMessage(text) }; } @@ -72,18 +82,9 @@ function badType(text) { return context; }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } + 'it works': itWorks, + 'it only creates one comment': createsOneComment, + 'it creates a comment with the right message': createsCommentWithMessage(text) }; } @@ -96,18 +97,9 @@ function multipleTypes(text) { return context; }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } + 'it works': itWorks, + 'it only creates one comment': createsOneComment, + 'it creates a comment with the right message': createsCommentWithMessage(text) }; } @@ -120,18 +112,9 @@ function noType(text) { return context; }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.issue.calledOnce); - }, - 'it creates a comment with the right message': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } + 'it works': itWorks, + 'it only creates one comment': createsOneComment, + 'it creates a comment with the right message': createsCommentWithMessage(text) }; } @@ -154,9 +137,7 @@ function correctNewRuleset(issueText, text) { return context; } }, - 'it works': function(err) { - assert.ifError(err); - }, + 'it works': itWorks, 'it labels the issue appropriately': function(err, context) { assert.isTrue(context.github.issues.addLabels.calledOnce); @@ -171,16 +152,9 @@ function correctNewRuleset(issueText, text) { }; if (text) { - obj['it only creates one comment'] = function(err, context) { - assert.isTrue(context.github.issues.createComment.calledOnce); - }; + obj['it only creates one comment'] = createsOneComment; - obj['it says the user fixed it'] = function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - }; + obj['it says the user fixed it'] = createsCommentWithMessage(text); } else { obj['it doesn\'t comment'] = function(err, context) { // Once for the labels, once for the comment @@ -200,18 +174,9 @@ function problematicNewRuleset(text) { return context; }, - 'it works': function(err) { - assert.ifError(err); - }, - 'it only creates one comment': function(err, context) { - assert.isTrue(context.github.issues.createComment.calledOnce); - }, - 'it includes the problem': function(err, context) { - // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); - // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); - } + 'it works': itWorks, + 'it only creates one comment': createsOneComment, + 'it includes the problem': createsCommentWithMessage(text) }; } From 6b0c362a0ecc4a53c86c5b89975dc44307fce664 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 28 Aug 2017 01:53:55 -0400 Subject: [PATCH 87/96] Remove .js extension in a require() --- utils/issue-format-bot/lib/newissue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/issue-format-bot/lib/newissue.js b/utils/issue-format-bot/lib/newissue.js index 20a8598d3ec0..7e57d69ed98a 100644 --- a/utils/issue-format-bot/lib/newissue.js +++ b/utils/issue-format-bot/lib/newissue.js @@ -4,7 +4,7 @@ const parse = require('./parse'), validate = require('./validate'), - labeler = require('./labeler.js'), + labeler = require('./labeler'), _ = require('lodash'); module.exports = function(robot, alexa) { From 6514a6d53c660c23e41d912715860a021b6e0115 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 28 Aug 2017 02:02:46 -0400 Subject: [PATCH 88/96] Note how to handle >1 domain in ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 82a4643ded40..3d13ffbaa4c4 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -9,4 +9,6 @@ Type: feature request Type: other + + Domain: From ce1f52557ccb104218f9076a4f48f9988797ea81 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Mon, 28 Aug 2017 02:49:51 -0400 Subject: [PATCH 89/96] Clean up .eslintrc --- utils/issue-format-bot/.eslintrc.json | 151 ++---------------- utils/issue-format-bot/lib/parse.js | 4 +- utils/issue-format-bot/package.json | 1 - utils/issue-format-bot/test/.eslintrc | 5 + .../test/context-mock-test.js | 2 + .../issue-format-bot/test/lib/handlerutil.js | 2 +- 6 files changed, 20 insertions(+), 145 deletions(-) create mode 100644 utils/issue-format-bot/test/.eslintrc diff --git a/utils/issue-format-bot/.eslintrc.json b/utils/issue-format-bot/.eslintrc.json index b85af32eee51..da3ef079033a 100644 --- a/utils/issue-format-bot/.eslintrc.json +++ b/utils/issue-format-bot/.eslintrc.json @@ -1,22 +1,17 @@ { + "parserOptions": { + "ecmaVersion": 2017 + }, "env": { "es6": true, "node": true }, "extends": [ - "eslint:recommended", - "probot" + "eslint:recommended" ], "rules": { - "accessor-pairs": "error", - "array-bracket-newline": "error", - "array-bracket-spacing": [ - "error", - "never" - ], "array-callback-return": "error", "array-element-newline": "off", - "arrow-body-style": "error", "arrow-parens": [ "error", "as-needed" @@ -28,7 +23,6 @@ "before": true } ], - "block-scoped-var": "error", "block-spacing": "error", "brace-style": [ "error", @@ -37,7 +31,6 @@ "callback-return": "error", "camelcase": "error", "capitalized-comments": "off", - "class-methods-use-this": "error", "comma-dangle": "error", "comma-spacing": [ "error", @@ -51,46 +44,20 @@ "last" ], "complexity": "error", - "computed-property-spacing": [ - "error", - "never" - ], "consistent-return": "off", - "consistent-this": "error", "curly": "off", "default-case": "off", - "dot-location": [ - "error", - "property" - ], - "dot-notation": [ - "error", - { - "allowKeywords": true - } - ], + "dot-notation": "error", "eol-last": "error", "eqeqeq": "error", - "for-direction": "error", "func-call-spacing": "error", - "func-name-matching": "error", "func-names": "off", "func-style": [ "error", "declaration" ], - "generator-star-spacing": "error", - "getter-return": "error", - "global-require": "off", - "guard-for-in": "error", - "handle-callback-err": "off", - "id-blacklist": "error", - "id-length": "off", - "id-match": "error", + "handle-callback-err": "error", "indent": [2, 2], - "indent-legacy": "off", - "init-declarations": "off", - "jsx-quotes": "error", "key-spacing": "error", "keyword-spacing": [ "error", @@ -99,68 +66,32 @@ "before": true } ], - "line-comment-position": "error", "linebreak-style": [ "error", "unix" ], "lines-around-comment": "error", - "lines-around-directive": "error", - "max-depth": "error", - "max-len": "off", - "max-lines": "error", - "max-nested-callbacks": "error", - "max-params": "error", - "max-statements": "off", - "max-statements-per-line": "error", - "new-cap": "error", - "new-parens": "error", - "newline-after-var": "off", - "newline-before-return": "off", - "newline-per-chained-call": "off", - "no-alert": "error", - "no-array-constructor": "error", "no-await-in-loop": "error", "no-bitwise": "error", "no-buffer-constructor": "error", "no-caller": "error", - "no-catch-shadow": "error", "no-confusing-arrow": "error", "no-continue": "error", - "no-div-regex": "error", - "no-duplicate-imports": "error", - "no-else-return": "off", - "no-empty-function": "off", "no-eq-null": "error", "no-eval": "error", "no-extend-native": "error", "no-extra-bind": "error", - "no-extra-label": "error", - "no-extra-parens": "error", "no-floating-decimal": "error", - "no-implicit-coercion": "error", - "no-implicit-globals": "error", "no-implied-eval": "error", - "no-inline-comments": "error", "no-invalid-this": "error", - "no-iterator": "error", "no-label-var": "error", "no-labels": "error", - "no-lone-blocks": "error", "no-lonely-if": "error", "no-loop-func": "error", - "no-magic-numbers": "off", "no-mixed-operators": "error", "no-mixed-requires": "off", - "no-mixed-spaces-and-tabs": [ - "error" - ], - "no-multi-assign": "error", + "no-mixed-spaces-and-tabs": "error", "no-multi-spaces": "error", - "no-multi-str": "error", - "no-multiple-empty-lines": "error", - "no-native-reassign": "error", - "no-negated-condition": "error", "no-negated-in-lhs": "error", "no-nested-ternary": "error", "no-new": "error", @@ -168,84 +99,38 @@ "no-new-object": "error", "no-new-require": "error", "no-new-wrappers": "error", - "no-octal-escape": "error", - "no-param-reassign": "error", "no-path-concat": "error", - "no-plusplus": "off", - "no-process-env": "error", - "no-process-exit": "error", - "no-proto": "error", - "no-prototype-builtins": "error", - "no-restricted-globals": "error", - "no-restricted-imports": "error", - "no-restricted-modules": "error", - "no-restricted-properties": "error", - "no-restricted-syntax": "error", - "no-return-assign": "off", "no-return-await": "error", - "no-script-url": "error", "no-self-compare": "error", "no-sequences": "error", - "no-shadow": "error", - "no-shadow-restricted-names": "error", "no-spaced-func": "error", - "no-sync": "off", - "no-tabs": "off", - "no-template-curly-in-string": "error", + "no-sync": "error", "no-throw-literal": "error", "no-trailing-spaces": "error", "no-undef-init": "error", - "no-undefined": "error", - "no-underscore-dangle": "error", - "no-unmodified-loop-condition": "error", - "no-unneeded-ternary": "error", "no-unused-expressions": "error", "no-use-before-define": "error", "no-useless-call": "error", - "no-useless-computed-key": "error", "no-useless-concat": "error", - "no-useless-constructor": "error", - "no-useless-rename": "error", - "no-useless-return": "error", "no-var": "error", - "no-void": "error", "no-warning-comments": "off", "no-whitespace-before-property": "error", - "no-with": "error", "nonblock-statement-body-position": "error", - "object-curly-newline": "off", "object-curly-spacing": [ "error", "never" ], "object-property-newline": "error", - "object-shorthand": "off", "one-var": "off", "one-var-declaration-per-line": "error", - "operator-assignment": [ - "error", - "always" - ], - "operator-linebreak": "error", - "padded-blocks": "off", - "padding-line-between-statements": "error", "prefer-arrow-callback": "error", - "prefer-const": "off", - "prefer-destructuring": "off", - "prefer-numeric-literals": "error", + "prefer-const": "error", "prefer-promise-reject-errors": "error", - "prefer-reflect": "error", - "prefer-rest-params": "error", - "prefer-spread": "error", - "prefer-template": "off", - "quote-props": "off", "quotes": [ "error", "single" ], - "radix": "error", "require-await": "error", - "require-jsdoc": "off", "rest-spread-spacing": "error", "semi": [ "error", @@ -256,38 +141,22 @@ "error", "last" ], - "sort-imports": "error", - "sort-keys": "off", - "sort-vars": "off", "space-before-blocks": "error", - "space-before-function-paren": "off", "space-in-parens": [ "error", "never" ], "space-infix-ops": "error", - "space-unary-ops": "error", "spaced-comment": [ "error", "always" ], - "strict": "off", - "switch-colon-spacing": "error", - "symbol-description": "error", - "template-curly-spacing": [ - "error", - "never" - ], - "template-tag-spacing": "error", + "strict": "error", "unicode-bom": [ "error", "never" ], - "valid-jsdoc": "error", "vars-on-top": "error", - "wrap-iife": "error", - "wrap-regex": "error", - "yield-star-spacing": "error", "yoda": [ "error", "never" diff --git a/utils/issue-format-bot/lib/parse.js b/utils/issue-format-bot/lib/parse.js index f4d32775938f..b4b52b157960 100644 --- a/utils/issue-format-bot/lib/parse.js +++ b/utils/issue-format-bot/lib/parse.js @@ -18,7 +18,7 @@ const validTypes = ['ruleset issue', 'new ruleset', 'code issue', 'feature reque // XXX the Error API in this module is pretty funky and could use a better design module.exports = function parseDescription(body) { - const plaintext = String(processor.processSync(body)); + const plaintext = String(processor.processSync(body)); // eslint-disable-line no-sync // Check if there's no description at all if (plaintext.trim().length === 0) return new Error('null description'); @@ -41,7 +41,7 @@ module.exports = function parseDescription(body) { if (!validTypes.includes(type)) return new Error('invalid type'); // Convert to object - let normalized = _.fromPairs(lines); + const normalized = _.fromPairs(lines); // Markdown mangles full URLs into HTML entities // (e.g. `http://example.com/` instead of diff --git a/utils/issue-format-bot/package.json b/utils/issue-format-bot/package.json index 64e81162eade..f22bf9182860 100644 --- a/utils/issue-format-bot/package.json +++ b/utils/issue-format-bot/package.json @@ -20,7 +20,6 @@ "homepage": "https://github.com/EFForg/HTTPS-Everywhere#readme", "devDependencies": { "eslint": "^4.3.0", - "eslint-config-probot": "^0.1.0", "expect": "^1.20.2", "localtunnel": "^1.8.3", "perjury": "^0.4.3", diff --git a/utils/issue-format-bot/test/.eslintrc b/utils/issue-format-bot/test/.eslintrc new file mode 100644 index 000000000000..5d02eba7e4da --- /dev/null +++ b/utils/issue-format-bot/test/.eslintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "handle-callback-err": "off" + } +} diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 22b799d50de8..d983d3e540d2 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -1,5 +1,7 @@ // Copyright 2017 AJ Jordan, AGPLv3+ +'use strict'; + const vows = require('perjury'), assert = vows.assert, _ = require('lodash'); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index af084c551dbb..ee9ec7ffa93d 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -121,7 +121,7 @@ function noType(text) { function correctNewRuleset(issueText, text) { const expectingEdit = Boolean(text); - let obj = { + const obj = { topic: function(handler) { const context = makeContext.issue(issueText); From 7bc8bb70322ddc7b19c60a02c4bf87bf5b8f95a5 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 17 Sep 2017 16:34:11 -0400 Subject: [PATCH 90/96] Add explanatory comment --- utils/issue-format-bot/test/mocks/context.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 69982769787e..c50c90c02c37 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -7,6 +7,8 @@ const sinon = require('sinon'); let issueNumber = 1; module.exports = { + // Note: this is NOT the `context.issue` you see in-source + // This is used to create `context` itself; `context.issue` is the Sinon spy you see below issue(body) { return { payload: { From 9b31fffbef862ef69351bb4e4d16e11b4dbb6d92 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 17 Sep 2017 16:38:53 -0400 Subject: [PATCH 91/96] Pass through arguments to context.issue() mock --- utils/issue-format-bot/test/mocks/context.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index c50c90c02c37..3b7345737fc7 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -23,7 +23,8 @@ module.exports = { addLabels: sinon.spy() } }, - issue: sinon.spy() + // Blindly pass through the first argument as the return value + issue: sinon.spy(arg => arg) }; } }; From c073195634b2e1dff0a822ecf7143c5caab53c71 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 17 Sep 2017 16:57:25 -0400 Subject: [PATCH 92/96] Assert on API calls, not context creation Before the Sinon spy for `context.issue` didn't return anything. That meant that in the source code, things like `context.github.issue.createComment()` would get `undefined` passed to it (since that was the return value of `context.issue`). Because e.g. `createComment` would be passed `undefined`, we couldn't actually make any assertions on it, so we asserted on the context creation instead. This works okay except that it means that different Perjury topics would interfere with each other - any topic that was run later would have to account for the earlier calls to issue creation. The obvious solution to this is to make the mock behavior match the real implementation more closely, so that's what we do. `context.issue` now just passes through the values it was given, which in practice means that things like `createComment` are basically directly passed whatever was given to `context.issue()`. With that change, we're now able to actually assert something that makes sense - e.g. if we're trying to assert that no comments were posted, we can now actually do that instead of faking it and asserting that `context.issue` was only called once (instead of not at all, because of some previous action like a label change or something). As a bonus, this also means that we can remove some magic numbers which frankly I have _never_ understood! --- utils/issue-format-bot/test/context-mock-test.js | 10 +++++++++- utils/issue-format-bot/test/labeler-test.js | 9 ++------- utils/issue-format-bot/test/lib/handlerutil.js | 13 ++++--------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index d983d3e540d2..56efd0cf10dd 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -52,7 +52,15 @@ vows.describe('context mock object').addBatch({ 'context.github.issues is an object': assertProp('github.issues', assert.isObject), 'context.github.issues.createComment is a Sinon spy': assertSinonSpy('github.issues.createComment'), 'context.github.issues.addLabels is a Sinon spy': assertSinonSpy('github.issues.addLabels'), - 'context.issue is a Sinon spy': assertSinonSpy('issue') + 'context.issue is a Sinon spy': assertSinonSpy('issue'), + 'and we call context.issue()': { + topic: function(context) { + return context.issue('Wheeee!'); + }, + 'it returns whatever we passed': function(context, val) { + assert.equal(val, 'Wheeee!'); + } + } } } }).export(module); diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js index 8e362eee5b72..5dfa6d96dc2a 100644 --- a/utils/issue-format-bot/test/labeler-test.js +++ b/utils/issue-format-bot/test/labeler-test.js @@ -52,10 +52,7 @@ vows.describe('issue labeler module').addBatch(setup( assert.ok(context.github.issues.addLabels.calledOnce); }, 'the label was the top-100 label': function(err, context) { - // XXX should we test addLabels() arguments? - // Currently we don't because context.issue is a Sinon spy that returns nothing, which gets passed to addLabels() - const args = context.issue.args[0]; - + const args = context.github.issues.addLabels.args[0]; assert.isObject(args[0]); assert.isArray(args[0].labels); assert.deepEqual(args[0].labels, ['top-100']); @@ -77,9 +74,7 @@ vows.describe('issue labeler module').addBatch(setup( assert.ok(context.github.issues.addLabels.calledOnce); }, 'the label was the top-1k label': function(err, context) { - // XXX should we test addLabels() arguments? - // Currently we don't because context.issue is a Sinon spy that returns nothing, which gets passed to addLabels() - const args = context.issue.args[0]; + const args = context.github.issues.addLabels.args[0]; assert.isObject(args[0]); assert.isArray(args[0].labels); diff --git a/utils/issue-format-bot/test/lib/handlerutil.js b/utils/issue-format-bot/test/lib/handlerutil.js index ee9ec7ffa93d..3cee354bc473 100644 --- a/utils/issue-format-bot/test/lib/handlerutil.js +++ b/utils/issue-format-bot/test/lib/handlerutil.js @@ -24,9 +24,9 @@ function createsOneComment(err, context) { function createsCommentWithMessage(text) { return function(err, context) { // args[0] is first call arguments, second [0] is first arg - assert.isObject(context.issue.args[0][0]); + assert.isObject(context.github.issues.createComment.args[0][0]); // TODO try to find a more decoupled way than matching text - assert.isTrue(context.issue.args[0][0].body.includes(text)); + assert.isTrue(context.github.issues.createComment.args[0][0].body.includes(text)); }; } @@ -119,8 +119,6 @@ function noType(text) { } function correctNewRuleset(issueText, text) { - const expectingEdit = Boolean(text); - const obj = { topic: function(handler) { const context = makeContext.issue(issueText); @@ -141,9 +139,7 @@ function correctNewRuleset(issueText, text) { 'it labels the issue appropriately': function(err, context) { assert.isTrue(context.github.issues.addLabels.calledOnce); - // I'm not really sure why these magic numbers work? But they do, sooo... - // With apologies to whoever's come to edit this - const args = context.issue.args[expectingEdit ? 1 : 0]; + const args = context.github.issues.addLabels.args[0]; assert.isObject(args[0]); assert.isArray(args[0].labels); @@ -157,8 +153,7 @@ function correctNewRuleset(issueText, text) { obj['it says the user fixed it'] = createsCommentWithMessage(text); } else { obj['it doesn\'t comment'] = function(err, context) { - // Once for the labels, once for the comment - assert.isTrue(context.issue.calledOnce); + assert.isTrue(context.github.issues.createComment.notCalled); }; } From 8ce6a67fc326d7330b7fd6b0a8660d04d2769e05 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 17 Sep 2017 17:22:45 -0400 Subject: [PATCH 93/96] Refactor labeler-test --- utils/issue-format-bot/test/labeler-test.js | 37 ++++++++++----------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js index 5dfa6d96dc2a..7ea010b5e422 100644 --- a/utils/issue-format-bot/test/labeler-test.js +++ b/utils/issue-format-bot/test/labeler-test.js @@ -36,6 +36,20 @@ function resetSpies(context) { return context.github.issues.addLabels.reset(); } +function addLabelsCalledOnce(err, context) { + assert.ok(context.github.issues.addLabels.calledOnce); +} + +function assertWhichLabel(label) { + return function(err, context) { + const args = context.github.issues.addLabels.args[0]; + + assert.isObject(args[0]); + assert.isArray(args[0].labels); + assert.deepEqual(args[0].labels, [label]); + }; +} + vows.describe('issue labeler module').addBatch(setup( 'and we pass it an issue in the top 100 domains', { topic: function(labeler) { @@ -48,15 +62,8 @@ vows.describe('issue labeler module').addBatch(setup( 'it works': function(err) { assert.ifError(err); }, - 'it adds labels to the issue only once': function(err, context) { - assert.ok(context.github.issues.addLabels.calledOnce); - }, - 'the label was the top-100 label': function(err, context) { - const args = context.github.issues.addLabels.args[0]; - assert.isObject(args[0]); - assert.isArray(args[0].labels); - assert.deepEqual(args[0].labels, ['top-100']); - } + 'it adds labels to the issue only once': addLabelsCalledOnce, + 'the label was the top-100 label': assertWhichLabel('top-100') } )).addBatch(setup( 'and we pass it an issue in the top 1,000 domains', { @@ -70,15 +77,7 @@ vows.describe('issue labeler module').addBatch(setup( 'it works': function(err) { assert.ifError(err); }, - 'it adds labels to the issue only once': function(err, context) { - assert.ok(context.github.issues.addLabels.calledOnce); - }, - 'the label was the top-1k label': function(err, context) { - const args = context.github.issues.addLabels.args[0]; - - assert.isObject(args[0]); - assert.isArray(args[0].labels); - assert.deepEqual(args[0].labels, ['top-1k']); - } + 'it adds labels to the issue only once': addLabelsCalledOnce, + 'the label was the top-1k label': assertWhichLabel('top-1k') } )).export(module); From 8efbc20911929d625703fd43b9241db55136b07b Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 17 Sep 2017 17:38:19 -0400 Subject: [PATCH 94/96] Remove old top-* labels --- utils/issue-format-bot/lib/labeler.js | 10 ++++++++++ utils/issue-format-bot/test/context-mock-test.js | 1 + utils/issue-format-bot/test/labeler-test.js | 13 +++++++++++-- utils/issue-format-bot/test/mocks/context.js | 3 ++- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js index 5fba32ac897a..ae9a203e64c8 100644 --- a/utils/issue-format-bot/lib/labeler.js +++ b/utils/issue-format-bot/lib/labeler.js @@ -2,6 +2,8 @@ 'use strict'; +const alexaLabels = ['top-100', 'top-1k', 'top-10k', 'top-100k', 'top-1m']; + module.exports = function label(context, data, alexa) { const alexaPosition = alexa.data.indexOf(data.domain); const labels = []; @@ -22,6 +24,14 @@ module.exports = function label(context, data, alexa) { labels.push('top-1m'); } + // Every Alexa label *except* our new one + const toRemove = alexaLabels.filter(label => label !== labels[0]); + toRemove.forEach(label => { + const removalParams = context.issue({name: label}); + // This is racy with addLabels() but honestly who cares + context.github.issues.removeLabel(removalParams); + }); + const params = context.issue({labels}); return context.github.issues.addLabels(params); }; diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index 56efd0cf10dd..fc4eefdc30c3 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -52,6 +52,7 @@ vows.describe('context mock object').addBatch({ 'context.github.issues is an object': assertProp('github.issues', assert.isObject), 'context.github.issues.createComment is a Sinon spy': assertSinonSpy('github.issues.createComment'), 'context.github.issues.addLabels is a Sinon spy': assertSinonSpy('github.issues.addLabels'), + 'context.github.issues.removeLabel is a Sinon spy': assertSinonSpy('github.issues.removeLabel'), 'context.issue is a Sinon spy': assertSinonSpy('issue'), 'and we call context.issue()': { topic: function(context) { diff --git a/utils/issue-format-bot/test/labeler-test.js b/utils/issue-format-bot/test/labeler-test.js index 7ea010b5e422..0172b7dc8d43 100644 --- a/utils/issue-format-bot/test/labeler-test.js +++ b/utils/issue-format-bot/test/labeler-test.js @@ -50,6 +50,13 @@ function assertWhichLabel(label) { }; } +function assertOtherLabelsRemoved(labels) { + return function(err, context) { + const calledLabels = context.github.issues.removeLabel.args.map(args => args[0].name); + assert.deepEqual(calledLabels, labels); + }; +} + vows.describe('issue labeler module').addBatch(setup( 'and we pass it an issue in the top 100 domains', { topic: function(labeler) { @@ -63,7 +70,8 @@ vows.describe('issue labeler module').addBatch(setup( assert.ifError(err); }, 'it adds labels to the issue only once': addLabelsCalledOnce, - 'the label was the top-100 label': assertWhichLabel('top-100') + 'the label was the top-100 label': assertWhichLabel('top-100'), + 'all other labels were removed': assertOtherLabelsRemoved(['top-1k', 'top-10k', 'top-100k', 'top-1m']) } )).addBatch(setup( 'and we pass it an issue in the top 1,000 domains', { @@ -78,6 +86,7 @@ vows.describe('issue labeler module').addBatch(setup( assert.ifError(err); }, 'it adds labels to the issue only once': addLabelsCalledOnce, - 'the label was the top-1k label': assertWhichLabel('top-1k') + 'the label was the top-1k label': assertWhichLabel('top-1k'), + 'all other labels were removed': assertOtherLabelsRemoved(['top-100', 'top-10k', 'top-100k', 'top-1m']) } )).export(module); diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 3b7345737fc7..9f979238e860 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -20,7 +20,8 @@ module.exports = { github: { issues: { createComment: sinon.spy(), - addLabels: sinon.spy() + addLabels: sinon.spy(), + removeLabel: sinon.spy() } }, // Blindly pass through the first argument as the return value From 1d98812801469ef7f33cd26be56c4f3443fe35e3 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 17 Sep 2017 17:45:38 -0400 Subject: [PATCH 95/96] Expand README.md --- utils/issue-format-bot/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/utils/issue-format-bot/README.md b/utils/issue-format-bot/README.md index 03a077c1139f..5f87c5a578a9 100644 --- a/utils/issue-format-bot/README.md +++ b/utils/issue-format-bot/README.md @@ -2,6 +2,14 @@ > a GitHub Integration built with [probot](https://github.com/probot/probot) that parses incoming HTTPS Everywhere ruleset bugs +## About + +This bot enforces consistency in HTTPS Everywhere issues. All issues are required to have a "type", and for ruleset bugs and new rulesets, the bot also requires issues to have a machine-readable domain. + +It then uses this information to label the issue appropriately (e.g. with `top-100`, `top-1k`, etc.). + +All the fields are set up in the issue template, so users shouldn't have any trouble if they just follow the instructions they're presented when filing a new issue. That being said, if the bot encounters an error, it will post a comment telling the user what the error was and suggesting they edit their issue. Once the issue is edited, the bot will recognize this and will reparse the issue, posting any followup comments as necessary (in case it encounters more problems). + ## Setup ``` From 1c4e918131b1527daa8e72619d9e2d209177ed7e Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 17 Sep 2017 18:55:44 -0400 Subject: [PATCH 96/96] Don't error when we remove labels --- utils/issue-format-bot/lib/labeler.js | 8 +++++++- utils/issue-format-bot/test/context-mock-test.js | 4 ++++ utils/issue-format-bot/test/mocks/context.js | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/utils/issue-format-bot/lib/labeler.js b/utils/issue-format-bot/lib/labeler.js index ae9a203e64c8..f82a8d64cd3f 100644 --- a/utils/issue-format-bot/lib/labeler.js +++ b/utils/issue-format-bot/lib/labeler.js @@ -29,7 +29,13 @@ module.exports = function label(context, data, alexa) { toRemove.forEach(label => { const removalParams = context.issue({name: label}); // This is racy with addLabels() but honestly who cares - context.github.issues.removeLabel(removalParams); + context.github.issues.removeLabel(removalParams).catch(err => { + // GitHub returns 404 if the label doesn't exist on the issue, so we just swallow those errors + // XXX should we query labels and do a diff? + if (err.code === 404) return; + + throw err; + }); }); const params = context.issue({labels}); diff --git a/utils/issue-format-bot/test/context-mock-test.js b/utils/issue-format-bot/test/context-mock-test.js index fc4eefdc30c3..996cc7caf8ee 100644 --- a/utils/issue-format-bot/test/context-mock-test.js +++ b/utils/issue-format-bot/test/context-mock-test.js @@ -52,6 +52,10 @@ vows.describe('context mock object').addBatch({ 'context.github.issues is an object': assertProp('github.issues', assert.isObject), 'context.github.issues.createComment is a Sinon spy': assertSinonSpy('github.issues.createComment'), 'context.github.issues.addLabels is a Sinon spy': assertSinonSpy('github.issues.addLabels'), + 'context.github.issues.removeLabel returns a Promise': function(err, context) { + const promise = context.github.issues.removeLabel(); + assert.isFunction(promise.then); + }, 'context.github.issues.removeLabel is a Sinon spy': assertSinonSpy('github.issues.removeLabel'), 'context.issue is a Sinon spy': assertSinonSpy('issue'), 'and we call context.issue()': { diff --git a/utils/issue-format-bot/test/mocks/context.js b/utils/issue-format-bot/test/mocks/context.js index 9f979238e860..8d4da16abed8 100644 --- a/utils/issue-format-bot/test/mocks/context.js +++ b/utils/issue-format-bot/test/mocks/context.js @@ -6,6 +6,8 @@ const sinon = require('sinon'); let issueNumber = 1; +function noop() {} + module.exports = { // Note: this is NOT the `context.issue` you see in-source // This is used to create `context` itself; `context.issue` is the Sinon spy you see below @@ -21,7 +23,7 @@ module.exports = { issues: { createComment: sinon.spy(), addLabels: sinon.spy(), - removeLabel: sinon.spy() + removeLabel: sinon.spy(() => new Promise(noop)) } }, // Blindly pass through the first argument as the return value