efront 4.1.6 → 4.1.8

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.
@@ -279,6 +279,7 @@ var loadModule = function (url, then, prebuilds = {}) {
279
279
  var data = responseTree[url];
280
280
  if (typeof data === "function") {
281
281
  var mod = data;
282
+ mod.noenv = true;
282
283
  flushTree(loadedModules, key, mod);
283
284
  return;
284
285
  }
@@ -494,7 +495,6 @@ var createModule = function (exec, originNames, compiledNames, prebuilds = {}) {
494
495
  if (created) return result;
495
496
  return promise;
496
497
  });
497
-
498
498
  var _this = isModuleInit ? exports : window;
499
499
  var argsPromises = argsList.filter(isThenable);
500
500
  argsList = argsList.concat(exec.strs);
@@ -609,7 +609,12 @@ var init = function (url, then, prebuilds) {
609
609
  if (error) return crack(error);
610
610
 
611
611
  var module = loadedModules[key];
612
- if (!module) return;
612
+ if (!module || module.noenv) {
613
+ // <!--
614
+ undefinedModules[key] = true;
615
+ // -->
616
+ return then();
617
+ }
613
618
  var args = module.args || [];
614
619
 
615
620
  if (!args || !args.length) {
@@ -853,7 +853,7 @@ Javascript.prototype.fix = function (code) {
853
853
  });
854
854
  delete code.used.import;
855
855
  delete code.envs.import;
856
- if (imports.length) code.used.import_meta = imports;
856
+ if (imports.length) code.used["import_meta"] = imports, code.envs["import_meta"] = true;
857
857
  }
858
858
  if (code.exportDecs) {
859
859
  var exportDecs = code.exportDecs;
@@ -91,9 +91,13 @@ var maplist = function (u) {
91
91
  }
92
92
  if (enumtype & (REFSTRC | REFMOVE)) {
93
93
  if (o.property) o[ignore] = true;
94
- else m.wcount++;
94
+ else if (o.equal) m.enumref = o.enumref, m.wcount++;
95
+ else if (enumtype & REFMOVE) m.wcount++;
95
96
  }
96
97
  }
98
+ else if (enumtype & REFSTRC) {
99
+ if (o.enumref && o.enumref !== m.enumref) m.wcount++, m.enumref = o.enumref;
100
+ }
97
101
  if (o.called) m.ccount++;
98
102
  }
99
103
  return map;
@@ -220,6 +224,12 @@ function enumref(refitem, scoped) {
220
224
  }
221
225
  }
222
226
  }
227
+ else if (o.enumref) {
228
+ if (enumtype & REFSTRC) {
229
+ em = o.enumref;
230
+ continue;
231
+ }
232
+ }
223
233
  else {
224
234
  if (enumtype & REFTYPE) {
225
235
  if (tp) {
@@ -277,6 +277,11 @@ function snapSentenceHead(o) {
277
277
  }
278
278
  break;
279
279
  }
280
+ while (o) {
281
+ var p = o.prev;
282
+ if (!p || p.type !== LABEL) break;
283
+ o = p;
284
+ }
280
285
  return o;
281
286
  }
282
287
  var getStrapHead = function (o) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.1.6",
3
+ "version": "4.1.8",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {