@abaplint/transpiler 2.0.8 → 2.0.11

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/transpiler
2
-
1
+ # @abaplint/transpiler
2
+
3
3
  Transpiler
@@ -3,5 +3,7 @@ import { IExpressionTranspiler } from "./_expression_transpiler";
3
3
  import { Traversal } from "../traversal";
4
4
  import { Chunk } from "../chunk";
5
5
  export declare class SimpleSource3Transpiler implements IExpressionTranspiler {
6
+ private readonly addGet;
7
+ constructor(addGet?: boolean);
6
8
  transpile(node: Nodes.ExpressionNode, traversal: Traversal): Chunk;
7
9
  }
@@ -3,8 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SimpleSource3Transpiler = void 0;
4
4
  const source_1 = require("./source");
5
5
  class SimpleSource3Transpiler {
6
+ constructor(addGet = false) {
7
+ this.addGet = addGet;
8
+ }
6
9
  transpile(node, traversal) {
7
- return new source_1.SourceTranspiler().transpile(node, traversal);
10
+ return new source_1.SourceTranspiler(this.addGet).transpile(node, traversal);
8
11
  }
9
12
  }
10
13
  exports.SimpleSource3Transpiler = SimpleSource3Transpiler;
@@ -18,11 +18,11 @@ class HandleDataElement {
18
18
  fixedValues = doma.getFixedValues();
19
19
  }
20
20
  }
21
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
22
- "objectType": "DTEL",
23
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
24
- "domain": ${JSON.stringify(obj.getDomainName())},
25
- "fixedValues": ${JSON.stringify(fixedValues)},
21
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
22
+ "objectType": "DTEL",
23
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
24
+ "domain": ${JSON.stringify(obj.getDomainName())},
25
+ "fixedValues": ${JSON.stringify(fixedValues)},
26
26
  };`);
27
27
  const output = {
28
28
  object: {
@@ -12,10 +12,10 @@ class HandleTable {
12
12
  return [];
13
13
  }
14
14
  const type = obj.parseType(reg);
15
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
16
- "objectType": "TABL",
17
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
18
- "keyFields": ${JSON.stringify(obj.listKeys())},
15
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
16
+ "objectType": "TABL",
17
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
18
+ "keyFields": ${JSON.stringify(obj.listKeys())},
19
19
  };`);
20
20
  const output = {
21
21
  object: {
@@ -11,9 +11,9 @@ class HandleTableType {
11
11
  return [];
12
12
  }
13
13
  const type = obj.parseType(reg);
14
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
15
- "objectType": "TTYP",
16
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
14
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
15
+ "objectType": "TTYP",
16
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
17
17
  };`);
18
18
  const output = {
19
19
  object: {
@@ -12,14 +12,14 @@ class DoTranspiler {
12
12
  const source = new expressions_1.SourceTranspiler(true).transpile(found, traversal).getCode();
13
13
  const idSource = unique_identifier_1.UniqueIdentifier.get();
14
14
  const id = unique_identifier_1.UniqueIdentifier.get();
15
- return new chunk_1.Chunk(`const ${idSource} = ${source};
16
- for (let ${id} = 0; ${id} < ${idSource}; ${id}++) {
15
+ return new chunk_1.Chunk(`const ${idSource} = ${source};
16
+ for (let ${id} = 0; ${id} < ${idSource}; ${id}++) {
17
17
  abap.builtin.sy.get().index.set(${id} + 1);`);
18
18
  }
19
19
  else {
20
20
  const unique = unique_identifier_1.UniqueIdentifier.get();
21
- return new chunk_1.Chunk(`let ${unique} = 1;
22
- while (true) {
21
+ return new chunk_1.Chunk(`let ${unique} = 1;
22
+ while (true) {
23
23
  abap.builtin.sy.get().index.set(${unique}++);`);
24
24
  }
25
25
  }
@@ -5,13 +5,24 @@ const abaplint = require("@abaplint/core");
5
5
  const chunk_1 = require("../chunk");
6
6
  class MoveTranspiler {
7
7
  transpile(node, traversal) {
8
+ var _a;
8
9
  const source = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
9
10
  const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target));
10
- const ret = new chunk_1.Chunk()
11
- .appendChunk(target)
12
- .appendString(".set(")
13
- .appendChunk(source)
14
- .append(");", node.getLastToken(), traversal);
11
+ const ret = new chunk_1.Chunk();
12
+ const second = (_a = node.getChildren()[1]) === null || _a === void 0 ? void 0 : _a.concatTokens();
13
+ if (second === "?=") {
14
+ ret.appendString("await abap.statements.cast(")
15
+ .appendChunk(target)
16
+ .appendString(", ")
17
+ .appendChunk(source)
18
+ .append(");", node.getLastToken(), traversal);
19
+ }
20
+ else {
21
+ ret.appendChunk(target)
22
+ .appendString(".set(")
23
+ .appendChunk(source)
24
+ .append(");", node.getLastToken(), traversal);
25
+ }
15
26
  return ret;
16
27
  }
17
28
  }
@@ -4,4 +4,6 @@ import { Traversal } from "../traversal";
4
4
  import { Chunk } from "../chunk";
5
5
  export declare class SelectTranspiler implements IStatementTranspiler {
6
6
  transpile(node: abaplint.Nodes.StatementNode, traversal: Traversal): Chunk;
7
+ private findKeys;
8
+ private concatCond;
7
9
  }
@@ -13,7 +13,7 @@ class SelectTranspiler {
13
13
  select += ((_b = node.findFirstExpression(abaplint.Expressions.SQLFrom)) === null || _b === void 0 ? void 0 : _b.concatTokens()) + " ";
14
14
  const where = node.findFirstExpression(abaplint.Expressions.SQLCond);
15
15
  if (where) {
16
- select += "WHERE " + where.concatTokens() + " ";
16
+ select += "WHERE " + this.concatCond(where, traversal) + " ";
17
17
  }
18
18
  const orderBy = node.findFirstExpression(abaplint.Expressions.SQLOrderBy);
19
19
  if (orderBy) {
@@ -34,7 +34,40 @@ class SelectTranspiler {
34
34
  if (node.concatTokens().toUpperCase().startsWith("SELECT SINGLE ")) {
35
35
  select += "UP TO 1 ROWS";
36
36
  }
37
- return new chunk_1.Chunk().append(`await abap.statements.select(${target}, {select: "${select.trim()}"});`, node, traversal);
37
+ const keys = this.findKeys(node, traversal);
38
+ let primaryKey = "";
39
+ if (keys.length > 0) {
40
+ primaryKey = `, primaryKey: ${JSON.stringify(keys)}`;
41
+ }
42
+ return new chunk_1.Chunk().append(`await abap.statements.select(${target}, {select: "${select.trim()}"${primaryKey}});`, node, traversal);
43
+ }
44
+ findKeys(node, traversal) {
45
+ let keys = [];
46
+ const from = node.findAllExpressions(abaplint.Expressions.SQLFromSource).map(e => e.concatTokens());
47
+ if (from.length === 1) {
48
+ const tabl = traversal.findTable(from[0]);
49
+ if (tabl) {
50
+ keys = tabl.listKeys().map(k => k.toLowerCase());
51
+ }
52
+ }
53
+ return keys;
54
+ }
55
+ concatCond(cond, traversal) {
56
+ let ret = "";
57
+ for (const c of cond.getChildren()) {
58
+ if (c.get() instanceof abaplint.Expressions.SimpleSource3
59
+ && c instanceof abaplint.Nodes.ExpressionNode
60
+ && c.findDirectExpression(abaplint.Expressions.Constant) === undefined) {
61
+ ret += " '\" + " + new expressions_1.SimpleSource3Transpiler(true).transpile(c, traversal).getCode() + " + \"'";
62
+ }
63
+ else if (c instanceof abaplint.Nodes.ExpressionNode) {
64
+ ret += " " + this.concatCond(c, traversal);
65
+ }
66
+ else {
67
+ ret += " " + c.concatTokens();
68
+ }
69
+ }
70
+ return ret.trim();
38
71
  }
39
72
  }
40
73
  exports.SelectTranspiler = SelectTranspiler;
@@ -3,22 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WaitTranspiler = void 0;
4
4
  const abaplint = require("@abaplint/core");
5
5
  const chunk_1 = require("../chunk");
6
+ const expressions_1 = require("../expressions");
6
7
  class WaitTranspiler {
7
8
  transpile(node, traversal) {
9
+ const options = [];
10
+ const seconds = node.findExpressionAfterToken("TO");
11
+ if (seconds) {
12
+ options.push("seconds: " + traversal.traverse(seconds).getCode());
13
+ }
8
14
  const concat = node.concatTokens().toUpperCase();
9
- if (concat.includes(" FOR PUSH CHANNELS ") === false) {
10
- return new chunk_1.Chunk().appendString("WAIT_TODO");
15
+ if (concat.includes(" UNTIL ") === false && seconds) {
16
+ const sec = new expressions_1.SourceTranspiler(true).transpile(seconds, traversal).getCode();
17
+ return new chunk_1.Chunk().appendString(`await new Promise(r => setTimeout(r, ${sec} * 1000));`);
11
18
  }
12
19
  const lookup = traversal.lookupClassOrInterface("KERNEL_PUSH_CHANNELS", node.getFirstToken());
13
- const options = [];
14
20
  const cond = node.findFirstExpression(abaplint.Expressions.Cond);
15
21
  if (cond) {
16
22
  options.push("cond: " + traversal.traverse(cond).getCode());
17
23
  }
18
- const seconds = node.findExpressionAfterToken("TO");
19
- if (seconds) {
20
- options.push("seconds: " + traversal.traverse(seconds).getCode());
21
- }
22
24
  const call = `await ${lookup}.wait({${options.join(",")}});`;
23
25
  return new chunk_1.Chunk().append(`if (${lookup} === undefined) throw new Error("Wait, kernel class missing");\n${call}`, node, traversal);
24
26
  }
@@ -60,6 +60,9 @@ class InterfaceTranspiler {
60
60
  const a = val;
61
61
  for (const v of Object.keys(val)) {
62
62
  const s = a[v];
63
+ if (s === undefined) {
64
+ continue;
65
+ }
63
66
  ret += name + ".get()." + v + ".set(" + s + ");\n";
64
67
  }
65
68
  }
@@ -8,11 +8,15 @@ class TranspileTypes {
8
8
  return "let " + t.getName().toLowerCase() + " = " + this.toType(type) + ";";
9
9
  }
10
10
  toType(type) {
11
+ var _a;
11
12
  let resolved = "";
12
13
  let extra = "";
13
14
  if (type instanceof abaplint.BasicTypes.ObjectReferenceType
14
15
  || type instanceof abaplint.BasicTypes.GenericObjectReferenceType) {
15
16
  resolved = "ABAPObject";
17
+ if (type.getQualifiedName() !== undefined) {
18
+ extra = "{qualifiedName: \"" + ((_a = type.getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) + "\"}";
19
+ }
16
20
  }
17
21
  else if (type instanceof abaplint.BasicTypes.TableType) {
18
22
  resolved = "Table";
@@ -32,6 +32,7 @@ export declare class Traversal {
32
32
  private findReadOrWriteReference;
33
33
  buildConstructorContents(scope: abaplint.ISpaghettiScopeNode | undefined, def: abaplint.IClassDefinition, inputName: string): string;
34
34
  findInterfaceDefinition(name: string, scope: abaplint.ISpaghettiScopeNode | undefined): abaplint.IInterfaceDefinition | undefined;
35
+ findTable(name: string): abaplint.Objects.Table | undefined;
35
36
  findClassDefinition(name: string, scope: abaplint.ISpaghettiScopeNode | undefined): abaplint.IClassDefinition | undefined;
36
37
  private dataFromInterfaces;
37
38
  determineType(node: abaplint.Nodes.ExpressionNode | abaplint.Nodes.StatementNode, scope: abaplint.ISpaghettiScopeNode | undefined): abaplint.AbstractType | undefined;
@@ -289,6 +289,10 @@ class Traversal {
289
289
  }
290
290
  return intf;
291
291
  }
292
+ findTable(name) {
293
+ const tabl = this.reg.getObject("TABL", name);
294
+ return tabl;
295
+ }
292
296
  findClassDefinition(name, scope) {
293
297
  let clas = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);
294
298
  if (clas === undefined) {
@@ -6,11 +6,11 @@ const abaplint = require("@abaplint/core");
6
6
  class UnitTest {
7
7
  // todo, move this method somewhere else, its much more than just unit test relevant
8
8
  initializationScript(reg, dbSetup, extraSetup) {
9
- let ret = `/* eslint-disable import/newline-after-import */
10
- import runtime from "@abaplint/runtime";
11
- global.abap = new runtime.ABAP();
12
- ${this.buildImports(reg)}
13
-
9
+ let ret = `/* eslint-disable import/newline-after-import */
10
+ import runtime from "@abaplint/runtime";
11
+ global.abap = new runtime.ABAP();
12
+ ${this.buildImports(reg)}
13
+
14
14
  export async function initializeABAP() {\n`;
15
15
  ret += ` const sqlite = \`${dbSetup.schemas.sqlite}\`;\n`;
16
16
  ret += ` const hdb = \`${dbSetup.schemas.hdb}\`;\n`;
@@ -28,19 +28,19 @@ export async function initializeABAP() {\n`;
28
28
  return ret;
29
29
  }
30
30
  unitTestScriptOpen(reg, _skip, _only) {
31
- let ret = `/* eslint-disable curly */
32
- import fs from "fs";
33
- import path from "path";
34
- import {fileURLToPath} from "url";
35
- import {initializeABAP} from "./init.mjs";
36
-
37
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
38
-
39
- async function run() {
40
- await initializeABAP();
41
- let lt_input = new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character({length: 30}), testclass_name: new abap.types.Character({length: 30}), method_name: new abap.types.Character({length: 30})}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]});
42
- let ls_input = new abap.types.Structure({class_name: new abap.types.Character({length: 30}), testclass_name: new abap.types.Character({length: 30}), method_name: new abap.types.Character({length: 30})});
43
- let ls_result = new abap.types.Structure({list: new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character({length: 30}), testclass_name: new abap.types.Character({length: 30}), method_name: new abap.types.Character({length: 30}), expected: new abap.types.String(), actual: new abap.types.String(), status: new abap.types.String(), runtime: new abap.types.Integer(), message: new abap.types.String(), js_location: new abap.types.String()}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]}), json: new abap.types.String()});
31
+ let ret = `/* eslint-disable curly */
32
+ import fs from "fs";
33
+ import path from "path";
34
+ import {fileURLToPath} from "url";
35
+ import {initializeABAP} from "./init.mjs";
36
+
37
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
38
+
39
+ async function run() {
40
+ await initializeABAP();
41
+ let lt_input = new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character({length: 30}), testclass_name: new abap.types.Character({length: 30}), method_name: new abap.types.Character({length: 30})}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]});
42
+ let ls_input = new abap.types.Structure({class_name: new abap.types.Character({length: 30}), testclass_name: new abap.types.Character({length: 30}), method_name: new abap.types.Character({length: 30})});
43
+ let ls_result = new abap.types.Structure({list: new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character({length: 30}), testclass_name: new abap.types.Character({length: 30}), method_name: new abap.types.Character({length: 30}), expected: new abap.types.String(), actual: new abap.types.String(), status: new abap.types.String(), runtime: new abap.types.Integer(), message: new abap.types.String(), js_location: new abap.types.String()}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]}), json: new abap.types.String()});
44
44
  `;
45
45
  for (const obj of reg.getObjects()) {
46
46
  if (reg.isDependency(obj) || !(obj instanceof abaplint.Objects.Class)) {
@@ -60,44 +60,44 @@ async function run() {
60
60
  if (m.isForTesting === false) {
61
61
  continue;
62
62
  }
63
- ret += ` ls_input.get().class_name.set("${obj.getName()}");
64
- ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
65
- ls_input.get().method_name.set("${m.name.toUpperCase()}");
63
+ ret += ` ls_input.get().class_name.set("${obj.getName()}");
64
+ ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
65
+ ls_input.get().method_name.set("${m.name.toUpperCase()}");
66
66
  abap.statements.append({source: ls_input, target: lt_input});`;
67
67
  }
68
68
  }
69
69
  }
70
70
  }
71
- ret += `
72
-
73
- ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
74
- fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
75
- }
76
-
77
- run().then(() => {
78
- process.exit(0);
79
- }).catch((err) => {
80
- console.log(err);
81
- process.exit(1);
71
+ ret += `
72
+
73
+ ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
74
+ fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
75
+ }
76
+
77
+ run().then(() => {
78
+ process.exit(0);
79
+ }).catch((err) => {
80
+ console.log(err);
81
+ process.exit(1);
82
82
  });`;
83
83
  return ret;
84
84
  }
85
85
  unitTestScript(reg, skip, _only) {
86
- let ret = `/* eslint-disable curly */
87
- import fs from "fs";
88
- import path from "path";
89
- import {fileURLToPath} from "url";
90
- import {initializeABAP} from "./init.mjs";
91
- import runtime from "@abaplint/runtime";
92
-
93
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
94
-
95
- async function run() {
96
- await initializeABAP();
97
- const unit = new runtime.UnitTestResult();
98
- let clas;
99
- let locl;
100
- let meth;
86
+ let ret = `/* eslint-disable curly */
87
+ import fs from "fs";
88
+ import path from "path";
89
+ import {fileURLToPath} from "url";
90
+ import {initializeABAP} from "./init.mjs";
91
+ import runtime from "@abaplint/runtime";
92
+
93
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
94
+
95
+ async function run() {
96
+ await initializeABAP();
97
+ const unit = new runtime.UnitTestResult();
98
+ let clas;
99
+ let locl;
100
+ let meth;
101
101
  try {\n`;
102
102
  for (const obj of reg.getObjects()) {
103
103
  if (reg.isDependency(obj) || !(obj instanceof abaplint.Objects.Class)) {
@@ -111,9 +111,9 @@ async function run() {
111
111
  // todo, fix, there might be global test methods
112
112
  continue;
113
113
  }
114
- ret += ` {
115
- const {${def.name}} = await import("./${obj.getName().toLowerCase()}.${obj.getType().toLowerCase()}.testclasses.mjs");
116
- locl = clas.addTestClass("${def.name}");
114
+ ret += ` {
115
+ const {${def.name}} = await import("./${obj.getName().toLowerCase()}.${obj.getType().toLowerCase()}.testclasses.mjs");
116
+ locl = clas.addTestClass("${def.name}");
117
117
  if (${def.name}.class_setup) await ${def.name}.class_setup();\n`;
118
118
  for (const m of def.methods) {
119
119
  if (m.isForTesting === false) {
@@ -140,24 +140,24 @@ async function run() {
140
140
  }
141
141
  }
142
142
  }
143
- ret += `// -------------------END-------------------
144
- console.log(abap.console.get());
145
- fs.writeFileSync(__dirname + path.sep + "output.xml", unit.xUnitXML());
146
- } catch (e) {
147
- if (meth) {
148
- meth.fail();
149
- }
150
- console.log(abap.console.get());
151
- fs.writeFileSync(__dirname + path.sep + "output.xml", unit.xUnitXML());
152
- throw e;
153
- }
154
- }
155
-
156
- run().then(() => {
157
- process.exit(0);
158
- }).catch((err) => {
159
- console.log(err);
160
- process.exit(1);
143
+ ret += `// -------------------END-------------------
144
+ console.log(abap.console.get());
145
+ fs.writeFileSync(__dirname + path.sep + "output.xml", unit.xUnitXML());
146
+ } catch (e) {
147
+ if (meth) {
148
+ meth.fail();
149
+ }
150
+ console.log(abap.console.get());
151
+ fs.writeFileSync(__dirname + path.sep + "output.xml", unit.xUnitXML());
152
+ throw e;
153
+ }
154
+ }
155
+
156
+ run().then(() => {
157
+ process.exit(0);
158
+ }).catch((err) => {
159
+ console.log(err);
160
+ process.exit(1);
161
161
  });`;
162
162
  return ret;
163
163
  }
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "@abaplint/transpiler",
3
- "version": "2.0.8",
4
- "description": "Transpiler",
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
- "dependencies": {
31
- "@abaplint/core": "^2.88.10",
32
- "source-map": "^0.7.3"
33
- },
34
- "devDependencies": {
35
- "@types/chai": "^4.3.1",
36
- "@types/mocha": "^9.1.0",
37
- "chai": "^4.3.6",
38
- "mocha": "^9.2.2",
39
- "source-map-support": "^0.5.21",
40
- "typescript": "^4.6.3"
41
- }
42
- }
1
+ {
2
+ "name": "@abaplint/transpiler",
3
+ "version": "2.0.11",
4
+ "description": "Transpiler",
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
+ "dependencies": {
31
+ "@abaplint/core": "^2.89.12",
32
+ "source-map": "^0.7.3"
33
+ },
34
+ "devDependencies": {
35
+ "@types/chai": "^4.3.1",
36
+ "@types/mocha": "^9.1.1",
37
+ "chai": "^4.3.6",
38
+ "mocha": "^9.2.2",
39
+ "source-map-support": "^0.5.21",
40
+ "typescript": "^4.6.3"
41
+ }
42
+ }