Skip to content

Commit 5e0d7da

Browse files
authored
chore: replace debug with obug (#5030)
1 parent b8f3c46 commit 5e0d7da

File tree

6 files changed

+33
-27
lines changed

6 files changed

+33
-27
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
"@rollup/plugin-node-resolve": "^16.0.3",
132132
"@rollup/plugin-replace": "^6.0.3",
133133
"@types/cross-spawn": "^6.0.6",
134-
"@types/debug": "^4.1.12",
135134
"@types/fs-extra": "^11.0.4",
136135
"@types/lodash.template": "^4.5.3",
137136
"@types/mark.js": "^8.11.12",
@@ -146,7 +145,6 @@
146145
"conventional-changelog": "^7.1.1",
147146
"conventional-changelog-angular": "^8.1.0",
148147
"cross-spawn": "^7.0.6",
149-
"debug": "^4.4.3",
150148
"esbuild": "^0.25.12",
151149
"execa": "^9.6.0",
152150
"fs-extra": "^11.3.2",
@@ -165,6 +163,7 @@
165163
"markdown-it-mathjax3": "^4.3.2",
166164
"minimist": "^1.2.8",
167165
"nanoid": "^5.1.6",
166+
"obug": "^2.0.0",
168167
"ora": "^9.0.0",
169168
"oxc-minify": "^0.98.0",
170169
"p-map": "^7.0.4",

pnpm-lock.yaml

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

src/node/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import _debug from 'debug'
1+
import { createDebug } from 'obug'
22
import fs from 'fs-extra'
33
import path from 'node:path'
44
import c from 'picocolors'
@@ -29,7 +29,7 @@ export { resolvePages } from './plugins/dynamicRoutesPlugin'
2929
export { resolveSiteDataByRoute } from './shared'
3030
export * from './siteConfig'
3131

32-
const debug = _debug('vitepress:config')
32+
const debug = createDebug('vitepress:config')
3333

3434
const resolve = (root: string, file: string) =>
3535
normalizePath(path.resolve(root, `.vitepress`, file))

src/node/markdownToVue.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { resolveTitleFromToken } from '@mdit-vue/shared'
2-
import _debug from 'debug'
2+
import { createDebug } from 'obug'
33
import fs from 'fs-extra'
44
import { LRUCache } from 'lru-cache'
55
import path from 'node:path'
@@ -22,7 +22,7 @@ import {
2222
import { getGitTimestamp } from './utils/getGitTimestamp'
2323
import { processIncludes } from './utils/processIncludes'
2424

25-
const debug = _debug('vitepress:md')
25+
const debug = createDebug('vitepress:md')
2626
const cache = new LRUCache<string, MarkdownCompileResult>({ max: 1024 })
2727

2828
export interface MarkdownCompileResult {

src/node/plugins/localSearchPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import _debug from 'debug'
1+
import { createDebug } from 'obug'
22
import fs from 'fs-extra'
33
import MiniSearch from 'minisearch'
44
import path from 'node:path'
@@ -10,7 +10,7 @@ import { createMarkdownRenderer } from '../markdown/markdown'
1010
import { getLocaleForPath, slash, type MarkdownEnv } from '../shared'
1111
import { processIncludes } from '../utils/processIncludes'
1212

13-
const debug = _debug('vitepress:local-search')
13+
const debug = createDebug('vitepress:local-search')
1414

1515
const LOCAL_SEARCH_INDEX_ID = '@localSearchIndex'
1616
const LOCAL_SEARCH_INDEX_REQUEST_PATH = '/' + LOCAL_SEARCH_INDEX_ID

src/node/utils/getGitTimestamp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { spawn, sync } from 'cross-spawn'
2-
import _debug from 'debug'
2+
import { createDebug } from 'obug'
33
import fs from 'node:fs'
44
import path from 'node:path'
55
import { Transform, type TransformCallback } from 'node:stream'
66
import { slash } from '../shared'
77

8-
const debug = _debug('vitepress:git')
8+
const debug = createDebug('vitepress:git')
99
const cache = new Map<string, number>()
1010

1111
const RS = 0x1e

0 commit comments

Comments
 (0)