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

Commit 7b77107

Browse files
committed
Merge branch 'main' into tsdown
2 parents abca1b2 + aa365e4 commit 7b77107

13 files changed

Lines changed: 25 additions & 31 deletions

File tree

package.json

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,42 +22,37 @@
2222
"type": "module",
2323
"exports": {
2424
".": {
25-
"import": "./dist/index.js",
25+
"import": "./dist/index.mjs",
2626
"types": "./dist/index.d.ts",
2727
"require": "./dist/index.cjs"
2828
},
2929
"./markdown": {
30-
"import": "./dist/exports/markdown.js",
30+
"import": "./dist/exports/markdown.mjs",
3131
"types": "./dist/exports/markdown.d.ts",
3232
"require": "./dist/exports/markdown.cjs"
3333
},
3434
"./exec": {
3535
"types": "./dist/exports/exec.d.ts",
36-
"import": "./dist/exports/exec.js",
36+
"import": "./dist/exports/exec.mjs",
3737
"require": "./dist/exports/exec.cjs"
3838
},
3939
"./axios": {
4040
"types": "./dist/exports/axios.d.ts",
41-
"import": "./dist/exports/axios.js",
41+
"import": "./dist/exports/axios.mjs",
4242
"require": "./dist/exports/axios.cjs"
4343
},
4444
"./simple-git": {
4545
"types": "./dist/exports/simple-git.d.ts",
46-
"import": "./dist/exports/simple-git.js",
46+
"import": "./dist/exports/simple-git.mjs",
4747
"require": "./dist/exports/simple-git.cjs"
4848
},
4949
"./dayjs": {
5050
"types": "./dist/exports/dayjs.d.ts",
51-
"import": "./dist/exports/dayjs.js",
51+
"import": "./dist/exports/dayjs.mjs",
5252
"require": "./dist/exports/dayjs.cjs"
53-
},
54-
"./lodash": {
55-
"types": "./dist/exports/lodash.d.ts",
56-
"import": "./dist/exports/lodash.js",
57-
"require": "./dist/exports/lodash.cjs"
5853
}
5954
},
60-
"main": "./dist/index.js",
55+
"main": "./dist/index.mjs",
6156
"types": "./dist/index.d.ts",
6257
"files": [
6358
"dist/*",
@@ -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/lodash@1.0.7",
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)