rollup 0.45.1 → 0.45.2

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.45.1
3
- Mon Jul 10 2017 19:55:13 GMT-0400 (EDT) - commit 87c4733df2225b0d43712823d29b98e847d371c4
2
+ Rollup.js v0.45.2
3
+ Wed Jul 12 2017 22:24:48 GMT-0400 (EDT) - commit b7a4edf2b7c26f58c8201a63c820541d9b37186d
4
4
 
5
5
 
6
6
  https://github.com/rollup/rollup
@@ -8143,6 +8143,7 @@ var Module = function Module (ref) {
8143
8143
  var ast = ref.ast;
8144
8144
  var sourceMapChain = ref.sourceMapChain;
8145
8145
  var resolvedIds = ref.resolvedIds;
8146
+ var resolvedExternalIds = ref.resolvedExternalIds;
8146
8147
  var bundle = ref.bundle;
8147
8148
 
8148
8149
  this.code = code;
@@ -8175,6 +8176,7 @@ var Module = function Module (ref) {
8175
8176
  this.sources = [];
8176
8177
  this.dependencies = [];
8177
8178
  this.resolvedIds = resolvedIds || blank();
8179
+ this.resolvedExternalIds = resolvedExternalIds || blank();
8178
8180
 
8179
8181
  // imports and exports, indexed by local name
8180
8182
  this.imports = blank();
@@ -8379,21 +8381,23 @@ Module.prototype.bindImportSpecifiers = function bindImportSpecifiers () {
8379
8381
  keys( specifiers ).forEach( function (name) {
8380
8382
  var specifier = specifiers[ name ];
8381
8383
 
8382
- var id = this$1.resolvedIds[ specifier.source ];
8384
+ var id = this$1.resolvedIds[ specifier.source ] || this$1.resolvedExternalIds[ specifier.source ];
8383
8385
  specifier.module = this$1.bundle.moduleById.get( id );
8384
8386
  });
8385
8387
  });
8386
8388
 
8387
8389
  this.exportAllModules = this.exportAllSources.map( function (source) {
8388
- var id = this$1.resolvedIds[ source ];
8390
+ var id = this$1.resolvedIds[ source ] || this$1.resolvedExternalIds[ source ];
8389
8391
  return this$1.bundle.moduleById.get( id );
8390
8392
  });
8391
8393
 
8392
8394
  this.sources.forEach( function (source) {
8393
8395
  var id = this$1.resolvedIds[ source ];
8394
- var module = this$1.bundle.moduleById.get( id );
8395
8396
 
8396
- if ( !module.isExternal ) { this$1.dependencies.push( module ); }
8397
+ if ( id ) {
8398
+ var module = this$1.bundle.moduleById.get( id );
8399
+ this$1.dependencies.push( module );
8400
+ }
8397
8401
  });
8398
8402
  };
8399
8403
 
@@ -8504,7 +8508,8 @@ Module.prototype.toJSON = function toJSON () {
8504
8508
  originalSourceMap: this.originalSourceMap,
8505
8509
  ast: this.astClone,
8506
8510
  sourceMapChain: this.sourceMapChain,
8507
- resolvedIds: this.resolvedIds
8511
+ resolvedIds: this.resolvedIds,
8512
+ resolvedExternalIds: this.resolvedExternalIds
8508
8513
  };
8509
8514
  };
8510
8515
 
@@ -8656,7 +8661,7 @@ function getInteropBlock ( bundle, options ) {
8656
8661
  return ((bundle.varOrConst) + " " + (module.name) + "__default = 'default' in " + (module.name) + " ? " + (module.name) + "['default'] : " + (module.name) + ";");
8657
8662
  }
8658
8663
 
8659
- return ((module.name) + " = " + (module.name) + " && 'default' in " + (module.name) + " ? " + (module.name) + "['default'] : " + (module.name) + ";");
8664
+ return ((module.name) + " = " + (module.name) + " && " + (module.name) + ".hasOwnProperty('default') ? " + (module.name) + "['default'] : " + (module.name) + ";");
8660
8665
  })
8661
8666
  .filter( Boolean )
8662
8667
  .join( '\n' );
@@ -10020,7 +10025,7 @@ Bundle.prototype.fetchModule = function fetchModule ( id, importer ) {
10020
10025
  }
10021
10026
  });
10022
10027
  module.exportAllSources.forEach( function (source) {
10023
- var id = module.resolvedIds[ source ];
10028
+ var id = module.resolvedIds[ source ] || module.resolvedExternalIds[ source ];
10024
10029
  var exportAllModule = this$1.moduleById.get( id );
10025
10030
  if ( exportAllModule.isExternal ) { return; }
10026
10031
 
@@ -10070,7 +10075,7 @@ Bundle.prototype.fetchAllDependencies = function fetchAllDependencies ( module )
10070
10075
  }
10071
10076
 
10072
10077
  if ( isExternal ) {
10073
- module.resolvedIds[ source ] = externalId;
10078
+ module.resolvedExternalIds[ source ] = externalId;
10074
10079
 
10075
10080
  if ( !this$1.moduleById.has( externalId ) ) {
10076
10081
  var module$1 = new ExternalModule( externalId, this$1.getPath( externalId ) );
@@ -10342,7 +10347,7 @@ Bundle.prototype.warn = function warn ( warning ) {
10342
10347
  this.onwarn( warning );
10343
10348
  };
10344
10349
 
10345
- var VERSION = '0.45.1';
10350
+ var VERSION = '0.45.2';
10346
10351
 
10347
10352
  var ALLOWED_KEYS = [
10348
10353
  'acorn',