@abaplint/transpiler-cli 2.10.2 → 2.10.4

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.
Files changed (2) hide show
  1. package/build/bundle.js +10 -5
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -79893,19 +79893,24 @@ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abap
79893
79893
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
79894
79894
  class DeleteInternalTranspiler {
79895
79895
  transpile(node, traversal) {
79896
- const target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Target)).getCode();
79896
+ const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target)).getCode();
79897
79897
  const concat = node.concatTokens().toUpperCase();
79898
79898
  const extra = [];
79899
- const where = node.findFirstExpression(abaplint.Expressions.ComponentCond);
79900
- if (where) {
79899
+ const componentCond = node.findDirectExpression(abaplint.Expressions.ComponentCond);
79900
+ if (componentCond) {
79901
79901
  // todo, replacing "await" is a hack
79902
- extra.push("where: " + traversal.traverse(where).getCode().replace("await ", ""));
79902
+ extra.push("where: " + traversal.traverse(componentCond).getCode().replace("await ", ""));
79903
+ }
79904
+ const componentCompare = node.findDirectExpression(abaplint.Expressions.ComponentCompare);
79905
+ if (componentCompare) {
79906
+ // todo: this can be optimized, WITH TABLE KEY
79907
+ extra.push("where: " + traversal.traverse(componentCompare).getCode());
79903
79908
  }
79904
79909
  // todo, this is not completely correct, fields might have the name ADJACENT
79905
79910
  // comparisons should be on table key unless other is specified, but we're unaware
79906
79911
  if (node.findDirectTokenByText("ADJACENT")) {
79907
79912
  extra.push("adjacent: true");
79908
- if (node.findDirectTokenByText("COMPARING") && !node.concatTokens().toUpperCase().includes("COMPARING ALL FIELDS")) {
79913
+ if (node.findDirectTokenByText("COMPARING") && !concat.includes("COMPARING ALL FIELDS")) {
79909
79914
  const comparing = node.findAllExpressions(abaplint.Expressions.FieldSub);
79910
79915
  if (comparing) {
79911
79916
  const compareFields = comparing.map(i => "'" + i.getFirstToken().getStr() + "'").join(",");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.10.2",
3
+ "version": "2.10.4",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.10.2",
29
+ "@abaplint/transpiler": "^2.10.4",
30
30
  "@types/glob": "^8.1.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.7",