@scm-manager/ui-api 2.32.1 → 2.32.2-20220214-095953
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/branches.ts +2 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scm-manager/ui-api",
|
|
3
|
-
"version": "2.32.
|
|
3
|
+
"version": "2.32.2-20220214-095953",
|
|
4
4
|
"description": "React hook api for the SCM-Manager backend",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"react-test-renderer": "^17.0.1"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@scm-manager/ui-types": "^2.32.
|
|
28
|
+
"@scm-manager/ui-types": "^2.32.2-20220214-095953",
|
|
29
29
|
"fetch-mock-jest": "^1.5.1",
|
|
30
30
|
"gitdiff-parser": "^0.1.2",
|
|
31
31
|
"query-string": "6.14.1",
|
package/src/branches.ts
CHANGED
|
@@ -47,7 +47,7 @@ export const useBranches = (repository: Repository): ApiResult<BranchCollection>
|
|
|
47
47
|
() => apiClient.get(link).then(response => response.json()),
|
|
48
48
|
{
|
|
49
49
|
onSuccess: () => {
|
|
50
|
-
return queryClient.invalidateQueries(
|
|
50
|
+
return queryClient.invalidateQueries(branchDetailsQueryKey(repository));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
// we do not populate the cache for a single branch,
|
|
@@ -79,10 +79,7 @@ function chunkBranches(branches: Branch[]) {
|
|
|
79
79
|
return chunks;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
const branchDetailsQueryKey = (
|
|
83
|
-
repository: NamespaceAndName,
|
|
84
|
-
branch: string | undefined = undefined
|
|
85
|
-
) => {
|
|
82
|
+
const branchDetailsQueryKey = (repository: NamespaceAndName, branch: string | undefined = undefined) => {
|
|
86
83
|
let branchName;
|
|
87
84
|
if (!branch) {
|
|
88
85
|
branchName = "_";
|