@abaplint/core 2.95.3 → 2.95.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.
@@ -784,7 +784,7 @@ declare class ChapterOfBookStructure extends AbstractObject {
784
784
  declare class CharacterType extends AbstractType {
785
785
  private readonly length;
786
786
  constructor(length: number, extra?: AbstractTypeData);
787
- cloneType(qualifiedName?: string): CharacterType;
787
+ cloneType(qualifiedName?: string, ddicName?: string): CharacterType;
788
788
  getLength(): number;
789
789
  toText(): string;
790
790
  toABAP(): string;
@@ -1579,7 +1579,6 @@ declare class Documentation extends AbstractObject {
1579
1579
 
1580
1580
  declare class Domain extends AbstractObject {
1581
1581
  private parsedXML;
1582
- private parsedType;
1583
1582
  getType(): string;
1584
1583
  getDescription(): string | undefined;
1585
1584
  getConversionExit(): string | undefined;
@@ -10,9 +10,14 @@ class CharacterType extends _abstract_type_1.AbstractType {
10
10
  }
11
11
  this.length = length;
12
12
  }
13
- cloneType(qualifiedName) {
13
+ cloneType(qualifiedName, ddicName) {
14
14
  const clone = Object.assign({}, this.getAbstractTypeData()) || {};
15
- clone.qualifiedName = qualifiedName;
15
+ if (qualifiedName) {
16
+ clone.qualifiedName = qualifiedName;
17
+ }
18
+ if (ddicName) {
19
+ clone.ddicName = ddicName;
20
+ }
16
21
  return new CharacterType(this.length, clone);
17
22
  }
18
23
  getLength() {
@@ -25,19 +25,19 @@ class Domain extends _abstract_object_1.AbstractObject {
25
25
  }
26
26
  setDirty() {
27
27
  this.parsedXML = undefined;
28
- this.parsedType = undefined;
29
28
  super.setDirty();
30
29
  }
31
30
  parseType(reg, dataElement) {
32
- if (this.parsedType) {
33
- return this.parsedType;
31
+ // dont cache the DOMA parsed type, they are cached on DTEL level
32
+ // also note that the type carries the name of the DTEL
33
+ if (this.parsedXML === undefined) {
34
+ this.parse();
34
35
  }
35
- else if (this.parsedXML === undefined) {
36
+ if (this.parsedXML === undefined) {
36
37
  return new Types.UnknownType("Domain " + this.getName() + " parser error", this.getName());
37
38
  }
38
39
  const ddic = new ddic_1.DDIC(reg);
39
- this.parsedType = ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, this.getName(), dataElement, this.parsedXML.conversionExit, dataElement);
40
- return this.parsedType;
40
+ return ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, this.getName(), dataElement, this.parsedXML.conversionExit, dataElement);
41
41
  }
42
42
  parse() {
43
43
  var _a, _b, _c, _d, _e, _f, _g;
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.95.3";
66
+ return "2.95.4";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.95.3",
3
+ "version": "2.95.4",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "homepage": "https://abaplint.org",
49
49
  "devDependencies": {
50
- "@microsoft/api-extractor": "^7.33.7",
50
+ "@microsoft/api-extractor": "^7.33.8",
51
51
  "@types/chai": "^4.3.4",
52
52
  "@types/mocha": "^10.0.1",
53
53
  "@types/node": "^18.11.18",