File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @astrojs/markdown-remark " : major
3+ ---
4+
5+ Removes deprecated APIs including ` remarkShiki ` , ` remarkPrism ` , ` replaceCssVariables ` and several unused types
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ import type { OutgoingHttpHeaders } from 'node:http';
22import type { AddressInfo } from 'node:net' ;
33import type {
44 MarkdownHeading ,
5- MarkdownMetadata ,
6- MarkdownRenderingResult ,
5+ MarkdownVFile ,
76 RehypePlugins ,
87 RemarkPlugins ,
98 RemarkRehype ,
@@ -45,8 +44,6 @@ export { type AstroIntegrationLogger };
4544
4645export type {
4746 MarkdownHeading ,
48- MarkdownMetadata ,
49- MarkdownRenderingResult ,
5047 RehypePlugins ,
5148 RemarkPlugins ,
5249 ShikiConfig ,
@@ -2188,6 +2185,21 @@ export interface ManifestData {
21882185 routes : RouteData [ ] ;
21892186}
21902187
2188+ /** @deprecated Type is no longer used by exported APIs */
2189+ export interface MarkdownMetadata {
2190+ headings : MarkdownHeading [ ] ;
2191+ source : string ;
2192+ html : string ;
2193+ }
2194+
2195+ /** @deprecated Type is no longer used by exported APIs */
2196+ export interface MarkdownRenderingResult {
2197+ metadata : MarkdownMetadata ;
2198+ vfile : MarkdownVFile ;
2199+ code : string ;
2200+ }
2201+
2202+ /** @deprecated Type is no longer used by exported APIs */
21912203export interface MarkdownParserResponse extends MarkdownRenderingResult {
21922204 frontmatter : MD [ 'frontmatter' ] ;
21932205}
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ export { rehypeHeadingIds } from './rehype-collect-headings.js';
2626export { remarkCollectImages } from './remark-collect-images.js' ;
2727export { rehypePrism } from './rehype-prism.js' ;
2828export { rehypeShiki } from './rehype-shiki.js' ;
29- export { remarkPrism } from './remark-prism.js' ;
30- export { remarkShiki } from './remark-shiki.js' ;
31- export { createShikiHighlighter , replaceCssVariables , type ShikiHighlighter } from './shiki.js' ;
29+ export { createShikiHighlighter , type ShikiHighlighter } from './shiki.js' ;
3230export * from './types.js' ;
3331
3432export const markdownConfigDefaults : Required < AstroMarkdownOptions > = {
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -167,10 +167,6 @@ function normalizePropAsString(value: Properties[string]): string | null {
167167 return Array . isArray ( value ) ? value . join ( ' ' ) : ( value as string | null ) ;
168168}
169169
170- /**
171- * shiki -> shikiji compat as we need to manually replace it
172- * @internal Exported for error overlay use only
173- */
174- export function replaceCssVariables ( str : string ) {
170+ function replaceCssVariables ( str : string ) {
175171 return str . replace ( COLOR_REPLACEMENT_REGEX , ( match ) => ASTRO_COLOR_REPLACEMENTS [ match ] || match ) ;
176172}
Original file line number Diff line number Diff line change @@ -53,13 +53,6 @@ export interface AstroMarkdownOptions {
5353 smartypants ?: boolean ;
5454}
5555
56- export interface ImageMetadata {
57- src : string ;
58- width : number ;
59- height : number ;
60- type : string ;
61- }
62-
6356export interface MarkdownProcessor {
6457 render : (
6558 content : string ,
@@ -83,31 +76,15 @@ export interface MarkdownProcessorRenderResult {
8376 } ;
8477}
8578
86- export interface MarkdownRenderingOptions
87- extends AstroMarkdownOptions ,
88- MarkdownProcessorRenderOptions { }
89-
9079export interface MarkdownHeading {
9180 depth : number ;
9281 slug : string ;
9382 text : string ;
9483}
9584
96- export interface MarkdownMetadata {
97- headings : MarkdownHeading [ ] ;
98- source : string ;
99- html : string ;
100- }
101-
10285export interface MarkdownVFile extends VFile {
10386 data : {
10487 __astroHeadings ?: MarkdownHeading [ ] ;
10588 imagePaths ?: Set < string > ;
10689 } ;
10790}
108-
109- export interface MarkdownRenderingResult {
110- metadata : MarkdownMetadata ;
111- vfile : MarkdownVFile ;
112- code : string ;
113- }
You can’t perform that action at this time.
0 commit comments