@abaplint/transpiler-cli 2.13.88 → 2.13.90

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 +133 -10
  2. package/package.json +5 -5
package/build/bundle.js CHANGED
@@ -12875,7 +12875,7 @@ class CallTransaction {
12875
12875
  getMatcher() {
12876
12876
  const options = (0, combi_1.seq)("OPTIONS FROM", expressions_1.Source);
12877
12877
  const messages = (0, combi_1.seq)("MESSAGES INTO", expressions_1.Target);
12878
- const auth = (0, combi_1.ver)(version_1.Release.v740sp02, (0, combi_1.seq)((0, combi_1.altPrio)("WITH", "WITHOUT"), "AUTHORITY-CHECK"));
12878
+ const auth = (0, combi_1.ver)(version_1.Release.v740sp02, (0, combi_1.seq)((0, combi_1.altPrio)("WITH", "WITHOUT"), "AUTHORITY-CHECK"), { also: combi_1.AlsoIn.OpenABAP });
12879
12879
  const perm = (0, combi_1.per)((0, combi_1.seq)("UPDATE", expressions_1.Source), "AND SKIP FIRST SCREEN", options, messages, (0, combi_1.seq)("MODE", expressions_1.Source));
12880
12880
  const ret = (0, combi_1.seq)("CALL TRANSACTION", expressions_1.Source, (0, combi_1.optPrio)(auth), (0, combi_1.optPrio)((0, combi_1.seq)("USING", expressions_1.Source)), (0, combi_1.opt)(perm));
12881
12881
  return (0, combi_1.verNotLang)(version_1.LanguageVersion.Cloud, ret);
@@ -71132,7 +71132,7 @@ class Registry {
71132
71132
  }
71133
71133
  static abaplintVersion() {
71134
71134
  // magic, see build script "version.js"
71135
- return "2.120.54";
71135
+ return "2.120.56";
71136
71136
  }
71137
71137
  getDDICReferences() {
71138
71138
  return this.ddicReferences;
@@ -72071,7 +72071,7 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
72071
72071
  * CREATE OBJECT statements
72072
72072
  * RAISE EVENT statements
72073
72073
 
72074
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
72074
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#align-parameters
72075
72075
 
72076
72076
  Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
72077
72077
 
@@ -76905,7 +76905,7 @@ class ConstantClasses {
76905
76905
  key: "constant_classes",
76906
76906
  title: "Validate constant classes",
76907
76907
  shortDescription: `Checks that a class contains exactly the constants corresponding to a domain's fixed values.`,
76908
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-enumeration-classes-to-constants-interfaces`,
76908
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-enum-to-constants-interfaces`,
76909
76909
  tags: [_irule_1.RuleTag.Styleguide],
76910
76910
  };
76911
76911
  }
@@ -81096,6 +81096,10 @@ ${indentation} output = ${uniqueName}.\n`;
81096
81096
  if (!(high.get() instanceof Statements.CallTransaction)) {
81097
81097
  return undefined;
81098
81098
  }
81099
+ else if (this.lowReg.getConfig().isOpenABAP()) {
81100
+ // open-abap supports the addition
81101
+ return undefined;
81102
+ }
81099
81103
  const tokens = high.getTokens();
81100
81104
  // the lexer splits "AUTHORITY-CHECK" into three tokens: AUTHORITY, -, CHECK
81101
81105
  for (let i = 1; i < tokens.length - 3; i++) {
@@ -85523,6 +85527,7 @@ __exportStar(__webpack_require__(/*! ./prefer_inline */ "./node_modules/@abaplin
85523
85527
  __exportStar(__webpack_require__(/*! ./prefer_insert_into_table */ "./node_modules/@abaplint/core/build/src/rules/prefer_insert_into_table.js"), exports);
85524
85528
  __exportStar(__webpack_require__(/*! ./prefer_is_not */ "./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js"), exports);
85525
85529
  __exportStar(__webpack_require__(/*! ./prefer_pragmas */ "./node_modules/@abaplint/core/build/src/rules/prefer_pragmas.js"), exports);
85530
+ __exportStar(__webpack_require__(/*! ./prefer_abap_bool */ "./node_modules/@abaplint/core/build/src/rules/prefer_abap_bool.js"), exports);
85526
85531
  __exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js"), exports);
85527
85532
  __exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ "./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js"), exports);
85528
85533
  __exportStar(__webpack_require__(/*! ./prefer_xsdbool */ "./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js"), exports);
@@ -86336,7 +86341,7 @@ class KeywordCase extends _abap_rule_1.ABAPRule {
86336
86341
  key: "keyword_case",
86337
86342
  title: "Keyword case",
86338
86343
  shortDescription: `Checks that keywords have the same case. Non-keywords must be lower case.`,
86339
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-your-pretty-printer-team-settings`,
86344
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-your-teams-abap-formatter-settings`,
86340
86345
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
86341
86346
  badExample: `write 'hello world'.`,
86342
86347
  goodExample: `WRITE 'hello world'.`,
@@ -92816,6 +92821,116 @@ exports.PragmaStyle = PragmaStyle;
92816
92821
 
92817
92822
  /***/ },
92818
92823
 
92824
+ /***/ "./node_modules/@abaplint/core/build/src/rules/prefer_abap_bool.js"
92825
+ /*!*************************************************************************!*\
92826
+ !*** ./node_modules/@abaplint/core/build/src/rules/prefer_abap_bool.js ***!
92827
+ \*************************************************************************/
92828
+ (__unused_webpack_module, exports, __webpack_require__) {
92829
+
92830
+ "use strict";
92831
+
92832
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
92833
+ if (k2 === undefined) k2 = k;
92834
+ var desc = Object.getOwnPropertyDescriptor(m, k);
92835
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
92836
+ desc = { enumerable: true, get: function() { return m[k]; } };
92837
+ }
92838
+ Object.defineProperty(o, k2, desc);
92839
+ }) : (function(o, m, k, k2) {
92840
+ if (k2 === undefined) k2 = k;
92841
+ o[k2] = m[k];
92842
+ }));
92843
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
92844
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
92845
+ }) : function(o, v) {
92846
+ o["default"] = v;
92847
+ });
92848
+ var __importStar = (this && this.__importStar) || (function () {
92849
+ var ownKeys = function(o) {
92850
+ ownKeys = Object.getOwnPropertyNames || function (o) {
92851
+ var ar = [];
92852
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
92853
+ return ar;
92854
+ };
92855
+ return ownKeys(o);
92856
+ };
92857
+ return function (mod) {
92858
+ if (mod && mod.__esModule) return mod;
92859
+ var result = {};
92860
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
92861
+ __setModuleDefault(result, mod);
92862
+ return result;
92863
+ };
92864
+ })();
92865
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
92866
+ exports.PreferAbapBool = exports.PreferAbapBoolConf = void 0;
92867
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
92868
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
92869
+ const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
92870
+ const Statements = __importStar(__webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
92871
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
92872
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
92873
+ const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
92874
+ const FORBIDDEN_TYPES = new Set(["XFELD", "SAP_BOOL", "BOOLE_D", "FLAG"]);
92875
+ class PreferAbapBoolConf extends _basic_rule_config_1.BasicRuleConfig {
92876
+ }
92877
+ exports.PreferAbapBoolConf = PreferAbapBoolConf;
92878
+ class PreferAbapBool extends _abap_rule_1.ABAPRule {
92879
+ constructor() {
92880
+ super(...arguments);
92881
+ this.conf = new PreferAbapBoolConf();
92882
+ }
92883
+ getMetadata() {
92884
+ return {
92885
+ key: "prefer_abap_bool",
92886
+ title: "Prefer abap_bool",
92887
+ shortDescription: `Use abap_bool instead of XFELD, SAP_BOOL, BOOLE_D, FLAG for boolean variables`,
92888
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-abap_bool-for-booleans`,
92889
+ tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
92890
+ badExample: `DATA foo TYPE xfeld.`,
92891
+ goodExample: `DATA foo TYPE abap_bool.`,
92892
+ };
92893
+ }
92894
+ getConfig() {
92895
+ return this.conf;
92896
+ }
92897
+ setConfig(conf) {
92898
+ this.conf = conf;
92899
+ }
92900
+ runParsed(file) {
92901
+ const issues = [];
92902
+ const structure = file.getStructure();
92903
+ if (structure === undefined) {
92904
+ return [];
92905
+ }
92906
+ const statements = [
92907
+ ...structure.findAllStatements(Statements.Data),
92908
+ ...structure.findAllStatements(Statements.ClassData),
92909
+ ...structure.findAllStatements(Statements.Constant),
92910
+ ...structure.findAllStatements(Statements.Type),
92911
+ ...structure.findAllStatements(Statements.FieldSymbol),
92912
+ ];
92913
+ for (const stat of statements) {
92914
+ const typeNameExpr = stat.findFirstExpression(Expressions.TypeName);
92915
+ if (typeNameExpr === undefined) {
92916
+ continue;
92917
+ }
92918
+ const typeName = typeNameExpr.concatTokens().toUpperCase();
92919
+ if (FORBIDDEN_TYPES.has(typeName) === false) {
92920
+ continue;
92921
+ }
92922
+ const token = typeNameExpr.getFirstToken();
92923
+ const fix = edit_helper_1.EditHelper.replaceToken(file, token, "abap_bool");
92924
+ issues.push(issue_1.Issue.atToken(file, token, `Use abap_bool instead of ${typeName}`, this.getMetadata().key, this.conf.severity, fix));
92925
+ }
92926
+ return issues;
92927
+ }
92928
+ }
92929
+ exports.PreferAbapBool = PreferAbapBool;
92930
+ //# sourceMappingURL=prefer_abap_bool.js.map
92931
+
92932
+ /***/ },
92933
+
92819
92934
  /***/ "./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js"
92820
92935
  /*!*****************************************************************************!*\
92821
92936
  !*** ./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js ***!
@@ -93262,9 +93377,8 @@ class PreferInsertIntoTable extends _abap_rule_1.ABAPRule {
93262
93377
  key: "prefer_insert_into_table",
93263
93378
  title: "Prefer INSERT INTO TABLE over APPEND",
93264
93379
  shortDescription: `Prefer INSERT INTO TABLE over APPEND`,
93265
- extendedInformation: `INSERT INTO TABLE respects the table type, while APPEND always adds to the end regardless of table type.
93266
-
93267
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md`,
93380
+ // eslint-disable-next-line max-len
93381
+ extendedInformation: `INSERT INTO TABLE respects the table type, while APPEND always tries to add to the end. This will dump if the sort order of a sorted table would change.\n\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-insert-into-table-to-append-to`,
93268
93382
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
93269
93383
  badExample: `APPEND row TO itab.`,
93270
93384
  goodExample: `INSERT row INTO TABLE itab.`,
@@ -95958,6 +96072,8 @@ class SequentialBlank extends _abap_rule_1.ABAPRule {
95958
96072
  key: "sequential_blank",
95959
96073
  title: "Sequential blank lines",
95960
96074
  shortDescription: `Checks that code does not contain more than the configured number of blank lines in a row.`,
96075
+ // eslint-disable-next-line max-len
96076
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#add-a-single-blank-line-to-separate-things-but-not-more`,
95961
96077
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
95962
96078
  };
95963
96079
  }
@@ -103436,7 +103552,14 @@ class DatabaseSetup {
103436
103552
  return {
103437
103553
  schemas: {
103438
103554
  sqlite: this.driver(new sqlite_database_schema_1.SQLiteDatabaseSchema(this.reg)),
103439
- hdb: ["todo"],
103555
+ // HANA takes the PG schema unchanged -- measured against HANA Express
103556
+ // on a tree of 77 tables. The one thing it needs is that identifiers
103557
+ // reach it quoted in UPPER case, and that is not a dialect of DDL: the
103558
+ // same rule applies to every statement, so @abaplint/database-hdb
103559
+ // folds them on the way out rather than a second generator doing it
103560
+ // here. (Unquoted would nearly work and then meet a column called
103561
+ // `cross`, which is one of HANA's reserved words.)
103562
+ hdb: this.driver(new pg_database_schema_1.PGDatabaseSchema(this.reg)),
103440
103563
  pg: this.driver(new pg_database_schema_1.PGDatabaseSchema(this.reg)),
103441
103564
  snowflake: this.driver(new snowflake_database_schema_1.SnowflakeDatabaseSchema(this.reg)),
103442
103565
  },
@@ -103591,7 +103714,7 @@ class PopulateTables {
103591
103714
  if (raw === undefined) {
103592
103715
  return "";
103593
103716
  }
103594
- return `INSERT INTO reposrc ('PROGNAME', 'DATA') VALUES ('${name.padEnd(40, " ")}', '${this.escape(raw)}');`;
103717
+ return `INSERT INTO reposrc (progname, data) VALUES ('${name.padEnd(40, " ")}', '${this.escape(raw)}');`;
103595
103718
  }
103596
103719
  insertT100(msag) {
103597
103720
  // ignore if T100 is unknown
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.13.88",
3
+ "version": "2.13.90",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,17 +27,17 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.120.54",
31
- "@abaplint/transpiler": "^2.13.88",
30
+ "@abaplint/core": "^2.120.56",
31
+ "@abaplint/transpiler": "^2.13.90",
32
32
  "@types/glob": "^9.0.0",
33
- "@types/node": "^26.4.1",
33
+ "@types/node": "^26.6.2",
34
34
  "@types/progress": "^2.0.7",
35
35
  "glob": "^13.0.6",
36
36
  "p-limit": "^7.3.2",
37
37
  "progress": "^2.0.3",
38
38
  "ts-json-schema-generator": "^2.9.0",
39
39
  "typescript": "^6.0.3",
40
- "webpack": "^5.110.3",
40
+ "webpack": "^5.111.1",
41
41
  "webpack-cli": "^7.2.3"
42
42
  }
43
43
  }