@abaplint/runtime 1.8.37 → 1.8.40
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/README.md +2 -2
- package/build/src/builtin/replace.d.ts +2 -0
- package/build/src/builtin/replace.js +6 -1
- package/build/src/compare/cs.js +3 -1
- package/package.json +41 -41
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# @abaplint/runtime
|
|
2
|
-
|
|
1
|
+
# @abaplint/runtime
|
|
2
|
+
|
|
3
3
|
Runtime
|
|
@@ -34,7 +34,12 @@ function replace(input) {
|
|
|
34
34
|
else if (input.regex) {
|
|
35
35
|
sub = input.regex.get();
|
|
36
36
|
}
|
|
37
|
-
if (input.
|
|
37
|
+
if (input.off && input.len) {
|
|
38
|
+
const offset = input.off.get();
|
|
39
|
+
const length = input.len.get();
|
|
40
|
+
val = val.substring(0, offset) + wi + val.substring(offset + length);
|
|
41
|
+
}
|
|
42
|
+
else if (input.occ === undefined && sub && wi) {
|
|
38
43
|
val = val.replace(sub, wi);
|
|
39
44
|
}
|
|
40
45
|
else if (input.occ && input.occ.get() === 0 && sub && wi !== undefined) {
|
package/build/src/compare/cs.js
CHANGED
|
@@ -9,6 +9,7 @@ function cs(left, right) {
|
|
|
9
9
|
else {
|
|
10
10
|
l = left.get().toString();
|
|
11
11
|
}
|
|
12
|
+
l = l.toUpperCase();
|
|
12
13
|
let r = "";
|
|
13
14
|
if (typeof right === "string") {
|
|
14
15
|
r = right.toString();
|
|
@@ -16,7 +17,8 @@ function cs(left, right) {
|
|
|
16
17
|
else {
|
|
17
18
|
r = right.get().toString();
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
r = r.toUpperCase();
|
|
21
|
+
const index = l.indexOf(r);
|
|
20
22
|
if (index < 0) {
|
|
21
23
|
// @ts-ignore
|
|
22
24
|
abap.builtin.sy.get().fdpos.set(l.length);
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "1.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
|
-
"sql.js": "^1.6.2"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/chai": "^4.3.0",
|
|
34
|
-
"@types/mocha": "^9.1.0",
|
|
35
|
-
"@types/sql.js": "^1.4.3",
|
|
36
|
-
"chai": "^4.3.6",
|
|
37
|
-
"mocha": "^9.2.2",
|
|
38
|
-
"source-map-support": "^0.5.21",
|
|
39
|
-
"typescript": "^4.6.3"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@abaplint/runtime",
|
|
3
|
+
"version": "1.8.40",
|
|
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
|
+
"sql.js": "^1.6.2"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/chai": "^4.3.0",
|
|
34
|
+
"@types/mocha": "^9.1.0",
|
|
35
|
+
"@types/sql.js": "^1.4.3",
|
|
36
|
+
"chai": "^4.3.6",
|
|
37
|
+
"mocha": "^9.2.2",
|
|
38
|
+
"source-map-support": "^0.5.21",
|
|
39
|
+
"typescript": "^4.6.3"
|
|
40
|
+
}
|
|
41
|
+
}
|