@astrojs/markdoc 0.7.0 → 0.7.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.
@@ -80,7 +80,7 @@ async function getContentEntryType({
80
80
  });
81
81
  const res = `import { Renderer } from '@astrojs/markdoc/components';
82
82
  import { createGetHeadings, createContentComponent } from '@astrojs/markdoc/runtime';
83
- ${markdocConfigUrl ? `import markdocConfig from ${JSON.stringify(markdocConfigUrl.pathname)};` : "const markdocConfig = {};"}
83
+ ${markdocConfigUrl ? `import markdocConfig from ${JSON.stringify(fileURLToPath(markdocConfigUrl))};` : "const markdocConfig = {};"}
84
84
 
85
85
  import { assetsConfig } from '@astrojs/markdoc/runtime-assets-config';
86
86
  markdocConfig.nodes = { ...assetsConfig.nodes, ...markdocConfig.nodes };
@@ -164,7 +164,7 @@ function getStringifiedImports(componentConfigMap, componentNamePrefix, root) {
164
164
  let stringifiedComponentImports = "";
165
165
  for (const [key, config] of Object.entries(componentConfigMap)) {
166
166
  const importName = config.namedExport ? `{ ${config.namedExport} as ${componentNamePrefix + toImportName(key)} }` : componentNamePrefix + toImportName(key);
167
- const resolvedPath = config.type === "local" ? new URL(config.path, root).pathname : config.path;
167
+ const resolvedPath = config.type === "local" ? fileURLToPath(new URL(config.path, root)) : config.path;
168
168
  stringifiedComponentImports += `import ${importName} from ${JSON.stringify(resolvedPath)};
169
169
  `;
170
170
  }
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": "0.7.0",
4
+ "version": "0.7.1",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "author": "withastro",
@@ -63,12 +63,12 @@
63
63
  "htmlparser2": "^9.0.0",
64
64
  "kleur": "^4.1.5",
65
65
  "shikiji": "^0.6.8",
66
- "zod": "3.21.1",
66
+ "zod": "^3.22.4",
67
67
  "@astrojs/internal-helpers": "0.2.1",
68
68
  "@astrojs/prism": "3.0.0"
69
69
  },
70
70
  "peerDependencies": {
71
- "astro": "^3.3.4"
71
+ "astro": "^3.0.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/chai": "^4.3.5",
@@ -82,7 +82,7 @@
82
82
  "rollup": "^3.28.1",
83
83
  "vite": "^4.4.9",
84
84
  "@astrojs/markdown-remark": "3.3.0",
85
- "astro": "3.3.4",
85
+ "astro": "3.4.1",
86
86
  "astro-scripts": "0.0.14"
87
87
  },
88
88
  "engines": {