Skip to content

Commit f79c1fb

Browse files
Release/0.9.7 (#181)
* bump version to 0.9.7 * add extension version details to test case results and status bar hover tool-tip * update test config file * fix issue with library name resolution * update change log * fix issue with version testing
1 parent 4c345ff commit f79c1fb

10 files changed

Lines changed: 72 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33

44

55

6+
7+
## v0.9.7 (prerelease)
8+
9+
Date: 2026-06-25
10+
11+
* fix issue with library name resolution
12+
* update test config file
13+
* add extension version details to test case results and status bar hover tool-tip
14+
* bump version to 0.9.7
15+
16+
617
## v0.9.6 (prerelease)
718

819
Date: 2026-06-13

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cql",
3-
"version": "0.9.6",
3+
"version": "0.9.7",
44
"displayName": "Clinical Quality Language (CQL)",
55
"description": "Syntax highlighting, linting, and execution for the HL7 Clinical Quality Language (CQL) for VS Code",
66
"publisher": "cqframework",
@@ -836,7 +836,7 @@
836836
"cql-language-server": {
837837
"groupId": "org.opencds.cqf.cql.ls",
838838
"artifactId": "cql-ls-server",
839-
"version": "4.8.0"
839+
"version": "4.9.0"
840840
}
841841
},
842842
"devDependencies": {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"testCasesToExclude": [],
3-
"resultFormat": "flat"
3+
"resultFormat": "individual",
4+
"flatResultsInSubfolder": false
45
}

src/__test__/suite/commands/execute-cql-file.test.ts

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,30 +248,34 @@ suite('writeIndividualResultFiles()', () => {
248248
results: [{ libraryName: 'MyLib', expressions: [{ name: 'IPP', value: '[]' }] }],
249249
logs: [],
250250
versions: {
251+
extension: '0.9.7',
251252
translator: '4.9.0',
252253
engine: '4.9.0',
253-
clinicalReasoning: '4.7.0',
254-
languageServer: '4.8.0',
254+
clinicalReasoning: '4.8.0',
255+
languageServer: '4.9.0',
255256
},
256257
};
257258
writeIndividualResultFiles('MyLib', undefined, [{ name: 'p1' }], response, Uri.file(tmpDir), Date.now());
258259
const result = readResult('MyLib', 'p1');
259260
expect(result.versions).to.deep.equal({
261+
extension: '0.9.7',
260262
translator: '4.9.0',
261263
engine: '4.9.0',
262-
clinicalReasoning: '4.7.0',
263-
languageServer: '4.8.0',
264+
clinicalReasoning: '4.8.0',
265+
languageServer: '4.9.0',
264266
});
265267
});
266268

267-
test('omits versions from JSON output when not present in response', () => {
269+
test('omits dependency version info from JSON output when not present in response', () => {
268270
const response: ExecuteCqlResponse = {
269271
results: [{ libraryName: 'MyLib', expressions: [{ name: 'IPP', value: '[]' }] }],
270272
logs: [],
271273
};
272274
writeIndividualResultFiles('MyLib', undefined, [{ name: 'p1' }], response, Uri.file(tmpDir), Date.now());
273275
const result = readResult('MyLib', 'p1');
274-
expect(result.versions).to.be.undefined;
276+
expect(result.versions).to.be.deep.equal({
277+
extension: '0.9.7',
278+
});
275279
});
276280

277281
test('overwrites existing file on re-run', () => {
@@ -291,4 +295,22 @@ suite('writeIndividualResultFiles()', () => {
291295
const result = readResult('MyLib', 'p1');
292296
expect(result.results[0].value).to.equal('[]');
293297
});
298+
299+
// Regression: a hyphenated library name (e.g. SUR716-011Assertion) must not
300+
// be truncated at the first hyphen. The output directory and the libraryName
301+
// field in the JSON must use the full name.
302+
test('writes result files under full hyphenated library name, not truncated at first hyphen', () => {
303+
const libraryName = 'SUR716-011Assertion';
304+
const response: ExecuteCqlResponse = {
305+
results: [{ libraryName, expressions: [{ name: 'IPP', value: '[]' }] }],
306+
logs: [],
307+
};
308+
309+
writeIndividualResultFiles(libraryName, undefined, [{ name: 'p1' }], response, Uri.file(tmpDir), Date.now());
310+
311+
expect(fs.existsSync(path.join(tmpDir, 'SUR716-011Assertion', 'TestCaseResult-p1.json'))).to.be.true;
312+
expect(fs.existsSync(path.join(tmpDir, 'SUR716', 'TestCaseResult-p1.json'))).to.be.false;
313+
const result = readResult('SUR716-011Assertion', 'p1');
314+
expect(result.libraryName).to.equal('SUR716-011Assertion');
315+
});
294316
});

src/commands/execute-cql-file.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ import { CqlSolution } from '../model/cqlSolution';
2727
import { CqlParametersConfig, ParameterEntry, ResultParameterEntry } from '../model/parameters';
2828
import { getMeasureReportData, getTestCases, TestCase } from '../model/testCase';
2929
import { VersionInfo } from '../protocol';
30+
import { getExtensionVersion } from '../extensionState';
31+
32+
export interface VersionInfoWithExtension extends VersionInfo {
33+
extension?: string;
34+
}
3035

3136
export interface TestCaseResult {
3237
executedAt: string;
@@ -36,7 +41,7 @@ export interface TestCaseResult {
3641
parameters: ResultParameterEntry[];
3742
results: ExpressionResult[];
3843
errors: string[];
39-
versions?: VersionInfo;
44+
versions?: VersionInfoWithExtension;
4045
}
4146

4247
export function register(context: ExtensionContext): void {
@@ -68,7 +73,7 @@ export async function executeCQLFile(
6873
return;
6974
}
7075

71-
const libraryName = Utils.basename(cqlFileUri).replace('.cql', '').split('-')[0];
76+
const libraryName = Utils.basename(cqlFileUri).replace('.cql', '');
7277
const libraryDisplayName = Utils.basename(cqlFileUri).replace('.cql', '');
7378
const testConfig = loadTestConfig(cqlPaths.testConfigPath);
7479
const excludedTestCases = getExcludedTestCases(libraryName, testConfig.testCasesToExclude);
@@ -266,6 +271,7 @@ function generateTextReport(
266271
const lines: string[] = [];
267272

268273
lines.push(`CQL: ${cqlPaths.libraryDirectoryPath.fsPath}`);
274+
lines.push(`Extension version: ${getExtensionVersion()}`);
269275

270276
// Map system variations cleanly via configuration definitions
271277
if (response.versions) {
@@ -374,7 +380,9 @@ export function writeIndividualResultFiles(
374380
parameters,
375381
results,
376382
errors,
377-
versions: response.versions,
383+
versions: {
384+
extension: getExtensionVersion(),
385+
...response.versions},
378386
};
379387

380388
const patientId = testCaseName ?? 'no-context';

src/commands/select-test-cases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function selectTestCases(cqlFileUri: Uri): Promise<void> {
2828
}
2929

3030
const quickPick = window.createQuickPick();
31-
const libraryName = Utils.basename(cqlFileUri).replace('.cql', '').split('-')[0];
31+
const libraryName = Utils.basename(cqlFileUri).replace('.cql', '');
3232
const testConfig = loadTestConfig(cqlPaths.testConfigPath);
3333
const excludedTestCases = getExcludedTestCases(libraryName, testConfig.testCasesToExclude);
3434
const testCases = getTestCases(

src/cql-service/cqlService.executeCql.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import { CqlParametersConfig } from '../model/parameters';
77
import { resolveParameters } from '../helpers/parametersHelper';
88
import { extractLibraryVersion } from '../helpers/fileHelper';
99
import { TestCase } from '../model/testCase';
10-
import { VersionInfo } from '../protocol';
10+
import { VersionInfoWithExtension } from '../commands/execute-cql-file';
1111

1212
export interface ExecuteCqlResponse {
1313
results: LibraryResult[];
1414
logs: string[];
15-
versions?: VersionInfo;
15+
versions?: VersionInfoWithExtension;
1616
}
1717

1818
export interface LibraryResult {

src/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { ClientStatus } from './extension.api';
2626
import * as requirements from './java-support/requirements';
2727
import * as log from './log-services/logger';
2828
import { statusBar } from './statusBar';
29+
import { setExtensionVersion } from './extensionState';
2930

3031
export const EXTENSION_NAME = 'Language Support for CQL';
3132

@@ -86,6 +87,9 @@ function getStorageUri(context: ExtensionContext): Uri {
8687
export function activate(context: ExtensionContext): Promise<void> {
8788
const storageUri = getStorageUri(context);
8889
const outputChannel = log.initialize(Uri.joinPath(storageUri, 'logs'), EXTENSION_NAME);
90+
91+
setExtensionVersion(context.extension.packageJSON.version);
92+
8993
if (workspace.workspaceFolders && workspace.workspaceFolders.length > 0) {
9094
new CqlExplorer(context);
9195
}

src/extensionState.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
let extensionVersion: string = '0.0.0';
2+
3+
export function setExtensionVersion(version: string) {
4+
extensionVersion = version;
5+
}
6+
7+
export function getExtensionVersion(): string {
8+
return extensionVersion;
9+
}

src/statusBar.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { MarkdownString, StatusBarAlignment, StatusBarItem, window } from 'vscode';
22
import { Disposable } from 'vscode-languageclient';
33
import { VersionInfo } from './protocol';
4+
import { getExtensionVersion } from './extensionState';
45

56
class StatusBar implements Disposable {
67
private statusBarItem: StatusBarItem;
@@ -32,6 +33,7 @@ class StatusBar implements Disposable {
3233
public setReady(version?: string, componentVersions?: VersionInfo): void {
3334
this.statusBarItem.text = StatusIcon.Ready;
3435
const tooltip = new MarkdownString(StatusTooltip.Ready);
36+
tooltip.appendMarkdown(`\n\nExtension: ${getExtensionVersion()}`)
3537
if (componentVersions) {
3638
if (componentVersions.translator) tooltip.appendMarkdown(`\n\nTranslator: ${componentVersions.translator}`);
3739
if (componentVersions.engine) tooltip.appendMarkdown(`\n\nEngine: ${componentVersions.engine}`);

0 commit comments

Comments
 (0)