@abaplint/cli 2.118.0 → 2.118.1

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/cli.js +105 -39
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -26633,6 +26633,70 @@ exports.FSTarget = FSTarget;
26633
26633
 
26634
26634
  /***/ },
26635
26635
 
26636
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/function_parameters.js"
26637
+ /*!************************************************************************************************!*\
26638
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/function_parameters.js ***!
26639
+ \************************************************************************************************/
26640
+ (__unused_webpack_module, exports, __webpack_require__) {
26641
+
26642
+ "use strict";
26643
+
26644
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
26645
+ exports.FunctionParameters = void 0;
26646
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
26647
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
26648
+ const target_1 = __webpack_require__(/*! ./target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
26649
+ const field_chain_1 = __webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js");
26650
+ const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
26651
+ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
26652
+ class FunctionParameters {
26653
+ static runSyntax(node, input) {
26654
+ // EXPORTING: process sources in each FunctionExportingParameter
26655
+ for (const param of node.findAllExpressions(Expressions.FunctionExportingParameter)) {
26656
+ const s = param.findDirectExpression(Expressions.Source);
26657
+ if (s) {
26658
+ source_1.Source.runSyntax(s, input);
26659
+ }
26660
+ const s3 = param.findDirectExpression(Expressions.SimpleSource3);
26661
+ if (s3) {
26662
+ source_1.Source.runSyntax(s3, input);
26663
+ }
26664
+ }
26665
+ // IMPORTING / CHANGING / TABLES: process targets in each ParameterT
26666
+ const changingList = node.findExpressionAfterToken("CHANGING");
26667
+ for (const paramList of node.findDirectExpressions(Expressions.ParameterListT)) {
26668
+ for (const param of paramList.findDirectExpressions(Expressions.ParameterT)) {
26669
+ const t = param.findDirectExpression(Expressions.Target);
26670
+ if (t) {
26671
+ target_1.Target.runSyntax(t, input);
26672
+ }
26673
+ if (paramList === changingList && t !== undefined) {
26674
+ // hmm, does this do the scoping correctly? handle constants etc? todo
26675
+ const found = input.scope.findVariable(t.concatTokens());
26676
+ if (found && found.getMeta().includes("read_only" /* IdentifierMeta.ReadOnly */)) {
26677
+ const message = `"${t.concatTokens()}" cannot be modified, it is readonly`;
26678
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, t.getFirstToken(), message));
26679
+ }
26680
+ }
26681
+ }
26682
+ }
26683
+ // EXCEPTIONS: process field chains and optional MESSAGE targets
26684
+ for (const exc of node.findAllExpressions(Expressions.ParameterException)) {
26685
+ for (const s of exc.findDirectExpressions(Expressions.SimpleFieldChain)) {
26686
+ field_chain_1.FieldChain.runSyntax(s, input, _reference_1.ReferenceType.DataReadReference);
26687
+ }
26688
+ const t = exc.findDirectExpression(Expressions.Target);
26689
+ if (t) {
26690
+ target_1.Target.runSyntax(t, input);
26691
+ }
26692
+ }
26693
+ }
26694
+ }
26695
+ exports.FunctionParameters = FunctionParameters;
26696
+ //# sourceMappingURL=function_parameters.js.map
26697
+
26698
+ /***/ },
26699
+
26636
26700
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js"
26637
26701
  /*!****************************************************************************************!*\
26638
26702
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js ***!
@@ -30654,11 +30718,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
30654
30718
  exports.CallFunction = void 0;
30655
30719
  const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
30656
30720
  const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
30657
- const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
30658
30721
  const field_chain_1 = __webpack_require__(/*! ../expressions/field_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js");
30659
30722
  const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
30660
30723
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
30661
30724
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
30725
+ const function_parameters_1 = __webpack_require__(/*! ../expressions/function_parameters */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/function_parameters.js");
30662
30726
  class CallFunction {
30663
30727
  runSyntax(node, input) {
30664
30728
  // todo, lots of work here, similar to receive.ts
@@ -30676,22 +30740,15 @@ class CallFunction {
30676
30740
  return;
30677
30741
  }
30678
30742
  }
30679
- // just recurse
30680
- for (const s of node.findAllExpressions(Expressions.Source)) {
30681
- source_1.Source.runSyntax(s, input);
30682
- }
30683
- for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
30743
+ for (const s of node.findDirectExpressions(Expressions.SimpleSource2)) {
30684
30744
  source_1.Source.runSyntax(s, input);
30685
30745
  }
30686
- for (const t of node.findAllExpressions(Expressions.Target)) {
30687
- target_1.Target.runSyntax(t, input);
30688
- }
30689
- for (const s of node.findDirectExpressions(Expressions.SimpleSource2)) {
30746
+ for (const s of node.findDirectExpressions(Expressions.Source)) {
30690
30747
  source_1.Source.runSyntax(s, input);
30691
30748
  }
30692
- const exceptions = node.findFirstExpression(Expressions.ParameterException);
30693
- for (const s of (exceptions === null || exceptions === void 0 ? void 0 : exceptions.findAllExpressions(Expressions.SimpleFieldChain)) || []) {
30694
- field_chain_1.FieldChain.runSyntax(s, input, _reference_1.ReferenceType.DataReadReference);
30749
+ const fp = node.findDirectExpression(Expressions.FunctionParameters);
30750
+ if (fp) {
30751
+ function_parameters_1.FunctionParameters.runSyntax(fp, input);
30695
30752
  }
30696
30753
  }
30697
30754
  }
@@ -33685,6 +33742,15 @@ class Move {
33685
33742
  target_1.Target.runSyntax(t, input);
33686
33743
  }
33687
33744
  }
33745
+ if (inline === undefined && firstTarget !== undefined) {
33746
+ // hmm, does this do the scoping correctly? handle constants etc? todo
33747
+ const found = input.scope.findVariable(firstTarget.concatTokens());
33748
+ if (found && found.getMeta().includes("read_only" /* IdentifierMeta.ReadOnly */)) {
33749
+ const message = `"${firstTarget.concatTokens()}" cannot be modified, it is readonly`;
33750
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, firstTarget.getFirstToken(), message));
33751
+ return;
33752
+ }
33753
+ }
33688
33754
  const source = node.findDirectExpression(Expressions.Source);
33689
33755
  let sourceType = source ? source_1.Source.runSyntax(source, input, targetType) : undefined;
33690
33756
  if (sourceType === undefined) {
@@ -55816,7 +55882,7 @@ class Registry {
55816
55882
  }
55817
55883
  static abaplintVersion() {
55818
55884
  // magic, see build script "version.sh"
55819
- return "2.118.0";
55885
+ return "2.118.1";
55820
55886
  }
55821
55887
  getDDICReferences() {
55822
55888
  return this.ddicReferences;
@@ -57994,15 +58060,15 @@ class CDSAssociationName {
57994
58060
  key: "cds_association_name",
57995
58061
  title: "CDS Association Name",
57996
58062
  shortDescription: `CDS association names should start with an underscore`,
57997
- extendedInformation: `By convention, CDS association names must start with an underscore character.
57998
-
58063
+ extendedInformation: `By convention, CDS association names must start with an underscore character.
58064
+
57999
58065
  https://help.sap.com/docs/abap-cloud/abap-data-models/cds-associations`,
58000
58066
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Naming],
58001
- badExample: `define view entity test as select from source
58002
- association [1..1] to target as Assoc on Assoc.id = source.id
58067
+ badExample: `define view entity test as select from source
58068
+ association [1..1] to target as Assoc on Assoc.id = source.id
58003
58069
  { key id }`,
58004
- goodExample: `define view entity test as select from source
58005
- association [1..1] to target as _Assoc on _Assoc.id = source.id
58070
+ goodExample: `define view entity test as select from source
58071
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
58006
58072
  { key id }`,
58007
58073
  };
58008
58074
  }
@@ -58150,19 +58216,19 @@ class CDSFieldOrder {
58150
58216
  title: "CDS Field Order",
58151
58217
  shortDescription: `Checks that CDS key fields are listed first and associations last in the field list`,
58152
58218
  tags: [_irule_1.RuleTag.SingleFile],
58153
- badExample: `define view entity test as select from source
58154
- association [1..1] to target as _Assoc on _Assoc.id = source.id
58155
- {
58156
- field1,
58157
- key id,
58158
- _Assoc
58219
+ badExample: `define view entity test as select from source
58220
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
58221
+ {
58222
+ field1,
58223
+ key id,
58224
+ _Assoc
58159
58225
  }`,
58160
- goodExample: `define view entity test as select from source
58161
- association [1..1] to target as _Assoc on _Assoc.id = source.id
58162
- {
58163
- key id,
58164
- field1,
58165
- _Assoc
58226
+ goodExample: `define view entity test as select from source
58227
+ association [1..1] to target as _Assoc on _Assoc.id = source.id
58228
+ {
58229
+ key id,
58230
+ field1,
58231
+ _Assoc
58166
58232
  }`,
58167
58233
  };
58168
58234
  }
@@ -58375,13 +58441,13 @@ class CDSNaming {
58375
58441
  key: "cds_naming",
58376
58442
  title: "CDS Naming",
58377
58443
  shortDescription: `Checks CDS naming conventions based on the VDM prefix rules`,
58378
- extendedInformation: `Validates that CDS entity names follow the expected prefix conventions:
58379
- I_ for interface views, C_ for consumption views, R_ for restricted reuse views,
58380
- P_ for private views, A_ for remote API views, X_ for view extends,
58381
- E_ for extension include views, F_ for derivation functions, D_ for abstract entities.
58382
-
58383
- Names must also start with Z after the prefix (custom namespace).
58384
-
58444
+ extendedInformation: `Validates that CDS entity names follow the expected prefix conventions:
58445
+ I_ for interface views, C_ for consumption views, R_ for restricted reuse views,
58446
+ P_ for private views, A_ for remote API views, X_ for view extends,
58447
+ E_ for extension include views, F_ for derivation functions, D_ for abstract entities.
58448
+
58449
+ Names must also start with Z after the prefix (custom namespace).
58450
+
58385
58451
  https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ee6ff9b281d8448f96b4fe6c89f2bdc8/8a8cee943ef944fe8936f4cc60ba9bc1.html`,
58386
58452
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Naming],
58387
58453
  badExample: `define view entity ZMY_VIEW as select from source { key id }`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.118.0",
3
+ "version": "2.118.1",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.118.0",
41
+ "@abaplint/core": "^2.118.1",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",
@@ -50,7 +50,7 @@
50
50
  "eslint": "^9.39.2",
51
51
  "glob": "^11.1.0",
52
52
  "json5": "^2.2.3",
53
- "memfs": "^4.56.11",
53
+ "memfs": "^4.57.1",
54
54
  "minimist": "^1.2.8",
55
55
  "mocha": "^11.7.5",
56
56
  "progress": "^2.0.3",