fix bug in package version detection

This commit is contained in:
Grahame Grieve 2024-06-07 04:21:07 +10:00
parent 7833281a52
commit 3963e13e58
1 changed files with 3 additions and 2 deletions

View File

@ -958,7 +958,8 @@ public class NpmPackage {
public String fhirVersion() {
if ("hl7.fhir.core".equals(npm.asString("name")))
return npm.asString("version");
else if ("fhir.core".equals(npm.asString("type")) &&
else if (
Utilities.existsInList(npm.asString("type"), "fhir.core", "fhir.examples") &&
Utilities.startsWithInList( npm.asString("name"), "hl7.fhir.r2.", "hl7.fhir.r2b.", "hl7.fhir.r3.",
"hl7.fhir.r4.", "hl7.fhir.r4b.", "hl7.fhir.r5.")) {
return npm.asString("version");