diff --git a/src/utils/Processing.ts b/src/utils/Processing.ts index 0f8083e5..4caa6d47 100644 --- a/src/utils/Processing.ts +++ b/src/utils/Processing.ts @@ -70,7 +70,7 @@ export const AUTOMATIC_DEPENDENCIES: AutomaticDependency[] = [ { packageId: 'hl7.terminology.r5', version: 'latest', - fhirVersions: ['R5'] + fhirVersions: ['R5', 'R6'] }, { packageId: 'hl7.fhir.uv.extensions.r4', @@ -80,7 +80,7 @@ export const AUTOMATIC_DEPENDENCIES: AutomaticDependency[] = [ { packageId: 'hl7.fhir.uv.extensions.r5', version: 'latest', - fhirVersions: ['R5'] + fhirVersions: ['R5', 'R6'] } ]; diff --git a/test/utils/Processing.test.ts b/test/utils/Processing.test.ts index 1aecc6af..0821f876 100644 --- a/test/utils/Processing.test.ts +++ b/test/utils/Processing.test.ts @@ -1339,6 +1339,19 @@ describe('Processing', () => { }); }); + it('should load each automatic dependency for FHIR R6 prerelease', () => { + const config = cloneDeep(minimalConfig); + config.dependencies = [{ packageId: 'hl7.fhir.us.core', version: '3.1.0' }]; + const defs = new FHIRDefinitions(); + return loadAutomaticDependencies('6.0.0-ballot2', config.dependencies, defs).then(() => { + expect(loadedPackages).toHaveLength(3); + expect(loadedPackages).toContain('hl7.fhir.uv.tools#current'); + expect(loadedPackages).toContain('hl7.terminology.r5#1.2.3-test'); + expect(loadedPackages).toContain('hl7.fhir.uv.extensions.r5#4.5.6-test'); + expect(loggerSpy.getAllMessages('warn')).toHaveLength(0); + }); + }); + it('should should use the package server query to get the terminology version', () => { // Change the version to 2.4.6-test just to be sure nock.removeInterceptor(termR4NockScope); @@ -1552,6 +1565,20 @@ describe('Processing', () => { }); }); + it('should load each automatic dependency for FHIR R6 prerelease from a custom registry', () => { + process.env.FPL_REGISTRY = 'https://custom-registry.example.org'; + const config = cloneDeep(minimalConfig); + config.dependencies = [{ packageId: 'hl7.fhir.us.core', version: '3.1.0' }]; + const defs = new FHIRDefinitions(); + return loadAutomaticDependencies('6.0.0-ballot2', config.dependencies, defs).then(() => { + expect(loadedPackages).toHaveLength(3); + expect(loadedPackages).toContain('hl7.fhir.uv.tools#current'); + expect(loadedPackages).toContain('hl7.terminology.r5#1.2.3-test'); + expect(loadedPackages).toContain('hl7.fhir.uv.extensions.r5#4.5.6-test'); + expect(loggerSpy.getAllMessages('warn')).toHaveLength(0); + }); + }); + it('should should use the package server query to get the terminology version', () => { process.env.FPL_REGISTRY = 'https://custom-registry.example.org'; // Change the version to 2.4.6-test just to be sure