rollup 0.36.3 → 0.36.4

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.
package/dist/rollup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- Rollup.js v0.36.3
3
- Sun Oct 09 2016 16:03:05 GMT-0400 (EDT) - commit 5344665d7256c7192cb69068635ff0d3f6c6cd8b
2
+ Rollup.js v0.36.4
3
+ Wed Nov 23 2016 09:01:35 GMT-0500 (EST) - commit fca14dbab102a9fa8efc7249287e2145583712ea
4
4
 
5
5
 
6
6
  https://github.com/rollup/rollup
@@ -5295,7 +5295,7 @@ Parameter.prototype.getName = function getName () {
5295
5295
  };
5296
5296
 
5297
5297
  var Scope = function Scope ( options ) {
5298
- options = options || {};
5298
+ if ( options === void 0 ) options = {};
5299
5299
 
5300
5300
  this.parent = options.parent;
5301
5301
  this.isBlockScope = !!options.isBlockScope;
@@ -5867,7 +5867,9 @@ var CallExpression = (function (Node) {
5867
5867
  };
5868
5868
 
5869
5869
  CallExpression.prototype.initialise = function initialise ( scope ) {
5870
- this.module.bundle.dependentExpressions.push( this );
5870
+ if ( isProgramLevel( this ) ) {
5871
+ this.module.bundle.dependentExpressions.push( this );
5872
+ }
5871
5873
  Node.prototype.initialise.call( this, scope );
5872
5874
  };
5873
5875
 
@@ -5878,6 +5880,17 @@ var CallExpression = (function (Node) {
5878
5880
  return CallExpression;
5879
5881
  }(Node$1));
5880
5882
 
5883
+ function isProgramLevel ( node ) {
5884
+ do {
5885
+ if ( node.type === 'Program' ) {
5886
+ return true;
5887
+ }
5888
+ node = node.parent;
5889
+ } while ( node && !/Function/.test( node.type ) );
5890
+
5891
+ return false;
5892
+ }
5893
+
5881
5894
  // TODO is this basically identical to FunctionDeclaration?
5882
5895
  var ClassDeclaration = (function (Node) {
5883
5896
  function ClassDeclaration () {
@@ -9117,7 +9130,7 @@ Bundle.prototype.render = function render ( options ) {
9117
9130
  return ordered;
9118
9131
  };
9119
9132
 
9120
- var VERSION = '0.36.3';
9133
+ var VERSION = '0.36.4';
9121
9134
 
9122
9135
  var ALLOWED_KEYS = [
9123
9136
  'acorn',