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.es.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
@@ -5291,7 +5291,7 @@ Parameter.prototype.getName = function getName () {
5291
5291
  };
5292
5292
 
5293
5293
  var Scope = function Scope ( options ) {
5294
- options = options || {};
5294
+ if ( options === void 0 ) options = {};
5295
5295
 
5296
5296
  this.parent = options.parent;
5297
5297
  this.isBlockScope = !!options.isBlockScope;
@@ -5863,7 +5863,9 @@ var CallExpression = (function (Node) {
5863
5863
  };
5864
5864
 
5865
5865
  CallExpression.prototype.initialise = function initialise ( scope ) {
5866
- this.module.bundle.dependentExpressions.push( this );
5866
+ if ( isProgramLevel( this ) ) {
5867
+ this.module.bundle.dependentExpressions.push( this );
5868
+ }
5867
5869
  Node.prototype.initialise.call( this, scope );
5868
5870
  };
5869
5871
 
@@ -5874,6 +5876,17 @@ var CallExpression = (function (Node) {
5874
5876
  return CallExpression;
5875
5877
  }(Node$1));
5876
5878
 
5879
+ function isProgramLevel ( node ) {
5880
+ do {
5881
+ if ( node.type === 'Program' ) {
5882
+ return true;
5883
+ }
5884
+ node = node.parent;
5885
+ } while ( node && !/Function/.test( node.type ) );
5886
+
5887
+ return false;
5888
+ }
5889
+
5877
5890
  // TODO is this basically identical to FunctionDeclaration?
5878
5891
  var ClassDeclaration = (function (Node) {
5879
5892
  function ClassDeclaration () {
@@ -9113,7 +9126,7 @@ Bundle.prototype.render = function render ( options ) {
9113
9126
  return ordered;
9114
9127
  };
9115
9128
 
9116
- var VERSION = '0.36.3';
9129
+ var VERSION = '0.36.4';
9117
9130
 
9118
9131
  var ALLOWED_KEYS = [
9119
9132
  'acorn',