From 4108be1a2f3234e3b3f474addc88458259119f7d Mon Sep 17 00:00:00 2001 From: "ytaek.kim" Date: Thu, 5 Oct 2023 18:31:12 +0900 Subject: [PATCH] feat(all): ready for release 0.6.1, fix(vscode): old git has no show-current option --- package-lock.json | 18 +++++++++--------- package.json | 2 +- packages/analysis-engine/package.json | 2 +- packages/view/package.json | 4 ++-- .../ClusterGraph/ClusterGraph.hook.tsx | 6 ++++-- .../ClusterGraph/ClusterGraph.tsx | 1 + packages/vscode/README.md | 4 ++++ packages/vscode/package.json | 4 ++-- packages/vscode/src/extension.ts | 11 +++++++++-- 9 files changed, 33 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9de92fed..b378810f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "githru-vscode-ext", - "version": "0.5.0", + "version": "0.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "githru-vscode-ext", - "version": "0.5.0", + "version": "0.6.0", "license": "MIT", "workspaces": [ "./packages/*" @@ -26167,7 +26167,7 @@ }, "packages/analysis-engine": { "name": "@githru-vscode-ext/analysis-engine", - "version": "0.5.0", + "version": "0.6.0", "license": "MIT", "dependencies": { "@octokit/core": "^4.0.4", @@ -26611,7 +26611,7 @@ }, "packages/view": { "name": "@githru-vscode-ext/view", - "version": "0.5.0", + "version": "0.6.0", "license": "MIT", "dependencies": { "@jest/types": "^29.6.3", @@ -26640,7 +26640,7 @@ "@babel/preset-react": "^7.22.15", "@babel/preset-typescript": "^7.22.15", "@babel/runtime": "^7.18.9", - "@githru-vscode-ext/analysis-engine": "^0.5.0", + "@githru-vscode-ext/analysis-engine": "^0.6.0", "@playwright/test": "^1.37.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "@svgr/webpack": "^8.0.1", @@ -28150,9 +28150,9 @@ }, "packages/vscode": { "name": "githru-vscode-ext", - "version": "0.5.0", + "version": "0.6.0", "dependencies": { - "@githru-vscode-ext/analysis-engine": "^0.5.0", + "@githru-vscode-ext/analysis-engine": "^0.6.0", "@octokit/rest": "^20.0.1", "node-fetch": "^3.3.2" }, @@ -30377,7 +30377,7 @@ "@babel/preset-react": "^7.22.15", "@babel/preset-typescript": "^7.22.15", "@babel/runtime": "^7.18.9", - "@githru-vscode-ext/analysis-engine": "^0.5.0", + "@githru-vscode-ext/analysis-engine": "^0.6.0", "@jest/types": "^29.6.3", "@playwright/test": "^1.37.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", @@ -39808,7 +39808,7 @@ "githru-vscode-ext": { "version": "file:packages/vscode", "requires": { - "@githru-vscode-ext/analysis-engine": "^0.5.0", + "@githru-vscode-ext/analysis-engine": "^0.6.0", "@octokit/rest": "^20.0.1", "@types/glob": "^7.2.0", "@types/mocha": "^9.1.1", diff --git a/package.json b/package.json index 815a5cb5..c55653a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "githru-vscode-ext", - "version": "0.6.0", + "version": "0.6.1", "description": "githru-vscode-ext root package.json", "scripts": { "build:all": "npm run build --workspaces", diff --git a/packages/analysis-engine/package.json b/packages/analysis-engine/package.json index 654fcb24..870b4fa0 100644 --- a/packages/analysis-engine/package.json +++ b/packages/analysis-engine/package.json @@ -1,6 +1,6 @@ { "name": "@githru-vscode-ext/analysis-engine", - "version": "0.6.0", + "version": "0.6.1", "description": "analysis-engine module for githru", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/packages/view/package.json b/packages/view/package.json index 1f1bcbd8..8b2a1ba0 100644 --- a/packages/view/package.json +++ b/packages/view/package.json @@ -1,6 +1,6 @@ { "name": "@githru-vscode-ext/view", - "version": "0.6.0", + "version": "0.6.1", "description": "view module for githru", "engines": { "node": ">=16", @@ -47,7 +47,7 @@ "@babel/preset-react": "^7.22.15", "@babel/preset-typescript": "^7.22.15", "@babel/runtime": "^7.18.9", - "@githru-vscode-ext/analysis-engine": "^0.6.0", + "@githru-vscode-ext/analysis-engine": "^0.6.1", "@playwright/test": "^1.37.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "@svgr/webpack": "^8.0.1", diff --git a/packages/view/src/components/VerticalClusterList/ClusterGraph/ClusterGraph.hook.tsx b/packages/view/src/components/VerticalClusterList/ClusterGraph/ClusterGraph.hook.tsx index 2dc10476..65616afd 100644 --- a/packages/view/src/components/VerticalClusterList/ClusterGraph/ClusterGraph.hook.tsx +++ b/packages/view/src/components/VerticalClusterList/ClusterGraph/ClusterGraph.hook.tsx @@ -42,19 +42,21 @@ const drawClusterGraph = ( export const useHandleClusterGraph = ({ data, + clusterSizes, selectedIndex, setSelectedData, }: { selectedIndex: number[]; + clusterSizes: number[]; data: ClusterNode[]; setSelectedData: Dispatch>; }) => { const svgRef = useRef(null); const prevSelected = useRef([-1]); - const clusterGraphElements = data.map((cluster) => ({ + const clusterGraphElements = data.map((cluster, i) => ({ cluster, - clusterSize: cluster.commitNodeList.length, + clusterSize: clusterSizes[i], selected: { prev: prevSelected.current, current: selectedIndex, diff --git a/packages/view/src/components/VerticalClusterList/ClusterGraph/ClusterGraph.tsx b/packages/view/src/components/VerticalClusterList/ClusterGraph/ClusterGraph.tsx index 96aa51f0..5437fa72 100644 --- a/packages/view/src/components/VerticalClusterList/ClusterGraph/ClusterGraph.tsx +++ b/packages/view/src/components/VerticalClusterList/ClusterGraph/ClusterGraph.tsx @@ -14,6 +14,7 @@ const ClusterGraph = () => { const svgRef = useHandleClusterGraph({ data, + clusterSizes, selectedIndex, setSelectedData, }); diff --git a/packages/vscode/README.md b/packages/vscode/README.md index 7d6708c8..f6d94308 100644 --- a/packages/vscode/README.md +++ b/packages/vscode/README.md @@ -33,6 +33,10 @@ Calling out known issues can help limit users opening duplicate issues against y ## Release Notes +### 0.6.1 +- subgraph +- launch one panel only + ### 0.6.0 - branch selector - reset github auth diff --git a/packages/vscode/package.json b/packages/vscode/package.json index bfb33085..91147138 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/githru/githru-vscode-ext", "type": "git" }, - "version": "0.6.0", + "version": "0.6.1", "engines": { "vscode": "^1.67.0" }, @@ -89,7 +89,7 @@ "test": "node ./out/test/runTest.js" }, "dependencies": { - "@githru-vscode-ext/analysis-engine": "^0.6.0", + "@githru-vscode-ext/analysis-engine": "^0.6.1", "@octokit/rest": "^20.0.1", "node-fetch": "^3.3.2" }, diff --git a/packages/vscode/src/extension.ts b/packages/vscode/src/extension.ts index 7fe0c631..284870bf 100644 --- a/packages/vscode/src/extension.ts +++ b/packages/vscode/src/extension.ts @@ -34,7 +34,7 @@ export async function activate(context: vscode.ExtensionContext) { const disposable = vscode.commands.registerCommand(COMMAND_LAUNCH, async () => { try { - console.debug(currentPanel); + console.debug("current Panel = ", currentPanel); if (currentPanel) { currentPanel.reveal(); return; @@ -55,7 +55,14 @@ export async function activate(context: vscode.ExtensionContext) { const fetchBranches = async () => await getBranches(gitPath, currentWorkspacePath); const fetchCurrentBranch = async () => { - let branchName = await getCurrentBranchName(gitPath, currentWorkspacePath); + + let branchName; + try { + branchName = await getCurrentBranchName(gitPath, currentWorkspacePath) + } catch (error) { + console.error(error); + } + if (!branchName) { const branchList = (await fetchBranches()).branchList; branchName = getDefaultBranchName(branchList);