@abaplint/transpiler 1.7.41 → 1.8.0

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.
@@ -28,6 +28,10 @@ class ConstantTranspiler {
28
28
  const code = "new abap.types.Character({length: " + (res.length - 2) + "}).set(" + this.escape(res) + ")";
29
29
  return new chunk_1.Chunk().append(code, node, traversal);
30
30
  }
31
+ else if (res.startsWith("`") && this.addGet === false) {
32
+ const code = "new abap.types.String().set(" + this.escape(res) + ")";
33
+ return new chunk_1.Chunk().append(code, node, traversal);
34
+ }
31
35
  else {
32
36
  if (res.startsWith("'")) {
33
37
  res = "'" + res.substring(1, res.length - 1).trimEnd() + "'";
@@ -3,7 +3,7 @@ import { IExpressionTranspiler } from "./_expression_transpiler";
3
3
  import { Traversal } from "../traversal";
4
4
  import { Chunk } from "../chunk";
5
5
  export declare class MethodSourceTranspiler implements IExpressionTranspiler {
6
- private readonly prepend;
6
+ private prepend;
7
7
  constructor(prepend?: string);
8
8
  transpile(node: Nodes.ExpressionNode, traversal: Traversal): Chunk;
9
9
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MethodSourceTranspiler = void 0;
4
+ /* eslint-disable max-len */
4
5
  const core_1 = require("@abaplint/core");
5
6
  const chunk_1 = require("../chunk");
6
7
  const _1 = require(".");
@@ -11,36 +12,26 @@ class MethodSourceTranspiler {
11
12
  transpile(node, traversal) {
12
13
  const ret = new chunk_1.Chunk();
13
14
  const children = node.getChildren();
15
+ let call = "";
14
16
  for (let i = 0; i < children.length; i++) {
15
17
  const child = children[i];
16
18
  const nextChild = children[i + 1];
17
19
  if (child.get() instanceof core_1.Expressions.ClassName) {
18
- ret.appendString(traversal.lookupClassOrInterface(child.concatTokens(), child.getFirstToken()));
20
+ call += traversal.lookupClassOrInterface(child.concatTokens(), child.getFirstToken());
19
21
  }
20
22
  else if (child.get() instanceof core_1.Expressions.Dynamic && (nextChild === null || nextChild === void 0 ? void 0 : nextChild.concatTokens()) === "=>") {
21
23
  const second = child.getChildren()[1];
24
+ const lookupException = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_CLASS'", child.getFirstToken(), true);
22
25
  if (second.get() instanceof core_1.Expressions.FieldChain && second instanceof core_1.Nodes.ExpressionNode) {
23
26
  const t = new _1.FieldChainTranspiler(true).transpile(second, traversal).getCode();
24
- const lookup = traversal.lookupClassOrInterface(t, child.getFirstToken(), true);
25
- const lookupException = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_CLASS'", child.getFirstToken(), true);
26
- // eslint-disable-next-line max-len
27
- ret.appendString(`if (${lookup} === undefined && ${lookupException} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; }\n`);
28
- ret.appendString(`if (${lookup} === undefined) { throw new ${lookupException}(); }\n`);
29
- if (i === 0) {
30
- ret.appendString(this.prepend);
31
- }
32
- ret.appendString(lookup);
27
+ call = traversal.lookupClassOrInterface(t, child.getFirstToken(), true);
28
+ ret.appendString(`if (${call} === undefined && ${lookupException} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; }\n`);
29
+ ret.appendString(`if (${call} === undefined) { throw new ${lookupException}(); }\n`);
33
30
  }
34
31
  else if (second.get() instanceof core_1.Expressions.Constant) {
35
- const lookup = traversal.lookupClassOrInterface(second.getFirstToken().getStr(), child.getFirstToken(), true);
36
- const lookupException = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_CLASS'", child.getFirstToken(), true);
37
- // eslint-disable-next-line max-len
38
- ret.appendString(`if (${lookup} === undefined && ${lookupException} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; }\n`);
39
- ret.appendString(`if (${lookup} === undefined) { throw new ${lookupException}(); }\n`);
40
- if (i === 0) {
41
- ret.appendString(this.prepend);
42
- }
43
- ret.appendString(lookup);
32
+ call = traversal.lookupClassOrInterface(second.getFirstToken().getStr(), child.getFirstToken(), true);
33
+ ret.appendString(`if (${call} === undefined && ${lookupException} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; }\n`);
34
+ ret.appendString(`if (${call} === undefined) { throw new ${lookupException}(); }\n`);
44
35
  }
45
36
  else {
46
37
  ret.appendString("MethodSourceTranspiler-Unexpected");
@@ -48,49 +39,51 @@ class MethodSourceTranspiler {
48
39
  }
49
40
  else if (child.get() instanceof core_1.Expressions.Dynamic) {
50
41
  const second = child.getChildren()[1];
42
+ const lookupException = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_METHOD'", child.getFirstToken(), true);
51
43
  if (second.get() instanceof core_1.Expressions.FieldChain) {
52
- ret.appendString("[");
53
- ret.appendChunk(traversal.traverse(second));
54
- ret.appendString(".get().toLowerCase()]");
44
+ call += "[";
45
+ call += traversal.traverse(second).getCode();
46
+ call += ".get().toLowerCase()]";
55
47
  }
56
48
  else if (second.get() instanceof core_1.Expressions.Constant) {
57
- if (ret.getCode().endsWith(".") === false) {
58
- ret.appendString(".");
49
+ if (call.endsWith(".") === false) {
50
+ call += ".";
59
51
  }
60
- ret.appendString(second.getFirstToken().getStr().replace(/\'/g, "").toLowerCase().replace("~", "$"));
52
+ call += second.getFirstToken().getStr().replace(/\'/g, "").toLowerCase().replace("~", "$");
61
53
  }
62
54
  else {
63
55
  ret.appendString("MethodSourceTranspiler-Unexpected");
64
56
  }
57
+ ret.appendString(`if (${call} === undefined && ${lookupException} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_METHOD not found"; }\n`);
58
+ ret.appendString(`if (${call} === undefined) { throw new ${lookupException}(); }\n`);
65
59
  }
66
60
  else if (child.get() instanceof core_1.Expressions.MethodName) {
67
61
  if (i === 0) {
68
- ret.appendString(this.prepend + "this.");
62
+ this.prepend += "this.";
69
63
  }
70
64
  const methodName = child.concatTokens().toLowerCase().replace("~", "$");
71
- ret.append(methodName, child.getFirstToken().getStart(), traversal);
65
+ call += methodName;
72
66
  }
73
67
  else if (child.concatTokens() === "=>") {
74
- ret.append(".", child.getFirstToken().getStart(), traversal);
68
+ call += ".";
75
69
  }
76
70
  else if (child.concatTokens() === "->") {
77
71
  if (ret.getCode() !== "super") {
78
- ret.append(".get()", child, traversal);
72
+ call += ".get()";
79
73
  }
80
74
  if (!(nextChild.get() instanceof core_1.Expressions.Dynamic)) {
81
- ret.append(".", child, traversal);
75
+ call += ".";
82
76
  }
83
77
  }
84
78
  else if (child.get() instanceof core_1.Expressions.FieldChain) {
85
- if (i === 0) {
86
- ret.appendString(this.prepend);
87
- }
88
- ret.appendChunk(traversal.traverse(child));
79
+ call += traversal.traverse(child).getCode();
89
80
  }
90
81
  else {
91
82
  ret.appendString("MethodSourceTranspiler-" + child.get().constructor.name + "-todo");
92
83
  }
93
84
  }
85
+ ret.appendString(this.prepend);
86
+ ret.appendString(call);
94
87
  return ret;
95
88
  }
96
89
  }
@@ -66,11 +66,10 @@ class SourceTranspiler {
66
66
  }
67
67
  }
68
68
  else if (c instanceof core_1.Nodes.TokenNode && (c.getFirstToken().getStr() === "&&" || c.getFirstToken().getStr() === "&")) {
69
- if (this.addGet === false) {
70
- return new SourceTranspiler(true).transpile(node, traversal);
71
- }
72
- else {
73
- ret.append(" + ", c, traversal);
69
+ ret = new chunk_1.Chunk().appendString("abap.operators.concat(").appendChunk(ret).appendString(",");
70
+ post.appendString(")");
71
+ if (this.addGet) {
72
+ post.append(".get()", c, traversal);
74
73
  }
75
74
  }
76
75
  else if (c instanceof core_1.Nodes.TokenNodeRegex && c.getFirstToken().getStr().toUpperCase() === "BOOLC") {
@@ -33,7 +33,7 @@ class StringTemplateTranspiler {
33
33
  ret += new _1.StringTemplateSourceTranspiler().transpile(c, traversal).getCode();
34
34
  }
35
35
  }
36
- return new chunk_1.Chunk(ret);
36
+ return new chunk_1.Chunk("new abap.types.String().set(" + ret + ")");
37
37
  }
38
38
  }
39
39
  exports.StringTemplateTranspiler = StringTemplateTranspiler;
@@ -11,8 +11,8 @@ class HandleDataElement {
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
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
14
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
15
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
16
16
  };`);
17
17
  const output = {
18
18
  object: {
@@ -12,9 +12,9 @@ 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
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
17
- "keyFields": ${JSON.stringify(obj.listKeys())},
15
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
16
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
17
+ "keyFields": ${JSON.stringify(obj.listKeys())},
18
18
  };`);
19
19
  const output = {
20
20
  object: {
@@ -11,8 +11,8 @@ 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
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
14
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
15
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
16
16
  };`);
17
17
  const output = {
18
18
  object: {
@@ -28,7 +28,7 @@ class Transpiler {
28
28
  return new Transpiler().run(reg);
29
29
  }
30
30
  async run(reg, progress) {
31
- var _a, _b;
31
+ var _a, _b, _c, _d;
32
32
  reg.parse();
33
33
  new keywords_1.Keywords().handle(reg);
34
34
  this.validate(reg);
@@ -36,6 +36,7 @@ class Transpiler {
36
36
  const output = {
37
37
  objects: [],
38
38
  unitTestScript: new unit_test_1.UnitTest().unitTestScript(reg, (_a = this.options) === null || _a === void 0 ? void 0 : _a.skip, (_b = this.options) === null || _b === void 0 ? void 0 : _b.only),
39
+ unitTestScriptOpen: new unit_test_1.UnitTest().unitTestScriptOpen(reg, (_c = this.options) === null || _c === void 0 ? void 0 : _c.skip, (_d = this.options) === null || _d === void 0 ? void 0 : _d.only),
39
40
  initializationScript: new unit_test_1.UnitTest().initializationScript(reg, dbSetup),
40
41
  databaseSetup: dbSetup,
41
42
  reg: reg,
@@ -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
  }
@@ -14,6 +14,7 @@ export interface IOutput {
14
14
  objects: IOutputFile[];
15
15
  reg: abaplint.IRegistry;
16
16
  unitTestScript: string;
17
+ unitTestScriptOpen: string;
17
18
  initializationScript: string;
18
19
  databaseSetup: string;
19
20
  }
@@ -6,6 +6,7 @@ export declare type TestMethodList = {
6
6
  }[];
7
7
  export declare class UnitTest {
8
8
  initializationScript(reg: abaplint.IRegistry, dbSetup: string): string;
9
+ unitTestScriptOpen(reg: abaplint.IRegistry, _skip?: TestMethodList, _only?: TestMethodList): string;
9
10
  unitTestScript(reg: abaplint.IRegistry, skip?: TestMethodList, _only?: TestMethodList): string;
10
11
  private buildImports;
11
12
  }
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UnitTest = void 0;
4
+ /* eslint-disable max-len */
4
5
  const abaplint = require("@abaplint/core");
5
6
  class UnitTest {
6
7
  // todo, move this somewhere else, its much more than just unit test relevant
7
8
  initializationScript(reg, dbSetup) {
8
- let ret = `import runtime from "@abaplint/runtime";
9
- global.abap = new runtime.ABAP();
10
- ${this.buildImports(reg)}
9
+ let ret = `import runtime from "@abaplint/runtime";
10
+ global.abap = new runtime.ABAP();
11
+ ${this.buildImports(reg)}
11
12
  export async function initializeABAP(settings) {\n`;
12
13
  if (dbSetup === "") {
13
14
  ret += `// no database artifacts, skip DB initialization\n`;
@@ -18,22 +19,77 @@ export async function initializeABAP(settings) {\n`;
18
19
  ret += `}`;
19
20
  return ret;
20
21
  }
22
+ unitTestScriptOpen(reg, _skip, _only) {
23
+ let ret = `/* eslint-disable curly */
24
+ import fs from "fs";
25
+ import path from "path";
26
+ import {fileURLToPath} from "url";
27
+ import {initializeABAP} from "./init.mjs";
28
+
29
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
30
+
31
+ async function run() {
32
+ await initializeABAP();
33
+ 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":[]});
34
+ 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})});
35
+ 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()});
36
+ `;
37
+ for (const obj of reg.getObjects()) {
38
+ if (reg.isDependency(obj) || !(obj instanceof abaplint.Objects.Class)) {
39
+ continue;
40
+ }
41
+ const hasTestFile = obj.getFiles().some(f => { return f.getFilename().includes(".testclasses."); });
42
+ if (hasTestFile === true) {
43
+ ret += ` await import("./${obj.getName().toLowerCase()}.${obj.getType().toLowerCase()}.testclasses.mjs");\n`;
44
+ }
45
+ for (const file of obj.getABAPFiles()) {
46
+ for (const def of file.getInfo().listClassDefinitions()) {
47
+ if (def.isForTesting === false || def.isGlobal === true || def.methods.length === 0) {
48
+ // todo, fix, there might be global test methods
49
+ continue;
50
+ }
51
+ for (const m of def.methods) {
52
+ if (m.isForTesting === false) {
53
+ continue;
54
+ }
55
+ ret += ` ls_input.get().class_name.set("${obj.getName()}");
56
+ ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
57
+ ls_input.get().method_name.set("${m.name.toUpperCase()}");
58
+ abap.statements.append({source: ls_input, target: lt_input});`;
59
+ }
60
+ }
61
+ }
62
+ }
63
+ ret += `
64
+
65
+ ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
66
+ fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
67
+ }
68
+
69
+ run().then(() => {
70
+ process.exit(0);
71
+ }).catch((err) => {
72
+ console.log(err);
73
+ process.exit(1);
74
+ });`;
75
+ return ret;
76
+ }
21
77
  unitTestScript(reg, skip, _only) {
22
- let ret = `/* eslint-disable curly */
23
- import fs from "fs";
24
- import path from "path";
25
- import {fileURLToPath} from "url";
26
- import {initializeABAP} from "./init.mjs";
27
- import runtime from "@abaplint/runtime";
28
-
29
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
30
-
31
- async function run() {
32
- await initializeABAP();
33
- const unit = new runtime.UnitTestResult();
34
- let clas;
35
- let locl;
36
- let meth;
78
+ let ret = `/* eslint-disable curly */
79
+ import fs from "fs";
80
+ import path from "path";
81
+ import {fileURLToPath} from "url";
82
+ import {initializeABAP} from "./init.mjs";
83
+ import runtime from "@abaplint/runtime";
84
+
85
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
86
+
87
+ async function run() {
88
+ await initializeABAP();
89
+ const unit = new runtime.UnitTestResult();
90
+ let clas;
91
+ let locl;
92
+ let meth;
37
93
  try {\n`;
38
94
  for (const obj of reg.getObjects()) {
39
95
  if (reg.isDependency(obj) || !(obj instanceof abaplint.Objects.Class)) {
@@ -43,14 +99,13 @@ async function run() {
43
99
  ret += ` clas = unit.addObject("${obj.getName()}");\n`;
44
100
  for (const file of obj.getABAPFiles()) {
45
101
  for (const def of file.getInfo().listClassDefinitions()) {
46
- if (def.isForTesting === false
47
- || def.isGlobal === true // todo, fix, there might be global test methods
48
- || def.methods.length === 0) {
102
+ if (def.isForTesting === false || def.isGlobal === true || def.methods.length === 0) {
103
+ // todo, fix, there might be global test methods
49
104
  continue;
50
105
  }
51
- ret += ` {
52
- const {${def.name}} = await import("./${obj.getName().toLowerCase()}.${obj.getType().toLowerCase()}.testclasses.mjs");
53
- locl = clas.addTestClass("${def.name}");
106
+ ret += ` {
107
+ const {${def.name}} = await import("./${obj.getName().toLowerCase()}.${obj.getType().toLowerCase()}.testclasses.mjs");
108
+ locl = clas.addTestClass("${def.name}");
54
109
  if (${def.name}.class_setup) await ${def.name}.class_setup();\n`;
55
110
  for (const m of def.methods) {
56
111
  if (m.isForTesting === false) {
@@ -77,24 +132,24 @@ async function run() {
77
132
  }
78
133
  }
79
134
  }
80
- ret += `// -------------------END-------------------
81
- console.log(abap.console.get());
82
- fs.writeFileSync(__dirname + path.sep + "output.xml", unit.xUnitXML());
83
- } catch (e) {
84
- if (meth) {
85
- meth.fail();
86
- }
87
- console.log(abap.console.get());
88
- fs.writeFileSync(__dirname + path.sep + "output.xml", unit.xUnitXML());
89
- throw e;
90
- }
91
- }
92
-
93
- run().then(() => {
94
- process.exit(0);
95
- }).catch((err) => {
96
- console.log(err);
97
- process.exit(1);
135
+ ret += `// -------------------END-------------------
136
+ console.log(abap.console.get());
137
+ fs.writeFileSync(__dirname + path.sep + "output.xml", unit.xUnitXML());
138
+ } catch (e) {
139
+ if (meth) {
140
+ meth.fail();
141
+ }
142
+ console.log(abap.console.get());
143
+ fs.writeFileSync(__dirname + path.sep + "output.xml", unit.xUnitXML());
144
+ throw e;
145
+ }
146
+ }
147
+
148
+ run().then(() => {
149
+ process.exit(0);
150
+ }).catch((err) => {
151
+ console.log(err);
152
+ process.exit(1);
98
153
  });`;
99
154
  return ret;
100
155
  }
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "@abaplint/transpiler",
3
- "version": "1.7.41",
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: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
- "@abaplint/core": "^2.85.9",
31
- "source-map": "^0.7.3"
32
- },
33
- "devDependencies": {
34
- "@types/chai": "^4.3.0",
35
- "@types/mocha": "^9.1.0",
36
- "chai": "^4.3.6",
37
- "mocha": "^9.2.0",
38
- "source-map-support": "^0.5.21",
39
- "typescript": "^4.5.5"
40
- }
41
- }
1
+ {
2
+ "name": "@abaplint/transpiler",
3
+ "version": "1.8.0",
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: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
+ "@abaplint/core": "^2.85.12",
31
+ "source-map": "^0.7.3"
32
+ },
33
+ "devDependencies": {
34
+ "@types/chai": "^4.3.0",
35
+ "@types/mocha": "^9.1.0",
36
+ "chai": "^4.3.6",
37
+ "mocha": "^9.2.0",
38
+ "source-map-support": "^0.5.21",
39
+ "typescript": "^4.5.5"
40
+ }
41
+ }