From 2f56b7c2cdba1e57b27e59f1c8e0987583cb55d1 Mon Sep 17 00:00:00 2001 From: huangjien Date: Tue, 4 Jun 2024 08:48:52 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20replace=20truncate=20with?= =?UTF-8?q?=20rm=20in=20fs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit truncate just remove the content of file. should use rm. --- CHANGELOG.md | 2 +- package.json | 8 ++++---- src/panels/JenkinsPanel.ts | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 196692f..434aa4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [v0.2.20] +## [v0.2.21] ### New Feature diff --git a/package.json b/package.json index 7829f9d..f2c19f5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "jenkins-log-reader", "displayName": "jenkins-log-reader", "description": "read jenkins log, analyse with local AI.", - "version": "0.2.20", + "version": "0.2.21", "engines": { "vscode": "^1.89.0" }, @@ -138,11 +138,11 @@ "@commitlint/config-conventional": "^19.2.2", "@types/glob": "^8.0.0", "@types/mocha": "^10.0.6", - "@types/node": "20.14.0", + "@types/node": "20.14.1", "@types/vscode": "^1.89.0", "@types/vscode-webview": "^1.57.5", - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", + "@typescript-eslint/eslint-plugin": "^7.12.0", + "@typescript-eslint/parser": "^7.12.0", "@vscode/test-cli": "^0.0.9", "@vscode/test-electron": "^2.4.0", "auto-changelog": "^2.4.0", diff --git a/src/panels/JenkinsPanel.ts b/src/panels/JenkinsPanel.ts index 5181e1d..58d59ca 100644 --- a/src/panels/JenkinsPanel.ts +++ b/src/panels/JenkinsPanel.ts @@ -73,7 +73,7 @@ export class JenkinsPanel {
-

Jenkins Instance

+

Jenkins Instance

Refresh
@@ -124,7 +124,7 @@ export class JenkinsPanel {
-

Jobs - Builds

+

Jobs - Builds

Batch
@@ -336,7 +336,7 @@ export class JenkinsPanel { private async writeResolveFile(hash: string, log: any, analysis: any) { if (fs.existsSync(JenkinsPanel.storagePath + "/analysed/" + hash)) { - fs.truncateSync(JenkinsPanel.storagePath + "/analysed/" + hash); + fs.rmSync(JenkinsPanel.storagePath + "/analysed/" + hash); } fs.writeFileSync( JenkinsPanel.storagePath + "/" + hash,