@abaplint/runtime 2.1.45 → 2.1.48

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.
@@ -13,7 +13,7 @@ function expandIN(fieldName, table) {
13
13
  const values = [];
14
14
  for (const row of table.array()) {
15
15
  if (((_a = row.get().sign) === null || _a === void 0 ? void 0 : _a.get()) !== "I" || ((_b = row.get().option) === null || _b === void 0 ? void 0 : _b.get()) !== "EQ") {
16
- throw "IN, only I EQ supported for now";
16
+ throw "Error: IN, only I EQ supported for now";
17
17
  }
18
18
  values.push("'" + ((_c = row.get().low) === null || _c === void 0 ? void 0 : _c.get().replace(/'/g, "''")) + "'");
19
19
  }
@@ -4,6 +4,7 @@ exports.convert = void 0;
4
4
  const template_formatting_1 = require("../template_formatting");
5
5
  const types_1 = require("../types");
6
6
  function convert(source, target) {
7
+ var _a, _b, _c;
7
8
  let str = "";
8
9
  if (source.date) {
9
10
  if (typeof source.date === "string") {
@@ -31,6 +32,12 @@ function convert(source, target) {
31
32
  }
32
33
  str = (0, template_formatting_1.templateFormatting)(new types_1.Character({ length: 14 }).set(str), { timestamp: "iso" });
33
34
  str += "Z";
35
+ if (str === "0000-00-00T00:00:00Z") {
36
+ (_a = target.stamp) === null || _a === void 0 ? void 0 : _a.clear();
37
+ (_b = target.date) === null || _b === void 0 ? void 0 : _b.clear();
38
+ (_c = target.time) === null || _c === void 0 ? void 0 : _c.clear();
39
+ return;
40
+ }
34
41
  const t1 = new Date(Date.parse(str));
35
42
  const out = t1.toISOString().slice(0, 19).replace(/-/g, "").replace(/:/g, "").replace("T", "");
36
43
  if (target.stamp) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.1.45",
3
+ "version": "2.1.48",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",