-
-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
import type { JavaScriptRegexEngineOptions } from '@shikijs/engine-javascript' | ||
import type { RegexEngine } from '@shikijs/types' | ||
import { createJavaScriptRegexEngine as _createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript' | ||
import { | ||
createJavaScriptRegexEngine as _createJavaScriptRegexEngine, | ||
defaultJavaScriptRegexConstructor as _defaultJavaScriptRegexConstructor, | ||
} from '@shikijs/engine-javascript' | ||
import { warnDeprecated } from '../warn' | ||
|
||
/** | ||
* @deprecated Import `createJavaScriptRegexEngine` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead. | ||
*/ | ||
export function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine { | ||
warnDeprecated('import `createJavaScriptRegexEngine` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead') | ||
return _createJavaScriptRegexEngine(options) | ||
} | ||
|
||
export { defaultJavaScriptRegexConstructor } | ||
/** | ||
* @deprecated Import `defaultJavaScriptRegexConstructor` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead. | ||
*/ | ||
export function defaultJavaScriptRegexConstructor(pattern: string): RegExp { | ||
warnDeprecated('import `defaultJavaScriptRegexConstructor` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead') | ||
return _defaultJavaScriptRegexConstructor(pattern) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
export * from './bundle-full' | ||
export type { BuiltinLanguage, BuiltinTheme } from './types' | ||
|
||
export { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript' | ||
export { createOnigurumaEngine, loadWasm } from '@shikijs/engine-oniguruma' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
import type { WebAssemblyInstantiator } from './types' | ||
import { warnDeprecated } from '@shikijs/core' | ||
|
||
/** | ||
* @deprecated Use `import('shiki/wasm')` instead. | ||
*/ | ||
export const getWasmInlined: WebAssemblyInstantiator = async (info) => { | ||
warnDeprecated('`getWasmInlined` is deprecated. Use `import("shiki/wasm")` instead.') | ||
return import('shiki/wasm').then(wasm => wasm.default(info)) | ||
} |