This repository has been archived by the owner. It is now read-only.

Add support for declare module.exports #72

Merged
merged 3 commits into from Jul 28, 2016

Conversation

Projects
None yet
5 participants
@danez
Copy link
Member

danez commented Jul 9, 2016

This adds support for declare module.exports.

closes #70
This PR is one part, the other part is in babel. babel/babel#3570

@danez danez added the Tag: Bug Fix label Jul 9, 2016

pp.flowParseDeclareModuleExports = function (node) {
this.next(); // module
this.next(); // .
this.eatContextual('exports');

This comment has been minimized.

@jamiebuilds

This comment has been minimized.

@kittens

kittens Jul 10, 2016

Contributor

Double quotes

fuck ya they're rad ok

This comment has been minimized.

@danez

danez Jul 10, 2016

Author Member

damit :D

pp.flowParseDeclareModuleExports = function (node) {
this.next(); // module
this.next(); // .
this.eatContextual("exports");

This comment has been minimized.

@kittens

kittens Jul 10, 2016

Contributor

expectContextual is probably best here.

@@ -109,6 +113,14 @@ pp.flowParseDeclareModule = function (node) {
return this.finishNode(node, "DeclareModule");
};

pp.flowParseDeclareModuleExports = function (node) {
this.next(); // module

This comment has been minimized.

@kittens

kittens Jul 10, 2016

Contributor

expectContextual("module") just so we have more assertions

@hzoo

This comment has been minimized.

Copy link
Member

hzoo commented Jul 12, 2016

👍

@danez danez force-pushed the danez:declare-module-exports branch from a347ed1 to 871f4a3 Jul 12, 2016

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jul 12, 2016

Current coverage is 97.01%

Merging #72 into master will increase coverage by <.01%

@@             master        #72   diff @@
==========================================
  Files            19         19          
  Lines          2972       2980     +8   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2883       2891     +8   
  Misses           89         89          
  Partials          0          0          

Powered by Codecov. Last updated by 0b62ece...871f4a3

@danez danez merged commit f576865 into babel:master Jul 28, 2016

3 checks passed

codecov/patch 100% of diff hit (target 97.00%)
Details
codecov/project 97.01% (+<.01%) compared to 0b62ece
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danez danez deleted the danez:declare-module-exports branch Jul 28, 2016

@ryyppy ryyppy referenced this pull request Aug 3, 2016

Closed

`module.exports` failure. #161

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.