8000 refactor: use confbox for yaml parsing · unjs/changelogen@19e940c · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 19e940c

Browse files
committed
refactor: use confbox for yaml parsing
1 parent 49e0401 commit 19e940c

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
},
3232
"dependencies": {
3333
"c12": "3.0.1",
34+
"confbox": "^0.1.8",
3435
"consola": "^3.4.0",
3536
"convert-gitmoji": "^0.1.5",
3637
"mri": "^1.2.0",
@@ -41,8 +42,7 @@
4142
"pkg-types": "^2.0.0",
4243
"scule": "^1.3.0",
4344
"semver": "^7.7.1",
44-
"std-env": "^3.8.0",
45-
"yaml": "^2.7.0"
45+
"std-env": "^3.8.0"
4646
},
4747
"devDependencies": {
4848
"@types/node": "^22.13.5",

pnpm-lock.yaml

Lines changed: 3 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export async function resolveGithubToken(config: ResolvedChangelogConfig) {
129129
const ghCLIPath = join(configHome, "gh", "hosts.yml");
130130
if (existsSync(ghCLIPath)) {
131131
const yamlContents = await fsp.readFile(ghCLIPath, "utf8");
132-
const parseYAML = await import("yaml").then((r) => r.parse);
132+
const { parseYAML } = await import("confbox/yaml");
133133
const ghCLIConfig = parseYAML(yamlContents);
134134
if (ghCLIConfig && ghCLIConfig[config.repo.domain]) {
135135
return ghCLIConfig["github.com"].oauth_token;

0 commit comments

Comments
 (0)
0