@abaplint/transpiler-cli 2.13.94 → 2.13.95
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/build/bundle.js +37 -14
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -605,9 +605,8 @@ const BUFS = new Set([
|
|
|
605
605
|
CH_DOT, CH_COMMA, CH_COLON, 40 /* ( */, 41 /* ) */, 91 /* [ */,
|
|
606
606
|
93 /* ] */, 43 /* + */, CH_AT
|
|
607
607
|
]);
|
|
608
|
-
// characters
|
|
609
|
-
//
|
|
610
|
-
// note that "(" is allowed, ie. text elements like 'text'(001)
|
|
608
|
+
// characters treated as separators after ping literals and string templates.
|
|
609
|
+
// Single-quoted text literals always end at their closing quote.
|
|
611
610
|
const AFTER_LITERAL = new Set([
|
|
612
611
|
EOF, CH_SPACE, CH_TAB, CH_NL, CH_DOT, CH_COMMA, CH_COLON, CH_DQUOTE,
|
|
613
612
|
40 /* ( */, 41 /* ) */, 91 /* [ */, 93 /* ] */
|
|
@@ -925,9 +924,7 @@ class Lexer {
|
|
|
925
924
|
&& ahead !== CH_QUOTE
|
|
926
925
|
&& this.buffer.countIsEven(CH_QUOTE)) {
|
|
927
926
|
// end of string
|
|
928
|
-
|
|
929
|
-
this.add();
|
|
930
|
-
}
|
|
927
|
+
this.add();
|
|
931
928
|
if (ahead === CH_DQUOTE) {
|
|
932
929
|
this.m = ModeComment;
|
|
933
930
|
}
|
|
@@ -3646,7 +3643,8 @@ class ExpandMacros {
|
|
|
3646
3643
|
for (const input of inputs) {
|
|
3647
3644
|
const search = "&" + i;
|
|
3648
3645
|
const reg = new RegExp(search, "g");
|
|
3649
|
-
|
|
3646
|
+
// a function replacement: "$`" and "$'" in the argument are text, not patterns
|
|
3647
|
+
str = str.replace(reg, () => input);
|
|
3650
3648
|
i++;
|
|
3651
3649
|
}
|
|
3652
3650
|
const file = new memory_file_1.MemoryFile("expand_macros.abap.prog", str);
|
|
@@ -17390,7 +17388,7 @@ class ModifyEntities {
|
|
|
17390
17388
|
const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
|
|
17391
17389
|
const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
|
|
17392
17390
|
const end = (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported));
|
|
17393
|
-
const entities = (0, combi_1.seq)((0, combi_1.optPrio)("AUGMENTING"), "ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.
|
|
17391
|
+
const entities = (0, combi_1.seq)((0, combi_1.optPrio)("AUGMENTING"), "ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.optPrio)((0, combi_1.altPrio)("IN LOCAL MODE", (0, combi_1.seq)((0, combi_1.opt)("FORWARDING"), "PRIVILEGED"))), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, (0, combi_1.plus)(operation))));
|
|
17394
17392
|
const dynamic = (0, combi_1.seq)("ENTITIES", (0, combi_1.optPrio)((0, combi_1.altPrio)("IN LOCAL MODE", (0, combi_1.seq)((0, combi_1.opt)("FORWARDING"), "PRIVILEGED"))), "OPERATIONS", expressions_1.Source);
|
|
17395
17393
|
const create2 = (0, combi_1.seq)("CREATE", fieldsWith, (0, combi_1.opt)((0, combi_1.seq)("CREATE BY", expressions_1.EMLEntityPath, fieldsWith)));
|
|
17396
17394
|
const create3 = (0, combi_1.seq)("CREATE BY", expressions_1.EMLEntityPath, fieldsWith);
|
|
@@ -71317,7 +71315,7 @@ class Registry {
|
|
|
71317
71315
|
}
|
|
71318
71316
|
static abaplintVersion() {
|
|
71319
71317
|
// magic, see build script "version.js"
|
|
71320
|
-
return "2.120.
|
|
71318
|
+
return "2.120.63";
|
|
71321
71319
|
}
|
|
71322
71320
|
getDDICReferences() {
|
|
71323
71321
|
return this.ddicReferences;
|
|
@@ -102428,6 +102426,8 @@ class XMLConsistencyConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
|
102428
102426
|
this.textAndTranslationLengthSeverity = severity_1.Severity.Error;
|
|
102429
102427
|
/** Problem severity for data element(DTEL) field checks */
|
|
102430
102428
|
this.dataElementSeverity = severity_1.Severity.Error;
|
|
102429
|
+
/** Problem severity for transparent table checks */
|
|
102430
|
+
this.transparentTableSeverity = severity_1.Severity.Error;
|
|
102431
102431
|
}
|
|
102432
102432
|
}
|
|
102433
102433
|
exports.XMLConsistencyConf = XMLConsistencyConf;
|
|
@@ -102715,11 +102715,11 @@ class XMLConsistency {
|
|
|
102715
102715
|
if (obj.getTableCategory() === Objects.TableCategory.Transparent) {
|
|
102716
102716
|
if (!((_c = obj.getDeliveryClass()) === null || _c === void 0 ? void 0 : _c.trim())) {
|
|
102717
102717
|
const message = `Transparent table must have delivery class(CONTFLAG in DD02V) set`;
|
|
102718
|
-
issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.conf.
|
|
102718
|
+
issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.conf.transparentTableSeverity));
|
|
102719
102719
|
}
|
|
102720
102720
|
if (!((_d = obj.getSizeCategory()) === null || _d === void 0 ? void 0 : _d.trim())) {
|
|
102721
102721
|
const message = `Transparent table must have size category(TABKAT in DD09L) set`;
|
|
102722
|
-
issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.conf.
|
|
102722
|
+
issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.conf.transparentTableSeverity));
|
|
102723
102723
|
}
|
|
102724
102724
|
}
|
|
102725
102725
|
return issues;
|
|
@@ -118068,7 +118068,10 @@ class LoopTranspiler {
|
|
|
118068
118068
|
extra.push(`atLast: (last) => { ${this.atLast} = last; }`);
|
|
118069
118069
|
}
|
|
118070
118070
|
const topEquals = {};
|
|
118071
|
-
|
|
118071
|
+
// only a pure conjunction makes each top-level `=` a condition every row
|
|
118072
|
+
// has to meet: `a = 1 OR b = 2` narrows by neither
|
|
118073
|
+
const onlyAnd = whereNode?.getChildren().every(c => !(c instanceof abaplint.Nodes.TokenNode) || c.concatTokens().toUpperCase() !== "OR") ?? true;
|
|
118074
|
+
for (const compare of onlyAnd ? whereNode?.findDirectExpressions(abaplint.Expressions.ComponentCompare) || [] : []) {
|
|
118072
118075
|
const op = compare.findDirectExpression(abaplint.Expressions.CompareOperator)?.concatTokens().toUpperCase();
|
|
118073
118076
|
if (op !== "=" && op !== "EQ") {
|
|
118074
118077
|
continue;
|
|
@@ -122169,8 +122172,12 @@ class UpdateDatabaseTranspiler {
|
|
|
122169
122172
|
}
|
|
122170
122173
|
options.push(`"set": [${s.join(",")}]`);
|
|
122171
122174
|
}
|
|
122175
|
+
const fromTable = node.findExpressionAfterToken("TABLE");
|
|
122176
|
+
if (fromTable && fromTable.get() instanceof abaplint.Expressions.SQLSource) {
|
|
122177
|
+
options.push(`"table": ` + traversal.traverse(fromTable).getCode());
|
|
122178
|
+
}
|
|
122172
122179
|
const sourceExpression = node.findDirectExpression(abaplint.Expressions.SQLSource)?.findDirectExpression(abaplint.Expressions.SimpleSource3);
|
|
122173
|
-
if (sourceExpression) {
|
|
122180
|
+
if (sourceExpression && fromTable === undefined) {
|
|
122174
122181
|
const sqlSource = new expressions_1.SourceTranspiler(true).transpile(sourceExpression, traversal).getCode();
|
|
122175
122182
|
const tableName = node.findDirectExpression(abaplint.Expressions.DatabaseTable)?.concatTokens();
|
|
122176
122183
|
const tabl = traversal.findTable(tableName);
|
|
@@ -131543,7 +131550,23 @@ function pLimit(concurrency) {
|
|
|
131543
131550
|
},
|
|
131544
131551
|
map: {
|
|
131545
131552
|
async value(iterable, function_) {
|
|
131546
|
-
const promises =
|
|
131553
|
+
const promises = [];
|
|
131554
|
+
|
|
131555
|
+
try {
|
|
131556
|
+
Array.from(iterable, (value, index) => {
|
|
131557
|
+
const promise = generator(function_, value, index);
|
|
131558
|
+
promises.push(promise);
|
|
131559
|
+
return promise;
|
|
131560
|
+
});
|
|
131561
|
+
} catch (error) {
|
|
131562
|
+
// The iterable threw, so `Promise.all` never observes the already scheduled promises. Observe them here to avoid unhandled rejections.
|
|
131563
|
+
for (const promise of promises) {
|
|
131564
|
+
promise.catch(() => {}); // eslint-disable-line promise/prefer-await-to-then
|
|
131565
|
+
}
|
|
131566
|
+
|
|
131567
|
+
throw error;
|
|
131568
|
+
}
|
|
131569
|
+
|
|
131547
131570
|
return Promise.all(promises);
|
|
131548
131571
|
},
|
|
131549
131572
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.95",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.120.
|
|
31
|
-
"@abaplint/transpiler": "^2.13.
|
|
30
|
+
"@abaplint/core": "^2.120.63",
|
|
31
|
+
"@abaplint/transpiler": "^2.13.95",
|
|
32
32
|
"@types/glob": "^9.0.0",
|
|
33
33
|
"@types/node": "^26.6.2",
|
|
34
34
|
"@types/progress": "^2.0.7",
|
|
35
35
|
"glob": "^13.0.6",
|
|
36
|
-
"p-limit": "^7.3.
|
|
36
|
+
"p-limit": "^7.3.3",
|
|
37
37
|
"progress": "^2.0.3",
|
|
38
38
|
"ts-json-schema-generator": "^2.9.0",
|
|
39
39
|
"typescript": "^6.0.3",
|