@abaplint/runtime 1.7.8 → 1.7.9

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.
@@ -50,6 +50,9 @@ class OffsetLength {
50
50
  val = value.get() + "";
51
51
  }
52
52
  let old = this.obj.get();
53
+ if (this.obj instanceof types_1.Character) {
54
+ old = old.padEnd(this.obj.getLength(), " ");
55
+ }
53
56
  if (this.length) {
54
57
  val = val.substr(0, this.length);
55
58
  if (this.isHex) {
@@ -65,6 +68,7 @@ class OffsetLength {
65
68
  else if (this.offset) {
66
69
  old = old.substr(0, this.offset) + val;
67
70
  }
71
+ old = old.trimEnd();
68
72
  this.obj.set(old);
69
73
  }
70
74
  }
@@ -17,6 +17,7 @@ function replace(input, all, s, r) {
17
17
  else {
18
18
  replace = r.get();
19
19
  }
20
+ const found = temp.indexOf(search) >= 0;
20
21
  if (all === true) {
21
22
  if (search.length === 0) {
22
23
  throw "REPLACE, zero length input";
@@ -28,6 +29,9 @@ function replace(input, all, s, r) {
28
29
  else {
29
30
  temp = temp.replace(search, replace);
30
31
  }
32
+ const subrc = found ? 0 : 4;
33
+ // @ts-ignore
34
+ abap.builtin.sy.get().subrc.set(subrc);
31
35
  input.set(temp);
32
36
  }
33
37
  exports.replace = replace;
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "@abaplint/runtime",
3
- "version": "1.7.8",
4
- "description": "Transpiler - Runtime",
5
- "main": "build/src/index.js",
6
- "typings": "build/src/index.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/abaplint/transpiler.git"
10
- },
11
- "scripts": {
12
- "compile": "tsc",
13
- "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
14
- "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
15
- "test": "npm run compile && mocha"
16
- },
17
- "mocha": {
18
- "recursive": true,
19
- "reporter": "progress",
20
- "spec": "build/test/**/*.js",
21
- "require": "source-map-support/register"
22
- },
23
- "keywords": [
24
- "ABAP",
25
- "abaplint"
26
- ],
27
- "author": "abaplint",
28
- "license": "MIT",
29
- "dependencies": {
30
- "hdb": "^0.19.1",
31
- "sql.js": "^1.6.2"
32
- },
33
- "devDependencies": {
34
- "@types/chai": "^4.3.0",
35
- "@types/mocha": "^9.0.0",
36
- "@types/sql.js": "^1.4.3",
37
- "chai": "^4.3.4",
38
- "mocha": "^9.1.3",
39
- "source-map-support": "^0.5.21",
40
- "typescript": "^4.5.4"
41
- }
42
- }
1
+ {
2
+ "name": "@abaplint/runtime",
3
+ "version": "1.7.9",
4
+ "description": "Transpiler - Runtime",
5
+ "main": "build/src/index.js",
6
+ "typings": "build/src/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/abaplint/transpiler.git"
10
+ },
11
+ "scripts": {
12
+ "compile": "tsc",
13
+ "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
14
+ "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
15
+ "test": "npm run compile && mocha"
16
+ },
17
+ "mocha": {
18
+ "recursive": true,
19
+ "reporter": "progress",
20
+ "spec": "build/test/**/*.js",
21
+ "require": "source-map-support/register"
22
+ },
23
+ "keywords": [
24
+ "ABAP",
25
+ "abaplint"
26
+ ],
27
+ "author": "abaplint",
28
+ "license": "MIT",
29
+ "dependencies": {
30
+ "hdb": "^0.19.1",
31
+ "sql.js": "^1.6.2"
32
+ },
33
+ "devDependencies": {
34
+ "@types/chai": "^4.3.0",
35
+ "@types/mocha": "^9.0.0",
36
+ "@types/sql.js": "^1.4.3",
37
+ "chai": "^4.3.4",
38
+ "mocha": "^9.1.3",
39
+ "source-map-support": "^0.5.21",
40
+ "typescript": "^4.5.4"
41
+ }
42
+ }