@abaplint/runtime 2.0.24 → 2.0.27

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 CHANGED
@@ -1,3 +1,3 @@
1
- # @abaplint/runtime
2
-
1
+ # @abaplint/runtime
2
+
3
3
  Runtime
@@ -5,7 +5,7 @@ class ABAPRegExp {
5
5
  // converts from ABAP specific regex to javascript regex
6
6
  static convert(input) {
7
7
  let ret = input;
8
- ret = input.replace(/\[\[:punct:\]\]/g, "[\\.\\,]");
8
+ ret = input.replace(/\[\[:punct:\]\]/g, "[\\.\\,\\-\\{\\}\\[\\]\\:\\!\\?\\(\\)\\;\\']");
9
9
  return ret;
10
10
  }
11
11
  }
@@ -30,6 +30,9 @@ function templateFormatting(source, options) {
30
30
  else if (options.decimals && source instanceof types_1.Integer) {
31
31
  text = source.get() + "." + "".padEnd(options.decimals, "0");
32
32
  }
33
+ else if (options.decimals && source instanceof types_1.Packed) {
34
+ text = source.get().toFixed(options.decimals);
35
+ }
33
36
  return text;
34
37
  }
35
38
  exports.templateFormatting = templateFormatting;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Packed = void 0;
4
+ const float_1 = require("./float");
4
5
  class Packed {
5
6
  constructor(input) {
6
7
  this.value = 0;
@@ -20,6 +21,9 @@ class Packed {
20
21
  else if (typeof value === "string") {
21
22
  this.value = parseFloat(value);
22
23
  }
24
+ else if (value instanceof float_1.Float) {
25
+ this.value = value.getRaw();
26
+ }
23
27
  else {
24
28
  this.value = value.get();
25
29
  }
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
- {
2
- "name": "@abaplint/runtime",
3
- "version": "2.0.24",
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:major": "npm --no-git-tag-version version major && rm -rf build && npm install && npm run test && npm publish --access public",
14
- "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
15
- "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
16
- "test": "npm run compile && mocha"
17
- },
18
- "mocha": {
19
- "recursive": true,
20
- "reporter": "progress",
21
- "spec": "build/test/**/*.js",
22
- "require": "source-map-support/register"
23
- },
24
- "keywords": [
25
- "ABAP",
26
- "abaplint"
27
- ],
28
- "author": "abaplint",
29
- "license": "MIT",
30
- "devDependencies": {
31
- "@types/chai": "^4.3.1",
32
- "@types/mocha": "^9.1.1",
33
- "@types/sql.js": "^1.4.3",
34
- "chai": "^4.3.6",
35
- "mocha": "^10.0.0",
36
- "source-map-support": "^0.5.21",
37
- "typescript": "^4.6.4"
38
- }
39
- }
1
+ {
2
+ "name": "@abaplint/runtime",
3
+ "version": "2.0.27",
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:major": "npm --no-git-tag-version version major && rm -rf build && npm install && npm run test && npm publish --access public",
14
+ "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
15
+ "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
16
+ "test": "npm run compile && mocha"
17
+ },
18
+ "mocha": {
19
+ "recursive": true,
20
+ "reporter": "progress",
21
+ "spec": "build/test/**/*.js",
22
+ "require": "source-map-support/register"
23
+ },
24
+ "keywords": [
25
+ "ABAP",
26
+ "abaplint"
27
+ ],
28
+ "author": "abaplint",
29
+ "license": "MIT",
30
+ "devDependencies": {
31
+ "@types/chai": "^4.3.1",
32
+ "@types/mocha": "^9.1.1",
33
+ "@types/sql.js": "^1.4.3",
34
+ "chai": "^4.3.6",
35
+ "mocha": "^10.0.0",
36
+ "source-map-support": "^0.5.21",
37
+ "typescript": "^4.7.2"
38
+ }
39
+ }