Comparing version 0.20.0 to 0.21.0
@@ -0,1 +1,15 @@ | ||
0.21.0: | ||
* Deprecate SmalltalkImage >> existsJsGlobal: | ||
+ Number >> | ||
+ bitAnd: | ||
+ bitNot | ||
+ bitOr: | ||
+ bitXor: | ||
+ printStringBase: | ||
+ Platform class >> | ||
+ includesGlobal: | ||
0.20.0: | ||
@@ -16,2 +30,3 @@ | ||
0.19.1: | ||
@@ -18,0 +33,0 @@ |
{ | ||
"name": "amber", | ||
"version": "0.20.0", | ||
"version": "0.21.0", | ||
"description": "An implementation of the Smalltalk language that runs on top of the JS runtime.", | ||
@@ -21,3 +21,3 @@ "homepage": "http://amber-lang.net", | ||
"type": "git", | ||
"url": "https://lolg.it/amber/amber.git#0.20.0" | ||
"url": "https://lolg.it/amber/amber.git#0.21.0" | ||
}, | ||
@@ -24,0 +24,0 @@ "engines": { |
@@ -38,4 +38,3 @@ define(["amber/boot", "require"], function (boot, require) { | ||
//jshint evil:true | ||
var global = new Function('return this')(), | ||
storage = 'localStorage' in global && global.localStorage; | ||
var storage = 'localStorage' in global && global.localStorage; | ||
@@ -50,2 +49,3 @@ if (storage) { | ||
mixinToSettings(fromStorage || {}); | ||
// TODO find less hackish way to store settings back to storage. | ||
if (typeof window !== "undefined") { | ||
@@ -52,0 +52,0 @@ requirejs(['jquery'], function ($) { |
@@ -19,8 +19,24 @@ //jshint eqnull:true | ||
assert(function () { | ||
return new Function("return this")().Object === Object; | ||
return Object.getPrototypeOf(Object.create(null)) === null; | ||
}); | ||
assert(function () { | ||
return Object.create(new Function("return this")()).Object === Object; | ||
var p = {}; | ||
return Object.getPrototypeOf(Object.create(p)) === p; | ||
}); | ||
// assert(function () { | ||
// return new Function("return this")().Object === Object; | ||
// }); | ||
// assert(function () { | ||
// return Object.create(new Function("return this")()).Object === Object; | ||
// }); | ||
assert(function () { | ||
return typeof global !== "undefined"; | ||
}); | ||
assert(function () { | ||
return global.Object === Object; | ||
}); | ||
assert(function () { | ||
return Object.create(global).Object === Object; | ||
}); | ||
assert(function () { | ||
return (function () { | ||
@@ -27,0 +43,0 @@ return this; |
@@ -56,5 +56,3 @@ /* ==================================================================== | ||
function SmalltalkGlobalsBrik (brikz, st) { | ||
// jshint evil:true | ||
var jsGlobals = new Function("return this")(); | ||
var globals = Object.create(jsGlobals); | ||
var globals = Object.create(global); | ||
globals.SmalltalkSettings = {}; | ||
@@ -61,0 +59,0 @@ |
@@ -13,7 +13,17 @@ //jshint eqnull:true | ||
DNUBrik.deps = ["selectors", "smalltalkGlobals", "manipulation", "classes"]; | ||
function installJSMethod (obj, jsSelector, fn) { | ||
Object.defineProperty(obj, jsSelector, { | ||
value: fn, | ||
enumerable: false, configurable: true, writable: true | ||
}); | ||
} | ||
function installMethod (method, klass) { | ||
installJSMethod(klass.fn.prototype, method.jsSelector, method.fn); | ||
} | ||
DNUBrik.deps = ["selectors", "smalltalkGlobals", "classes"]; | ||
function DNUBrik (brikz, st) { | ||
var selectorPairs = brikz.selectors.selectorPairs; | ||
var globals = brikz.smalltalkGlobals.globals; | ||
var installJSMethod = brikz.manipulation.installJSMethod; | ||
var nilAsClass = brikz.classes.nilAsClass; | ||
@@ -49,19 +59,3 @@ | ||
function ManipulationBrik (brikz, st) { | ||
function installJSMethod (obj, jsSelector, fn) { | ||
Object.defineProperty(obj, jsSelector, { | ||
value: fn, | ||
enumerable: false, configurable: true, writable: true | ||
}); | ||
} | ||
function installMethod (method, klass) { | ||
installJSMethod(klass.fn.prototype, method.jsSelector, method.fn); | ||
} | ||
this.installMethod = installMethod; | ||
this.installJSMethod = installJSMethod; | ||
} | ||
RuntimeClassesBrik.deps = ["event", "selectors", "dnu", "behaviors", "classes", "manipulation"]; | ||
RuntimeClassesBrik.deps = ["event", "selectors", "dnu", "behaviors", "classes"]; | ||
function RuntimeClassesBrik (brikz, st) { | ||
@@ -71,4 +65,2 @@ var selectors = brikz.selectors; | ||
var wireKlass = brikz.classes.wireKlass; | ||
var installMethod = brikz.manipulation.installMethod; | ||
var installJSMethod = brikz.manipulation.installJSMethod; | ||
var emit = brikz.event.emit; | ||
@@ -174,6 +166,4 @@ | ||
RuntimeMethodsBrik.deps = ["event", "manipulation", "dnu", "runtimeClasses"]; | ||
RuntimeMethodsBrik.deps = ["event", "dnu", "runtimeClasses"]; | ||
function RuntimeMethodsBrik (brikz, st) { | ||
var installMethod = brikz.manipulation.installMethod; | ||
var installJSMethod = brikz.manipulation.installJSMethod; | ||
var makeDnuHandler = brikz.dnu.makeDnuHandler; | ||
@@ -389,3 +379,3 @@ var detachedRootClasses = brikz.runtimeClasses.detachedRootClasses; | ||
*/ | ||
st.accessJavaScript = function accessJavaScript (self, propertyName, args) { | ||
st.accessJavaScript = function (self, propertyName, args) { | ||
var propertyValue = self[propertyName]; | ||
@@ -416,3 +406,2 @@ if (typeof propertyValue === "function" && !/^[A-Z]/.test(propertyName)) { | ||
brikz.dnu = DNUBrik; | ||
brikz.manipulation = ManipulationBrik; | ||
brikz.runtimeClasses = RuntimeClassesBrik; | ||
@@ -419,0 +408,0 @@ brikz.frameBinding = FrameBindingBrik; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
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
3482535
83536
1
98