Skip to content

Commit

Permalink
fix: warn about missing deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 20, 2025
1 parent 36f6737 commit 708e3f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/engine-oniguruma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"prepublishOnly": "nr build"
},
"dependencies": {
"@shikijs/core": "workspace:*",
"@shikijs/types": "workspace:*",
"@shikijs/vscode-textmate": "catalog:"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/engine-oniguruma/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { LoadWasmOptions, RegexEngine } from '@shikijs/types'

import { warnDeprecated } from '@shikijs/core'
import { loadWasm, OnigScanner, OnigString } from './oniguruma'

export { loadWasm }
Expand Down Expand Up @@ -36,8 +37,9 @@ export async function createOnigurumaEngine(options?: LoadWasmOptions | null): P
}

/**
* Deprecated. Use `createOnigurumaEngine` instead.
* @deprecated Use `createOnigurumaEngine` instead.
*/
export async function createWasmOnigEngine(options?: LoadWasmOptions | null): Promise<RegexEngine> {
warnDeprecated('Use `createOnigurumaEngine` instead.')
return createOnigurumaEngine(options)
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 708e3f2

Please sign in to comment.