@astrojs/markdoc 1.0.4 → 1.0.5

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.
@@ -88,6 +88,7 @@ function renderTreeNodeToFactoryResult(result: SSRResult, treeNode: TreeNode) {
88
88
  const head = unescapeHTML(styles + links + scripts);
89
89
 
90
90
  let headAndContent = createHeadAndContent(
91
+ // @ts-expect-error: `createHeadAndContent` expect a string and we know `head` is definitely a string
91
92
  head,
92
93
  renderTemplate`${renderComponent(
93
94
  result,
@@ -112,6 +113,7 @@ function renderTreeNodeToFactoryResult(result: SSRResult, treeNode: TreeNode) {
112
113
  }
113
114
 
114
115
  export const ComponentNode = createComponent({
116
+ // @ts-expect-error: The types are a bit complex here. Some further refactor might be needed to make this more type-safe.
115
117
  factory(result: SSRResult, { treeNode }: { treeNode: TreeNode | TreeNode[] }) {
116
118
  return renderTreeNodeToFactoryResult(result, treeNode);
117
119
  },
@@ -6,8 +6,8 @@ function prism() {
6
6
  nodes: {
7
7
  fence: {
8
8
  attributes: Markdoc.nodes.fence.attributes,
9
- transform({ attributes: { language, content } }) {
10
- const { html, classLanguage } = runHighlighterWithAstro(language, content);
9
+ async transform({ attributes: { language, content } }) {
10
+ const { html, classLanguage } = await runHighlighterWithAstro(language, content);
11
11
  return unescapeHTML(
12
12
  `<pre class="${classLanguage}"><code class="${classLanguage}">${html}</code></pre>`
13
13
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astrojs/markdoc",
3
3
  "description": "Add support for Markdoc in your Astro site",
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -60,9 +60,9 @@
60
60
  "esbuild": "^0.27.3",
61
61
  "github-slugger": "^2.0.0",
62
62
  "htmlparser2": "^10.1.0",
63
- "@astrojs/internal-helpers": "0.9.0",
64
- "@astrojs/markdown-remark": "7.1.1",
65
- "@astrojs/prism": "4.0.1"
63
+ "@astrojs/internal-helpers": "0.9.1",
64
+ "@astrojs/markdown-remark": "7.1.2",
65
+ "@astrojs/prism": "4.0.2"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "astro": "^6.0.0"
@@ -72,7 +72,7 @@
72
72
  "devalue": "^5.6.3",
73
73
  "linkedom": "^0.18.12",
74
74
  "vite": "^7.3.2",
75
- "astro": "6.1.9",
75
+ "astro": "6.3.2",
76
76
  "astro-scripts": "0.0.14"
77
77
  },
78
78
  "engines": {
@@ -82,10 +82,9 @@
82
82
  "provenance": true
83
83
  },
84
84
  "scripts": {
85
- "build": "astro-scripts build \"src/**/*.ts\" && tsc",
85
+ "build": "astro-scripts build \"src/**/*.ts\" && tsc -b",
86
86
  "build:ci": "astro-scripts build \"src/**/*.ts\"",
87
87
  "dev": "astro-scripts dev \"src/**/*.ts\"",
88
- "test": "astro-scripts test --timeout 100000 \"test/**/*.test.ts\"",
89
- "typecheck:tests": "tsc --build tsconfig.test.json"
88
+ "test": "astro-scripts test --timeout 100000 \"test/**/*.test.ts\""
90
89
  }
91
90
  }