@next-core/cook 2.4.4 → 2.4.5

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.
package/dist/cjs/cook.js CHANGED
@@ -28,7 +28,7 @@ function cook(rootAst, codeSource, {
28
28
  ArrayConstructor = Array,
29
29
  hooks = {}
30
30
  } = {}) {
31
- var _hooks$beforeEvaluate3;
31
+ var _hooks$beforeEvaluate4;
32
32
  const expressionOnly = rootAst.type !== "FunctionDeclaration";
33
33
  function doSanitize(cooked) {
34
34
  if (!externalSourceForDebug) {
@@ -1144,6 +1144,8 @@ function cook(rootAst, codeSource, {
1144
1144
 
1145
1145
  // https://tc39.es/ecma262/#sec-runtime-semantics-namedevaluation
1146
1146
  function NamedEvaluation(node, name) {
1147
+ var _hooks$beforeEvaluate3;
1148
+ (_hooks$beforeEvaluate3 = hooks.beforeEvaluate) === null || _hooks$beforeEvaluate3 === void 0 || _hooks$beforeEvaluate3.call(hooks, node);
1147
1149
  // No ParenthesizedExpression in ESTree.
1148
1150
  switch (node.type) {
1149
1151
  case "FunctionExpression":
@@ -1572,7 +1574,7 @@ function cook(rootAst, codeSource, {
1572
1574
  if (expressionOnly) {
1573
1575
  return (0, _contextFree.GetValue)(unwind(Evaluate(rootAst)));
1574
1576
  }
1575
- (_hooks$beforeEvaluate3 = hooks.beforeEvaluate) === null || _hooks$beforeEvaluate3 === void 0 || _hooks$beforeEvaluate3.call(hooks, rootAst);
1577
+ (_hooks$beforeEvaluate4 = hooks.beforeEvaluate) === null || _hooks$beforeEvaluate4 === void 0 || _hooks$beforeEvaluate4.call(hooks, rootAst);
1576
1578
  ThrowIfFunctionIsInvalid(rootAst);
1577
1579
  const [fn] = (0, _traverse.collectBoundNames)(rootAst);
1578
1580
  // Create an immutable binding for the root function.