@abaplint/runtime 2.5.77 → 2.5.79

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.
@@ -5,6 +5,7 @@ const _parse_1 = require("../operators/_parse");
5
5
  const throw_error_1 = require("../throw_error");
6
6
  const field_symbol_1 = require("./field_symbol");
7
7
  const structure_1 = require("./structure");
8
+ const TRIMREGEX = / *$/;
8
9
  class Character {
9
10
  constructor(length, extra) {
10
11
  this.constant = false;
@@ -73,7 +74,12 @@ class Character {
73
74
  return this.value;
74
75
  }
75
76
  getTrimEnd() {
76
- return this.value.replace(/ *$/, "");
77
+ if (this.value.endsWith(" ") === true) {
78
+ return this.value.replace(TRIMREGEX, "");
79
+ }
80
+ else {
81
+ return this.value;
82
+ }
77
83
  }
78
84
  getOffset(input) {
79
85
  let offset = input === null || input === void 0 ? void 0 : input.offset;
@@ -88,7 +88,8 @@ class HashedTable {
88
88
  if (secondary === undefined) {
89
89
  throw `Table, secondary key "${name}" not found`;
90
90
  }
91
- const copy = (0, clone_1.clone)([...this.array()]);
91
+ // note, array() already is a copy, so it acn be used,
92
+ const copy = this.array();
92
93
  (0, sort_1.sort)(copy, { by: secondary.keyFields.map(k => { return { component: k.toLowerCase() }; }) });
93
94
  this.secondaryIndexes[name.toUpperCase()] = copy;
94
95
  return copy;
@@ -266,7 +267,7 @@ class Table {
266
267
  if (secondary === undefined) {
267
268
  throw `Table, secondary key "${name}" not found`;
268
269
  }
269
- const copy = (0, clone_1.clone)(this.value);
270
+ const copy = [...this.value];
270
271
  (0, sort_1.sort)(copy, { by: secondary.keyFields.map(k => { return { component: k.toLowerCase() }; }) });
271
272
  this.secondaryIndexes[name.toUpperCase()] = copy;
272
273
  return copy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.5.77",
3
+ "version": "2.5.79",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "chai": "^4.3.7",
34
34
  "mocha": "^10.2.0",
35
35
  "source-map-support": "^0.5.21",
36
- "typescript": "^5.0.3"
36
+ "typescript": "^5.0.4"
37
37
  },
38
38
  "dependencies": {
39
39
  "temporal-polyfill": "^0.1.1"