shiki 1.28.0 → 1.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -533,17 +533,18 @@ declare function createPositionConverter(code: string): {
533
533
  posToIndex: (line: number, character: number) => number;
534
534
  };
535
535
 
536
+ type DeprecationTarget = 3;
536
537
  /**
537
538
  * Enable runtime warning for deprecated APIs, for the future versions of Shiki.
538
539
  *
539
- * Disabled by default, will be enabled in Shiki v2.
540
+ * You can pass a major version to only warn for deprecations that will be removed in that version.
540
541
  *
541
- * @experimental The accuracy of the warning messages is not yet guaranteed.
542
+ * By default, deprecation warning is set to 3 since Shiki v2.0.0
542
543
  */
543
- declare function enableDeprecationWarnings(value?: boolean): void;
544
+ declare function enableDeprecationWarnings(emitDeprecation?: DeprecationTarget | boolean, emitError?: boolean): void;
544
545
  /**
545
546
  * @internal
546
547
  */
547
- declare function warnDeprecated(message: string): void;
548
+ declare function warnDeprecated(message: string, version?: DeprecationTarget): void;
548
549
 
549
550
  export { type CssVariablesThemeOptions, FontStyle, type ShorthandsBundle, EncodedTokenMetadata as StackElementMetadata, addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createCssVariablesTheme, createHighlighterCore, createHighlighterCoreSync, createJavaScriptRegexEngine, createOnigurumaEngine, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, createWasmOnigEngine, createdBundledHighlighter, defaultJavaScriptRegexConstructor, enableDeprecationWarnings, getHighlighterCore, getShikiInternal, getSingletonHighlighterCore, getTokenStyleObject, toHtml as hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, loadWasm, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shiki",
3
3
  "type": "module",
4
- "version": "1.28.0",
4
+ "version": "1.29.1",
5
5
  "description": "A beautiful Syntax Highlighter.",
6
6
  "author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -39,6 +39,10 @@
39
39
  "types": "./dist/themes.d.mts",
40
40
  "default": "./dist/themes.mjs"
41
41
  },
42
+ "./types": {
43
+ "types": "./dist/types.d.mts",
44
+ "default": "./dist/types.mjs"
45
+ },
42
46
  "./theme-css-variables": {
43
47
  "types": "./dist/theme-css-variables.d.mts",
44
48
  "default": "./dist/theme-css-variables.mjs"
@@ -115,12 +119,12 @@
115
119
  "dependencies": {
116
120
  "@shikijs/vscode-textmate": "^10.0.1",
117
121
  "@types/hast": "^3.0.4",
118
- "@shikijs/engine-javascript": "1.28.0",
119
- "@shikijs/core": "1.28.0",
120
- "@shikijs/engine-oniguruma": "1.28.0",
121
- "@shikijs/themes": "1.28.0",
122
- "@shikijs/types": "1.28.0",
123
- "@shikijs/langs": "1.28.0"
122
+ "@shikijs/core": "1.29.1",
123
+ "@shikijs/engine-javascript": "1.29.1",
124
+ "@shikijs/engine-oniguruma": "1.29.1",
125
+ "@shikijs/langs": "1.29.1",
126
+ "@shikijs/types": "1.29.1",
127
+ "@shikijs/themes": "1.29.1"
124
128
  },
125
129
  "devDependencies": {
126
130
  "rollup-plugin-copy": "^3.5.0",