Comparing version 0.5.13 to 0.5.14
{ | ||
"name": "aether", | ||
"version": "0.5.13", | ||
"version": "0.5.14", | ||
"homepage": "https://github.com/codecombat/aether", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -129,3 +129,5 @@ (function() { | ||
strict: aether.language.id !== 'python', | ||
foreignObjectMode: 'smart' | ||
foreignObjectMode: aether.options.protectAPI ? 'smart' : 'link', | ||
extraErrorInfo: true, | ||
addExtraErrorInfoToStacks: true | ||
}); | ||
@@ -178,3 +180,3 @@ } | ||
return function(engine) { | ||
var currentMark, frame_stack, top; | ||
var currentMark, frame_stack, top, yieldValue; | ||
frame_stack = engine.evaluator.frames; | ||
@@ -208,2 +210,10 @@ top = frame_stack[0]; | ||
} | ||
if (aether._shouldYield) { | ||
yieldValue = aether._shouldYield; | ||
aether._shouldYield = false; | ||
if (frame_stack[1].type === 'loop') { | ||
frame_stack[1].didYield = true; | ||
} | ||
return true; | ||
} | ||
return false; | ||
@@ -214,9 +224,5 @@ }; | ||
module.exports.createThread = function(aether, fx) { | ||
var Evaluator, engine, internalFx; | ||
var engine, internalFx; | ||
internalFx = esper.Value.getBookmark(fx); | ||
engine = new esper.Engine(aether.esperEngine.options); | ||
engine.realm = aether.esperEngine.realm; | ||
Evaluator = aether.esperEngine.evaluator.constructor; | ||
engine.evaluator = new Evaluator(aether.esperEngine.realm, aether.esperEngine.evaluator.ast, aether.esperEngine.evaluator.frames[0].scope); | ||
engine.evaluator.frames = []; | ||
engine = aether.esperEngine.fork(); | ||
upgradeEvaluator(aether, engine.evaluator); | ||
@@ -223,0 +229,0 @@ return engine.makeFunctionFromClosure(internalFx, function() { |
(function() { | ||
var addGlobal, addedGlobals, builtinClones, builtinNames, builtinObjectNames, builtinReal, cloneBuiltin, copy, copyBuiltin, defineProperty, getOwnPropertyDescriptor, getOwnPropertyNames, globalScope, name, problems, replaceBuiltin, _, _i, _len, _ref, _ref1, _ref2; | ||
var addGlobal, addedGlobals, builtinClones, builtinNames, builtinObjectNames, builtinReal, defineProperty, getOwnPropertyDescriptor, getOwnPropertyNames, globalScope, name, problems, replaceBuiltin, _, _i, _len, _ref, _ref1, _ref2; | ||
@@ -12,4 +12,2 @@ _ = (_ref = (_ref1 = (_ref2 = typeof window !== "undefined" && window !== null ? window._ : void 0) != null ? _ref2 : typeof self !== "undefined" && self !== null ? self._ : void 0) != null ? _ref1 : typeof global !== "undefined" && global !== null ? global._ : void 0) != null ? _ref : require('lodash'); | ||
Object.freeze(Error); | ||
getOwnPropertyNames = Object.getOwnPropertyNames; | ||
@@ -21,54 +19,2 @@ | ||
copy = function(source, target) { | ||
var desc, name, _i, _len, _ref3; | ||
if (target == null) { | ||
return target; | ||
} | ||
_ref3 = getOwnPropertyNames(source); | ||
for (_i = 0, _len = _ref3.length; _i < _len; _i++) { | ||
name = _ref3[_i]; | ||
if (name !== 'caller' && name !== 'arguments') { | ||
if (getOwnPropertyDescriptor) { | ||
desc = getOwnPropertyDescriptor(source, name); | ||
if (!desc.get) { | ||
target[name] = desc.value; | ||
} | ||
} else { | ||
target[name] = source[name]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
cloneBuiltin = function(obj) { | ||
var masked; | ||
masked = {}; | ||
copy(obj, masked); | ||
if (obj.prototype) { | ||
masked.prototype = {}; | ||
copy(obj.prototype, masked.prototype); | ||
} | ||
return masked; | ||
}; | ||
copyBuiltin = function(source, target, resetPrototype) { | ||
var name, _i, _len, _ref3, _results; | ||
copy(source, target); | ||
if (source.prototype) { | ||
copy(source.prototype, target.prototype); | ||
if (resetPrototype) { | ||
_ref3 = getOwnPropertyNames(target.prototype); | ||
_results = []; | ||
for (_i = 0, _len = _ref3.length; _i < _len; _i++) { | ||
name = _ref3[_i]; | ||
if (source.prototype[name] == null) { | ||
_results.push(delete target.prototype[name]); | ||
} | ||
} | ||
return _results; | ||
} | ||
} | ||
}; | ||
globalScope = (function() { | ||
@@ -91,4 +37,2 @@ return this; | ||
} | ||
builtinClones.push(cloneBuiltin(value)); | ||
builtinReal.push(value); | ||
return addedGlobals[name] = value; | ||
@@ -102,11 +46,4 @@ }; | ||
module.exports.replaceBuiltin = replaceBuiltin = function(name, value) { | ||
var builtinIndex; | ||
builtinIndex = _.indexOf(builtinReal, value); | ||
if (builtinIndex === -1) { | ||
return console.error("We can't replace builtin " + name + ", because we never added it:", value); | ||
} | ||
return builtinClones[builtinIndex] = cloneBuiltin(value); | ||
}; | ||
module.exports.replaceBuiltin = replaceBuiltin = function(name, value) {}; | ||
}).call(this); |
{ | ||
"name": "aether", | ||
"version": "0.5.13", | ||
"version": "0.5.14", | ||
"description": "Analyzes, instruments, and transpiles JS to help beginners.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5562674
84
41354
15
20