babel-source 5.6.12 → 5.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
 - data/lib/babel.js +45 -2
 - data/lib/babel/source.rb +2 -2
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,15 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            !binary "U0hBMQ==":
         
     | 
| 
       3 
3 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
      
 4 
     | 
    
         
            +
                OTRkNWRhZTliZjEyZGM3ZGZlM2VmNGE4ZWQ2OGRjNGUwZjhiY2Y2NA==
         
     | 
| 
       5 
5 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                OWQ2Y2MzOWI3OTgyNmI1ZGMwMTg1N2JlOTk4ZGNiYWJkZWFkMzk1Mw==
         
     | 
| 
       7 
7 
     | 
    
         
             
            SHA512:
         
     | 
| 
       8 
8 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                 
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
      
 9 
     | 
    
         
            +
                YWVkZGFmMmU3NWQ3ZTYxMmIxMWIzZDc4YTdhNWU5NjU2OTAxMzdkYjVlN2Zj
         
     | 
| 
      
 10 
     | 
    
         
            +
                NTg2Nzg3NmRkMDlmNWNiZmZjZGE5ZDdiMWIwMmM0MDc3Y2NhN2FkZjRiYTkw
         
     | 
| 
      
 11 
     | 
    
         
            +
                ZDkyNDY4MDM5OWE0YTk3ODU4MDNiMDIzYzk5NmZiMGQ2NmJlZWE=
         
     | 
| 
       12 
12 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       13 
     | 
    
         
            -
                 
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
      
 13 
     | 
    
         
            +
                Njc5YzliYWU4ZjU1NGVkOGEzNTAzYjIwYzQ4OGJkYTk1MmVkNjc1ZTdkNWYy
         
     | 
| 
      
 14 
     | 
    
         
            +
                N2I3NzlmZmI5YTM3NDE1YTY3NDc3YjIxZDQxNTczMjc5MmE3MzczMTQ3MzRk
         
     | 
| 
      
 15 
     | 
    
         
            +
                Y2M5ZGFmNzA0ODk4ZDljNDQxNzk0MTdkZjhkZjVhOWI4NjQ2OTY=
         
     | 
    
        data/lib/babel.js
    CHANGED
    
    | 
         @@ -27178,6 +27178,7 @@ var def = types.Type.def; 
     | 
|
| 
       27178 
27178 
     | 
    
         
             
            var or = types.Type.or;
         
     | 
| 
       27179 
27179 
     | 
    
         
             
            var builtin = types.builtInTypes;
         
     | 
| 
       27180 
27180 
     | 
    
         
             
            var isString = builtin.string;
         
     | 
| 
      
 27181 
     | 
    
         
            +
            var isNumber = builtin.number;
         
     | 
| 
       27181 
27182 
     | 
    
         
             
            var isBoolean = builtin.boolean;
         
     | 
| 
       27182 
27183 
     | 
    
         
             
            var defaults = require("../lib/shared").defaults;
         
     | 
| 
       27183 
27184 
     | 
    
         | 
| 
         @@ -27288,6 +27289,12 @@ def("VoidTypeAnnotation") 
     | 
|
| 
       27288 
27289 
     | 
    
         
             
            def("NumberTypeAnnotation")
         
     | 
| 
       27289 
27290 
     | 
    
         
             
              .bases("Type");
         
     | 
| 
       27290 
27291 
     | 
    
         | 
| 
      
 27292 
     | 
    
         
            +
            def("NumberLiteralTypeAnnotation")
         
     | 
| 
      
 27293 
     | 
    
         
            +
              .bases("Type")
         
     | 
| 
      
 27294 
     | 
    
         
            +
              .build("value", "raw")
         
     | 
| 
      
 27295 
     | 
    
         
            +
              .field("value", isNumber)
         
     | 
| 
      
 27296 
     | 
    
         
            +
              .field("raw", isString);
         
     | 
| 
      
 27297 
     | 
    
         
            +
             
     | 
| 
       27291 
27298 
     | 
    
         
             
            def("StringTypeAnnotation")
         
     | 
| 
       27292 
27299 
     | 
    
         
             
              .bases("Type");
         
     | 
| 
       27293 
27300 
     | 
    
         | 
| 
         @@ -27300,6 +27307,12 @@ def("StringLiteralTypeAnnotation") 
     | 
|
| 
       27300 
27307 
     | 
    
         
             
            def("BooleanTypeAnnotation")
         
     | 
| 
       27301 
27308 
     | 
    
         
             
              .bases("Type");
         
     | 
| 
       27302 
27309 
     | 
    
         | 
| 
      
 27310 
     | 
    
         
            +
            def("BooleanLiteralTypeAnnotation")
         
     | 
| 
      
 27311 
     | 
    
         
            +
              .bases("Type")
         
     | 
| 
      
 27312 
     | 
    
         
            +
              .build("value", "raw")
         
     | 
| 
      
 27313 
     | 
    
         
            +
              .field("value", isBoolean)
         
     | 
| 
      
 27314 
     | 
    
         
            +
              .field("raw", isString);
         
     | 
| 
      
 27315 
     | 
    
         
            +
             
     | 
| 
       27303 
27316 
     | 
    
         
             
            def("TypeAnnotation")
         
     | 
| 
       27304 
27317 
     | 
    
         
             
              .bases("Node")
         
     | 
| 
       27305 
27318 
     | 
    
         
             
              .build("typeAnnotation")
         
     | 
| 
         @@ -29677,7 +29690,7 @@ Dp.build = function(/* param1, param2, ... */) { 
     | 
|
| 
       29677 
29690 
     | 
    
         
             
                // Every buildable type will have its "type" field filled in
         
     | 
| 
       29678 
29691 
     | 
    
         
             
                // automatically. This includes types that are not subtypes of Node,
         
     | 
| 
       29679 
29692 
     | 
    
         
             
                // like SourceLocation, but that seems harmless (TODO?).
         
     | 
| 
       29680 
     | 
    
         
            -
                self.field("type",  
     | 
| 
      
 29693 
     | 
    
         
            +
                self.field("type", isString, function() { return self.typeName });
         
     | 
| 
       29681 
29694 
     | 
    
         | 
| 
       29682 
29695 
     | 
    
         
             
                // Override Dp.buildable for this Def instance.
         
     | 
| 
       29683 
29696 
     | 
    
         
             
                Object.defineProperty(self, "buildable", { value: true });
         
     | 
| 
         @@ -29769,6 +29782,13 @@ function getBuilderName(typeName) { 
     | 
|
| 
       29769 
29782 
     | 
    
         
             
                    }
         
     | 
| 
       29770 
29783 
     | 
    
         
             
                });
         
     | 
| 
       29771 
29784 
     | 
    
         
             
            }
         
     | 
| 
      
 29785 
     | 
    
         
            +
            exports.getBuilderName = getBuilderName;
         
     | 
| 
      
 29786 
     | 
    
         
            +
             
     | 
| 
      
 29787 
     | 
    
         
            +
            function getStatementBuilderName(typeName) {
         
     | 
| 
      
 29788 
     | 
    
         
            +
                typeName = getBuilderName(typeName);
         
     | 
| 
      
 29789 
     | 
    
         
            +
                return typeName.replace(/(Expression)?$/, "Statement");
         
     | 
| 
      
 29790 
     | 
    
         
            +
            }
         
     | 
| 
      
 29791 
     | 
    
         
            +
            exports.getStatementBuilderName = getStatementBuilderName;
         
     | 
| 
       29772 
29792 
     | 
    
         | 
| 
       29773 
29793 
     | 
    
         
             
            // The reason fields are specified using .field(...) instead of an object
         
     | 
| 
       29774 
29794 
     | 
    
         
             
            // literal syntax is somewhat subtle: the object literal syntax would
         
     | 
| 
         @@ -29877,9 +29897,32 @@ Dp.finalize = function() { 
     | 
|
| 
       29877 
29897 
     | 
    
         | 
| 
       29878 
29898 
     | 
    
         
             
                    // A linearization of the inheritance hierarchy.
         
     | 
| 
       29879 
29899 
     | 
    
         
             
                    populateSupertypeList(this.typeName, this.supertypeList);
         
     | 
| 
      
 29900 
     | 
    
         
            +
             
     | 
| 
      
 29901 
     | 
    
         
            +
                    if (this.buildable && this.supertypeList.lastIndexOf("Expression") >= 0) {
         
     | 
| 
      
 29902 
     | 
    
         
            +
                        wrapExpressionBuilderWithStatement(this.typeName);
         
     | 
| 
      
 29903 
     | 
    
         
            +
                    }
         
     | 
| 
       29880 
29904 
     | 
    
         
             
                }
         
     | 
| 
       29881 
29905 
     | 
    
         
             
            };
         
     | 
| 
       29882 
29906 
     | 
    
         | 
| 
      
 29907 
     | 
    
         
            +
            // Adds an additional builder for Expression subtypes
         
     | 
| 
      
 29908 
     | 
    
         
            +
            // that wraps the built Expression in an ExpressionStatements.
         
     | 
| 
      
 29909 
     | 
    
         
            +
            function wrapExpressionBuilderWithStatement(typeName) {
         
     | 
| 
      
 29910 
     | 
    
         
            +
                var wrapperName = getStatementBuilderName(typeName);
         
     | 
| 
      
 29911 
     | 
    
         
            +
             
     | 
| 
      
 29912 
     | 
    
         
            +
                // skip if the builder already exists
         
     | 
| 
      
 29913 
     | 
    
         
            +
                if (builders[wrapperName]) return;
         
     | 
| 
      
 29914 
     | 
    
         
            +
             
     | 
| 
      
 29915 
     | 
    
         
            +
                // the builder function to wrap with builders.ExpressionStatement
         
     | 
| 
      
 29916 
     | 
    
         
            +
                var wrapped = builders[getBuilderName(typeName)];
         
     | 
| 
      
 29917 
     | 
    
         
            +
             
     | 
| 
      
 29918 
     | 
    
         
            +
                // skip if there is nothing to wrap
         
     | 
| 
      
 29919 
     | 
    
         
            +
                if (!wrapped) return;
         
     | 
| 
      
 29920 
     | 
    
         
            +
             
     | 
| 
      
 29921 
     | 
    
         
            +
                builders[wrapperName] = function() {
         
     | 
| 
      
 29922 
     | 
    
         
            +
                    return builders.expressionStatement(wrapped.apply(builders, arguments));
         
     | 
| 
      
 29923 
     | 
    
         
            +
                };
         
     | 
| 
      
 29924 
     | 
    
         
            +
            }
         
     | 
| 
      
 29925 
     | 
    
         
            +
             
     | 
| 
       29883 
29926 
     | 
    
         
             
            function populateSupertypeList(typeName, list) {
         
     | 
| 
       29884 
29927 
     | 
    
         
             
                list.length = 0;
         
     | 
| 
       29885 
29928 
     | 
    
         
             
                list.push(typeName);
         
     | 
| 
         @@ -64580,7 +64623,7 @@ module.exports = function (str) { 
     | 
|
| 
       64580 
64623 
     | 
    
         
             
            module.exports={
         
     | 
| 
       64581 
64624 
     | 
    
         
             
              "name": "babel-core",
         
     | 
| 
       64582 
64625 
     | 
    
         
             
              "description": "A compiler for writing next generation JavaScript",
         
     | 
| 
       64583 
     | 
    
         
            -
              "version": "5.6. 
     | 
| 
      
 64626 
     | 
    
         
            +
              "version": "5.6.13",
         
     | 
| 
       64584 
64627 
     | 
    
         
             
              "author": "Sebastian McKenzie <sebmck@gmail.com>",
         
     | 
| 
       64585 
64628 
     | 
    
         
             
              "homepage": "https://babeljs.io/",
         
     | 
| 
       64586 
64629 
     | 
    
         
             
              "license": "MIT",
         
     | 
    
        data/lib/babel/source.rb
    CHANGED