@abaplint/transpiler-cli 2.13.89 → 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.
- package/build/bundle.js +121 -3
- package/package.json +5 -5
package/build/bundle.js
CHANGED
|
@@ -71132,7 +71132,7 @@ class Registry {
|
|
|
71132
71132
|
}
|
|
71133
71133
|
static abaplintVersion() {
|
|
71134
71134
|
// magic, see build script "version.js"
|
|
71135
|
-
return "2.120.
|
|
71135
|
+
return "2.120.56";
|
|
71136
71136
|
}
|
|
71137
71137
|
getDDICReferences() {
|
|
71138
71138
|
return this.ddicReferences;
|
|
@@ -85527,6 +85527,7 @@ __exportStar(__webpack_require__(/*! ./prefer_inline */ "./node_modules/@abaplin
|
|
|
85527
85527
|
__exportStar(__webpack_require__(/*! ./prefer_insert_into_table */ "./node_modules/@abaplint/core/build/src/rules/prefer_insert_into_table.js"), exports);
|
|
85528
85528
|
__exportStar(__webpack_require__(/*! ./prefer_is_not */ "./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js"), exports);
|
|
85529
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);
|
|
85530
85531
|
__exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js"), exports);
|
|
85531
85532
|
__exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ "./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js"), exports);
|
|
85532
85533
|
__exportStar(__webpack_require__(/*! ./prefer_xsdbool */ "./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js"), exports);
|
|
@@ -92820,6 +92821,116 @@ exports.PragmaStyle = PragmaStyle;
|
|
|
92820
92821
|
|
|
92821
92822
|
/***/ },
|
|
92822
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
|
+
|
|
92823
92934
|
/***/ "./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js"
|
|
92824
92935
|
/*!*****************************************************************************!*\
|
|
92825
92936
|
!*** ./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js ***!
|
|
@@ -103441,7 +103552,14 @@ class DatabaseSetup {
|
|
|
103441
103552
|
return {
|
|
103442
103553
|
schemas: {
|
|
103443
103554
|
sqlite: this.driver(new sqlite_database_schema_1.SQLiteDatabaseSchema(this.reg)),
|
|
103444
|
-
|
|
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)),
|
|
103445
103563
|
pg: this.driver(new pg_database_schema_1.PGDatabaseSchema(this.reg)),
|
|
103446
103564
|
snowflake: this.driver(new snowflake_database_schema_1.SnowflakeDatabaseSchema(this.reg)),
|
|
103447
103565
|
},
|
|
@@ -103596,7 +103714,7 @@ class PopulateTables {
|
|
|
103596
103714
|
if (raw === undefined) {
|
|
103597
103715
|
return "";
|
|
103598
103716
|
}
|
|
103599
|
-
return `INSERT INTO reposrc (
|
|
103717
|
+
return `INSERT INTO reposrc (progname, data) VALUES ('${name.padEnd(40, " ")}', '${this.escape(raw)}');`;
|
|
103600
103718
|
}
|
|
103601
103719
|
insertT100(msag) {
|
|
103602
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.
|
|
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.
|
|
31
|
-
"@abaplint/transpiler": "^2.13.
|
|
30
|
+
"@abaplint/core": "^2.120.56",
|
|
31
|
+
"@abaplint/transpiler": "^2.13.90",
|
|
32
32
|
"@types/glob": "^9.0.0",
|
|
33
|
-
"@types/node": "^26.
|
|
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.
|
|
40
|
+
"webpack": "^5.111.1",
|
|
41
41
|
"webpack-cli": "^7.2.3"
|
|
42
42
|
}
|
|
43
43
|
}
|