Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit eebd645

Browse files
authored
Merge branch 'main' into tsdown
2 parents abca1b2 + aa365e4 commit eebd645

File tree

12 files changed

+16
-24
lines changed

12 files changed

+16
-24
lines changed

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151
"import": "./dist/exports/dayjs.js",
5252
"require": "./dist/exports/dayjs.cjs"
5353
},
54-
"./lodash": {
55-
"types": "./dist/exports/lodash.d.ts",
56-
"import": "./dist/exports/lodash.js",
57-
"require": "./dist/exports/lodash.cjs"
58-
}
5954
},
6055
"main": "./dist/index.js",
6156
"types": "./dist/index.d.ts",
@@ -91,9 +86,9 @@
9186
"https-proxy-agent": "^7.0.6",
9287
"jsonwebtoken": "^9.0.2",
9388
"language-colors": "^2.1.55",
94-
"lodash": "npm:@candriajs/[email protected]",
9589
"markdown-it": "^14.1.0",
9690
"markdown-it-emoji": "^3.0.0",
91+
"radash": "^12.1.1",
9792
"simple-git": "npm:@candriajs/simple-git@^1.0.2",
9893
"socks-proxy-agent": "^8.0.5",
9994
"uuid": "^11.1.0"

src/common/npm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'node:path'
22

3-
import { isEmpty, isObject, isString } from 'lodash'
3+
import { isEmpty, isObject, isString } from 'radash'
44

55
import {
66
exec,

src/exports/lodash.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/models/platform/github/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { capitalize, isEmpty } from 'lodash'
1+
import { capitalize, isEmpty } from 'radash'
22

33
import {
44
FailedRevokeAppAccrssTokenMsg,

src/models/platform/github/commit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { capitalize, isEmpty } from 'lodash'
1+
import { capitalize, isEmpty } from 'radash'
22

33
import {
44
CommitNotFoundMsg,

src/models/platform/github/issue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isEmpty } from 'lodash'
1+
import { isEmpty } from 'radash'
22

33
import {
44
FailedtoLockIssueMsg,

src/models/platform/github/org.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isEmpty } from 'lodash'
1+
import { isEmpty } from 'radash'
22

33
import {
44
FailedToRemoveOrgMemberMsg,

src/models/platform/github/pull_request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isEmpty } from 'lodash'
1+
import { isEmpty } from 'radash'
22

33
import {
44
ConflictPullRequestShaValueMsg,

src/models/platform/github/release.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { capitalize, isEmpty } from 'lodash'
1+
import { capitalize, isEmpty } from 'radash'
22

33
import {
44
DeleteReleaseSuccessMsg,

src/models/platform/github/repo.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isEmpty } from 'lodash'
1+
import { isEmpty, tryit } from 'radash'
22

33
import {
44
FailedToRemoveCollaboratorMsg,
@@ -892,12 +892,13 @@ export class Repo extends GitHubClient {
892892
if (!options.owner || !options.repo) throw new Error(MissingRepoOwnerOrNameMsg)
893893
try {
894894
const { owner, repo } = options
895+
const github_url = get_base_url(this.type, { proxyType: ProxyType.Original }) + '/' + owner + '/' + repo
895896
let default_branch
896-
try {
897-
const github_url = get_base_url(this.type, { proxyType: ProxyType.Original }) + '/' + owner + '/' + repo
898-
default_branch = await get_remote_repo_default_branch(github_url)
899-
} catch (error) {
897+
const [error, response] = await tryit(get_remote_repo_default_branch)(github_url)
898+
if (error) {
900899
default_branch = (await this.get_repo_info({ owner, repo })).data.default_branch
900+
} else {
901+
default_branch = response
901902
}
902903

903904
return default_branch

0 commit comments

Comments
 (0)