Skip to content

Commit

Permalink
Merge pull request #510 from ytaek/main
Browse files Browse the repository at this point in the history
feat(all): ready for release 0.6.1
  • Loading branch information
ytaek committed Oct 5, 2023
2 parents cda09ad + 4108be1 commit f333df5
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 19 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 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",
Expand Down
2 changes: 1 addition & 1 deletion 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",
Expand Down
4 changes: 2 additions & 2 deletions 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",
Expand Down Expand Up @@ -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",
Expand Down
Expand Up @@ -42,19 +42,21 @@ const drawClusterGraph = (

export const useHandleClusterGraph = ({
data,
clusterSizes,
selectedIndex,
setSelectedData,
}: {
selectedIndex: number[];
clusterSizes: number[];
data: ClusterNode[];
setSelectedData: Dispatch<React.SetStateAction<ClusterNode[]>>;
}) => {
const svgRef = useRef<SVGSVGElement>(null);
const prevSelected = useRef<number[]>([-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,
Expand Down
Expand Up @@ -14,6 +14,7 @@ const ClusterGraph = () => {

const svgRef = useHandleClusterGraph({
data,
clusterSizes,
selectedIndex,
setSelectedData,
});
Expand Down
4 changes: 4 additions & 0 deletions packages/vscode/README.md
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode/package.json
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down
11 changes: 9 additions & 2 deletions packages/vscode/src/extension.ts
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit f333df5

Please sign in to comment.