@abaplint/runtime 2.13.34 → 2.13.36

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.
@@ -9,6 +9,10 @@ function alphaOut(source) {
9
9
  }
10
10
  function alphaIn(source, context) {
11
11
  let txt = source.get() + "";
12
+ if (txt.trim() === "") {
13
+ // initial value stays initial
14
+ return "";
15
+ }
12
16
  if (txt.match(/^[0-9 ]+$/) === null) {
13
17
  // contains letters
14
18
  return txt;
@@ -21,7 +21,7 @@ async function unpack(source, target) {
21
21
  if (source instanceof types_1.Character && target instanceof types_1.Character) {
22
22
  const sourceValue = source.getTrimEnd().trimStart();
23
23
  if (sourceValue.length > 0 && /^\d+$/.test(sourceValue) === false) {
24
- (0, throw_error_1.throwError)("CX_SY_CONVERSION_NO_NUMBER");
24
+ await (0, throw_error_1.throwErrorWithParameters)("CX_SY_CONVERSION_NO_NUMBER", { value: new types_1.String().set(sourceValue) });
25
25
  }
26
26
  target.set(sourceValue.padStart(target.getLength(), "0"));
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.13.34",
3
+ "version": "2.13.36",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",