@agoric/evaluate
Advanced tools
Comparing version 1.3.0 to 1.3.1
{ | ||
"name": "@agoric/evaluate", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "(unsafe) three-argument evaluator function", | ||
@@ -29,3 +29,3 @@ "main": "src/main.js", | ||
"dependencies": { | ||
"@agoric/default-evaluate-options": "0.0.2", | ||
"@agoric/default-evaluate-options": "^0.1.1", | ||
"esm": "^3.2.5" | ||
@@ -32,0 +32,0 @@ }, |
@@ -44,7 +44,16 @@ import makeDefaultEvaluateOptions from '@agoric/default-evaluate-options'; | ||
const moduleOptions = | ||
sourceType === 'module' ? { moduleRewritten: false } : {}; | ||
const sourceState = fullTransforms.reduce( | ||
(ss, transform) => (transform.rewrite ? transform.rewrite(ss) : ss), | ||
{ ...staticOptions, src: source }, | ||
{ ...staticOptions, ...moduleOptions, src: source }, | ||
); | ||
if (sourceType === 'module' && !sourceState.moduleRewritten) { | ||
throw SyntaxError(`Module source was not explicitly rewritten`); | ||
} | ||
if (sourceType !== 'module' && sourceState.moduleRewritten) { | ||
throw SyntaxError(`Non-module source was explicitly rewritten as module`); | ||
} | ||
// Work around Babel appending semicolons. | ||
@@ -51,0 +60,0 @@ // TODO: This belongs only in the individual transforms. |
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
20599
121
+ Added@agoric/default-evaluate-options@0.1.3(transitive)
+ Added@agoric/eventual-send@0.2.5(transitive)
- Removed@agoric/default-evaluate-options@0.0.2(transitive)
- Removed@agoric/eventual-send@0.1.11(transitive)