@naanlang/naan 1.2.0 → 1.2.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@naanlang/naan",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "author": "Richard C. Zulch",
5
5
  "description": "Naan™ software platform",
6
6
  "main": "./lib/core/naanlib.js",
@@ -513,7 +513,7 @@ closure dawsTable(database, path, tableOptions, local table) {
513
513
  resp._error = "JSON decoding failed"
514
514
  } }
515
515
  else if resp.contentType.startsWith("image/")
516
- { } // already "decoded", e.g. base64
516
+ resp.content = readableStreamToArrayBuffer(resp.content)
517
517
  else if jsTypedArray(resp.content)
518
518
  resp.content = xnew(TextDecoder, "utf-8").decode(resp.content)
519
519
  else if jsInstanceOf(resp.content, js.w.ReadableStream)
@@ -38,7 +38,7 @@ RegisterTestCategory("context", [
38
38
  [ "function setNS(ns) { ns=reverse(ns),sudo(nsactive(reverse(ns, defNS))) };", "setNS" ],
39
39
  [ "x;", "x" ],
40
40
  [ "y;", "y" ],
41
- [ "length(symlist(nsactive(true).0));", "172"],
41
+ [ "length(symlist(nsactive(true).0));", "171"],
42
42
  [ "testvar;", "testvar" ],
43
43
  [ "function setTestvar(v) { testvar=v };", "setTestvar" ],
44
44
  [ "naanvar;", "naanvar" ],
@@ -35,11 +35,11 @@ RegisterTestCategory("JSinterop", [
35
35
 
36
36
  [ "o(3);", {
37
37
  "dev": { errors: "xcall \"[object Object]\": TypeError: object.apply is not a function" }
38
- "prod": { errors: "xcall \"[object Object]\": TypeError: r[3].apply is not a function" }
38
+ "prod": { errors: "xcall \"[object Object]\": TypeError: e[3].apply is not a function" }
39
39
  }[ "prod"]],
40
40
  [ "o(Number);", {
41
41
  "dev": { errors: "xcall \"[object Object]\": TypeError: object.apply is not a function" }
42
- "prod": { errors: "xcall \"[object Object]\": TypeError: r[3].apply is not a function" }
42
+ "prod": { errors: "xcall \"[object Object]\": TypeError: e[3].apply is not a function" }
43
43
  }[ "prod"]],
44
44
  [ "Number(3);", "[Number 3]" ],
45
45
  [ "Number(3).toString();", "\"3\"" ],
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * column positioning: // // !
8
8
  *
9
- * Copyright (c) 2017-2023 by Richard C. Zulch
9
+ * Copyright (c) 2017-2024 by Richard C. Zulch
10
10
  *
11
11
  */
12
12
 
@@ -52,11 +52,14 @@ RegisterTestCategory("strings", [
52
52
  // template strings
53
53
  //
54
54
 
55
- [ "'$${4+3}';", '"7"' ], // these have an extra $escape
55
+ [ "'$${4+3}';", '"7"' ], // needs extra $escape to be source
56
56
  [ "'$$${4+3}';", '"$${4+3}"' ],
57
57
  [ "'a$${4+3}b';", '"a7b"' ],
58
- [ "'$${}';", '' ],
59
- [ "'$${';", '' ], // ### should be "${"
58
+ [ "'$${}';", { errors: "incomplete expression at (1, 3) found ;" } ],
59
+ [ "'$${';", '"${"' ],
60
+ [ "'$$${';", '"$${"' ],
61
+ [ "'a$${\"\"}z';", '"az"'],
62
+ [ "'a$$${}z';", '"a$${}z"'],
60
63
  [ "quote('a$${4*5}b');>", '(strcat "a" (* 4 5) "b")' ],
61
64
 
62
65