Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(all): ready for release 0.6.1 #510

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading