Comparing version 7.0.0 to 7.1.0
{ | ||
"name": "eshost", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"description": "Invoke ECMAScript scripts in any command line JS engine.", | ||
@@ -5,0 +5,0 @@ "main": "lib/eshost.js", |
var $262 = { | ||
global: Function('return this')(), | ||
global: typeof globalThis !== 'undefined' ? globalThis : Function('return this')(), | ||
gc() { | ||
@@ -7,3 +7,3 @@ if (typeof CollectGarbage === 'function') { | ||
} else { | ||
throw new Test262Error('GC not yet supported.'); | ||
throw new Test262Error('gc() not yet supported.'); | ||
} | ||
@@ -52,3 +52,3 @@ }, | ||
function thrower() { | ||
throw new Test262Error('Agent not yet supported.'); | ||
throw new Test262Error('agent.* not yet supported.'); | ||
} | ||
@@ -55,0 +55,0 @@ |
var $262 = { | ||
global: Function('return this')(), | ||
global: globalThis, | ||
gc() { | ||
@@ -137,3 +137,3 @@ return gc(); | ||
for (var w of workers) { | ||
w.postMessage({kind: 'broadcast', sab: sab, id: id|0}); | ||
w.postMessage({kind: 'broadcast', sab, id: id|0}); | ||
} | ||
@@ -140,0 +140,0 @@ |
@@ -8,3 +8,3 @@ /* Engine262 exposes a "$" object to its runtime */ | ||
gc() { | ||
throw new Test262Error('GC not yet supported.'); | ||
throw new Test262Error('gc() not yet supported.'); | ||
}, | ||
@@ -11,0 +11,0 @@ createRealm(options) { |
@@ -1,2 +0,3 @@ | ||
// No need to create $262 object as it is provided behind --experimental-options --js.test262-mode=true flags | ||
// No need to create $262 object as it is provided | ||
// behind --experimental-options --js.test262-mode=true flags | ||
$262.createRealm = function(options) { | ||
@@ -19,3 +20,3 @@ options = options || {}; | ||
$262.gc = function() { | ||
throw new Test262Error('GC not yet supported.'); | ||
throw new Test262Error('gc() not yet supported.'); | ||
}; | ||
@@ -22,0 +23,0 @@ $262.getGlobal = function(name) { |
@@ -7,6 +7,6 @@ var $262 = { | ||
createRealm(options) { | ||
throw new Test262Error('$262.createRealm not yet supported.'); | ||
throw new Test262Error('createRealm() not yet supported.'); | ||
}, | ||
evalScript(code) { | ||
throw new Test262Error('$262.evalScript not yet supported.'); | ||
throw new Test262Error('evalScript() not yet supported.'); | ||
}, | ||
@@ -23,5 +23,5 @@ getGlobal(name) { | ||
get agent() { | ||
throw new Test262Error('Agent not yet supported.'); | ||
throw new Test262Error('agent.* not yet supported.'); | ||
} | ||
}; | ||
@@ -86,3 +86,3 @@ var $262 = { | ||
function thrower() { | ||
throw new Test262Error('Agent not yet supported.'); | ||
throw new Test262Error('agent.* not yet supported.'); | ||
} | ||
@@ -89,0 +89,0 @@ |
var $262 = { | ||
global: Function('return this')(), | ||
gc() { | ||
throw new Test262Error('GC not yet supported.'); | ||
throw new Test262Error('gc() not yet supported.'); | ||
}, | ||
@@ -44,3 +44,3 @@ createRealm: function(options) { | ||
function thrower() { | ||
throw new Test262Error('Agent not yet supported.'); | ||
throw new Test262Error('agent.* not yet supported.'); | ||
}; | ||
@@ -47,0 +47,0 @@ return { |
@@ -6,6 +6,6 @@ /* run-test262 exposes a $262 object, so no need to define it */ | ||
$262.gc = function() { | ||
throw new Test262Error('gc not yet supported.'); | ||
throw new Test262Error('gc() not yet supported.'); | ||
}; | ||
$262.createRealm = function() { | ||
throw new Test262Error('createRealm not yet supported.'); | ||
throw new Test262Error('createRealm() not yet supported.'); | ||
}; | ||
@@ -12,0 +12,0 @@ $262.getGlobal = function(name) { |
if (!globalThis.$262) { | ||
globalThis.$262 = { | ||
global: globalThis, | ||
createRealm(options) { | ||
throw new Test262Error('createRealm not yet supported.'); | ||
throw new Test262Error('createRealm() not yet supported.'); | ||
}, | ||
@@ -15,3 +16,3 @@ evalScript(code) { | ||
gc() { | ||
throw new Test262Error('GC not yet supported.'); | ||
throw new Test262Error('gc() not yet supported.'); | ||
}, | ||
@@ -21,3 +22,2 @@ getGlobal(name) { | ||
}, | ||
global: globalThis, | ||
setGlobal(name, value) { | ||
@@ -28,3 +28,3 @@ global[name] = value; | ||
function thrower() { | ||
throw new Test262Error('Agent not yet supported.'); | ||
throw new Test262Error('agent.* not yet supported.'); | ||
}; | ||
@@ -31,0 +31,0 @@ return { |
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
109067
2252