@mark1russell7/vex 0.18.0 → 0.19.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@mark1russell7/vex",
4
- "version": "0.18.0",
4
+ "version": "0.19.0",
5
5
  "description": "Vex: typed spreadsheet formulas over domain objects. The kernel and the typed builder.",
6
6
  "keywords": [
7
7
  "typescript",
@@ -49,7 +49,7 @@
49
49
  "access": "public"
50
50
  },
51
51
  "dependencies": {
52
- "@mark1russell7/coeval": "^0.21.0"
52
+ "@mark1russell7/coeval": "^0.34.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@mark1russell7/cue": "github:mark1russell7/cue#9c99ad65d51cefcba5a8b6dc89358d7a94758ca7",
package/src/plan.ts CHANGED
@@ -59,8 +59,9 @@ export function kernelPlan(source: Expr | Envelope, opts: CompileOptions = {}):
59
59
  let bad: VexError | undefined;
60
60
  if (isDocument(source)) {
61
61
  const read = fromDocument(source, domains);
62
- // LOOP.SIZE, STEP.MAX: the plan refuses the same programs as `compile`.
63
- const size = read.ok ? (sizeError(read.value, opts) ?? stepError(read.value, opts) ?? monotoneError(read.value, opts)) : undefined;
62
+ // EVAL.NESTING, LOOP.SIZE, STEP.MAX: the plan refuses the same programs as `compile`. The nesting comes first, because the
63
+ // other checks recurse, and a document can be deeper than the limit of an expression.
64
+ const size = read.ok ? (nestingError(read.value) ?? sizeError(read.value, opts) ?? stepError(read.value, opts) ?? monotoneError(read.value, opts)) : undefined;
64
65
  if (read.ok && size === undefined) doc = source;
65
66
  else bad = read.ok ? vexError("bad-expression", size ?? "") : read.error;
66
67
  } else {