@accordproject/concerto-core
Advanced tools
Comparing version 3.16.7-20240321150142 to 3.16.7-20240418124700
/*! | ||
* Concerto v3.16.7-20240321150142 | ||
* Concerto v3.16.7-20240418124700 | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
@@ -4,0 +4,0 @@ * you may not use this file except in compliance with the License. |
@@ -72,7 +72,5 @@ /* | ||
validate() { | ||
if (!ModelUtil.isPrimitiveType(this.type)) { | ||
const decl = this.modelFile.getType(this.ast.type.name); | ||
// All but StringScalar & DateTimeScalar are unsupported. | ||
if (!ModelUtil.isValidMapKeyScalar(decl)) { | ||
@@ -83,8 +81,2 @@ throw new IllegalModelException( | ||
} | ||
if (decl?.isConcept?.() || decl?.isClassDeclaration?.()) { | ||
throw new IllegalModelException( | ||
`Invalid Map key type in MapDeclaration ${this.parent.name}. Only String and DateTime types are supported for Map key types` | ||
); | ||
} | ||
} | ||
@@ -100,4 +92,3 @@ } | ||
processType(ast) { | ||
let decl; | ||
switch(this.ast.$class) { | ||
switch(ast.$class) { | ||
case `${MetaModelNamespace}.DateTimeMapKeyType`: | ||
@@ -104,0 +95,0 @@ this.type = 'DateTime'; |
@@ -319,5 +319,4 @@ /* | ||
static isValidMapKeyScalar(decl) { | ||
return (decl?.isScalarDeclaration?.() && | ||
(decl?.ast.$class !== `${MetaModelNamespace}.StringScalar` || | ||
decl?.ast.$class !== `${MetaModelNamespace}.DateTimeScalar`)); | ||
return (decl?.isScalarDeclaration?.() && decl?.ast.$class === `${MetaModelNamespace}.StringScalar`) || | ||
(decl?.isScalarDeclaration?.() && decl?.ast.$class === `${MetaModelNamespace}.DateTimeScalar`); | ||
} | ||
@@ -324,0 +323,0 @@ |
{ | ||
"name": "@accordproject/concerto-core", | ||
"version": "3.16.7-20240321150142", | ||
"version": "3.16.7-20240418124700", | ||
"description": "Core Implementation for the Concerto Modeling Language", | ||
@@ -74,5 +74,5 @@ "homepage": "https://github.com/accordproject/concerto", | ||
"dependencies": { | ||
"@accordproject/concerto-cto": "3.16.7-20240321150142", | ||
"@accordproject/concerto-cto": "3.16.7-20240418124700", | ||
"@accordproject/concerto-metamodel": "3.9.1", | ||
"@accordproject/concerto-util": "3.16.7-20240321150142", | ||
"@accordproject/concerto-util": "3.16.7-20240418124700", | ||
"dayjs": "1.11.10", | ||
@@ -79,0 +79,0 @@ "debug": "4.3.4", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1507191
15049
+ Added@accordproject/concerto-cto@3.16.7-20240418124700(transitive)
+ Added@accordproject/concerto-util@3.16.7-20240418124700(transitive)
- Removed@accordproject/concerto-cto@3.16.7-20240321150142(transitive)
- Removed@accordproject/concerto-util@3.16.7-20240321150142(transitive)