esperanto-source 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
data/vendor/esperanto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- esperanto.js v0.7.1 - 2015-05-27
2
+ esperanto.js v0.7.2 - 2015-05-29
3
3
  http://esperantojs.org
4
4
 
5
5
  Released under the MIT License.
@@ -987,7 +987,9 @@ function resolveChains(modules, moduleLookup) {
987
987
 
988
988
  x.specifiers.forEach(function (s) {
989
989
  if (hasOwnProp.call(origin, s.name)) {
990
- chains['' + s.name + '@' + mod.id] = origin[s.name];
990
+ chains['' + s.as + '@' + mod.id] = origin[s.name];
991
+ } else if (s.as !== s.name) {
992
+ chains['' + s.as + '@' + mod.id] = '' + s.name + '@' + mod.id;
991
993
  }
992
994
  });
993
995
  });
@@ -1011,7 +1013,7 @@ function resolveChains(modules, moduleLookup) {
1011
1013
  if (!x.specifiers) return;
1012
1014
 
1013
1015
  x.specifiers.forEach(function (s) {
1014
- setOrigin(s, '' + s.name + '@' + mod.id, chains, moduleLookup);
1016
+ setOrigin(s, '' + s.as + '@' + mod.id, chains, moduleLookup);
1015
1017
  });
1016
1018
  });
1017
1019
  });
@@ -1310,7 +1312,7 @@ function resolveExports(bundle) {
1310
1312
  name = s.name;
1311
1313
  }
1312
1314
 
1313
- addExport(module, name, s.name);
1315
+ addExport(module, name, s.as);
1314
1316
  });
1315
1317
  } else if (!x.isDefault && x.name) {
1316
1318
  addExport(bundle.entryModule, x.name, x.name);
@@ -1760,7 +1762,7 @@ function getModule(mod) {
1760
1762
  mod.doesExport[x.name] = true;
1761
1763
  } else if (x.specifiers) {
1762
1764
  x.specifiers.forEach(function (s) {
1763
- mod.doesExport[s.name] = true;
1765
+ mod.doesExport[s.as] = true;
1764
1766
  });
1765
1767
  } else {
1766
1768
  throw new Error('Unexpected export type');
@@ -2924,7 +2926,9 @@ function flattenExports(exports) {
2924
2926
  } else if (x.name) {
2925
2927
  flattened.push(x.name);
2926
2928
  } else if (x.specifiers) {
2927
- flattened.push.apply(flattened, x.specifiers.map(getName));
2929
+ flattened.push.apply(flattened, x.specifiers.map(function (x) {
2930
+ return x.as;
2931
+ }));
2928
2932
  }
2929
2933
  });
2930
2934