diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38202601..a5bd7bf4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -104,7 +104,7 @@ jobs: create-release: needs: [ 'test' ] runs-on: ubuntu-latest - if: ${{ github.head_ref == 'main' && github.event_name != 'pull_request_target' && github.event_name == 'pull_request'}} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} steps: - uses: actions/checkout@v6 with: diff --git a/scripts/package.sh b/scripts/package.sh index 379d361e..c3acc39a 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -14,9 +14,7 @@ initialize () { fi PACKAGE_VERSION=$(jq -r '.version' package.json) - log_it "PACKAGE_VERSION=$PACKAGE_VERSION" PATCH=${PACKAGE_VERSION##*.} - log_it "PATCH_VERSION=$PATCH" if [ "$((PATCH % 2))" = "1" ]; then log_it "version patch component is odd. packaging as prerelease. (PATCH=$PATCH)" PRERELEASE=true diff --git a/src/DebugListingPreview.ts b/src/DebugListingPreview.ts index 9c59972f..33120862 100644 --- a/src/DebugListingPreview.ts +++ b/src/DebugListingPreview.ts @@ -236,7 +236,7 @@ export class DebugListingContentProvider implements TextDocumentContentProvider this.debugListingUriMap.set(debugListingPreviewUri.fsPath, debugListingUri) this.sourceUriMap.set(debugListingPreviewUri.fsPath, sourceUri) - if (!this.previewEditor || this.previewEditor.document.uri.fsPath !== debugListingPreviewUri.fsPath) { + if (this.previewEditor?.document.uri.fsPath !== debugListingPreviewUri.fsPath) { this.previewEditor = await window.showTextDocument(debugListingPreviewUri, { viewColumn: this.previewEditor?.viewColumn ?? ViewColumn.Beside, preview: true, diff --git a/src/FileUtils.ts b/src/FileUtils.ts index 16b73c49..0220371a 100644 --- a/src/FileUtils.ts +++ b/src/FileUtils.ts @@ -130,7 +130,7 @@ export function toUri (path: string | Uri, base?: string | Uri): Uri { if (base) { return Uri.joinPath(toUri(base), path) } - if (workspace.workspaceFolders && workspace.workspaceFolders.length === 1) { + if (workspace.workspaceFolders?.length === 1) { return Uri.joinPath(workspace.workspaceFolders[0].uri, path) } throw new Error('No basedir provided for relative path: ' + path) diff --git a/src/parse/OpenedgeProjectParser.ts b/src/parse/OpenedgeProjectParser.ts index 4e2d65b9..63ed8f4f 100644 --- a/src/parse/OpenedgeProjectParser.ts +++ b/src/parse/OpenedgeProjectParser.ts @@ -311,7 +311,7 @@ function loadConfigFile (uri: Uri): IOpenEdgeMainConfig | undefined { const cachedConfig = configMap.get(uri.fsPath) const configModifiedTime = FileUtils.getFileModifiedTime(uri) - if (cachedConfig && cachedConfig.modifiedTime.valueOf() === configModifiedTime.valueOf()) { + if (cachedConfig?.modifiedTime.valueOf() === configModifiedTime.valueOf()) { log.debug('found cached OpenEdge project config for ' + uri.fsPath) return cachedConfig } diff --git a/src/parse/ResultsParser.ts b/src/parse/ResultsParser.ts index bf7c0aa9..44e00d47 100644 --- a/src/parse/ResultsParser.ts +++ b/src/parse/ResultsParser.ts @@ -171,7 +171,7 @@ export class ABLResultsParser { errors: Number(res[idx].$.errors), failures: Number(res[idx].$.failures), skipped: Number(res[idx].$.skipped ?? 0), - time: Number(res[idx].$.time * 1000), + time: Number(res[idx].$.time) * 1000, properties: this.parseProperties(res[idx].properties), testsuite: testsuite, testcases: testcases