@calcit/procs 0.29.0-alpha.1 → 0.29.0-alpha.3

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.
@@ -224,7 +224,7 @@ export let _$n_trait_$o__$o_new = function (name, methods, parents) {
224
224
  const requires = parents == null ? [] : list_items(parents);
225
225
  for (const parent of requires) {
226
226
  if (!(parent instanceof CalcitTrait)) {
227
- throw new Error(`trait ${toString(name, false)} 'requires expects a trait, but received: ${toString(parent, true)}`);
227
+ throw new Error(`trait ${toString(name, false)}: each requires entry must be a trait, but received: ${toString(parent, true)}`);
228
228
  }
229
229
  }
230
230
  const traitDef = new CalcitTrait(name, methodNames, methodTypes, requires);
package/lib/js-cirru.mjs CHANGED
@@ -555,7 +555,6 @@ const extract_cirru_edn_inner = (x, options, preserveSourceEntries) => {
555
555
  return atom(extract_cirru_edn_inner(x[1], options, preserveSourceEntries));
556
556
  }
557
557
  }
558
- console.error(x);
559
558
  throw new Error(`Unexpected data from EDN: ${x}`);
560
559
  };
561
560
  export let extract_cirru_edn = (x, options) => {
@@ -565,6 +564,9 @@ export let extract_cirru_edn_for_typed = (x, options) => {
565
564
  return extract_cirru_edn_inner(x, options, true);
566
565
  };
567
566
  export let format_cirru_edn = (data, useInline = true) => {
567
+ if (typeof useInline !== "boolean") {
568
+ throw new Error("format-cirru-edn requires a boolean inline option");
569
+ }
568
570
  if (data == null) {
569
571
  return "\ndo nil" + "\n";
570
572
  }
@@ -572,7 +574,7 @@ export let format_cirru_edn = (data, useInline = true) => {
572
574
  let quoted = writeCirruCode([[to_cirru_edn(data)]], { useInline: useInline }).trim();
573
575
  return "\ndo " + quoted + "\n";
574
576
  }
575
- if (typeof data === "boolean") {
577
+ if (typeof data === "boolean" || typeof data === "number") {
576
578
  return "\ndo " + to_cirru_edn(data) + "\n";
577
579
  }
578
580
  if (data instanceof CalcitSymbol) {
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.29.0-alpha.1",
3
+ "version": "0.29.0-alpha.3",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "files": [
6
6
  "lib/",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.29.0-alpha.1",
3
+ "version": "0.29.0-alpha.3",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "files": [
6
6
  "lib/",