@content-collections/core 0.12.0 → 0.13.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1818,13 +1818,13 @@ function isImport(value) {
1818
1818
  function createDefaultImport(path$1) {
1819
1819
  return {
1820
1820
  __cc_import: true,
1821
- path: path$1
1821
+ path: path$1.replace(/\\/g, "/")
1822
1822
  };
1823
1823
  }
1824
1824
  function createNamedImport(name, path$1) {
1825
1825
  return {
1826
1826
  __cc_import: true,
1827
- path: path$1,
1827
+ path: path$1.replace(/\\/g, "/"),
1828
1828
  name
1829
1829
  };
1830
1830
  }
@@ -1899,6 +1899,9 @@ function createPath(path$1, ext) {
1899
1899
  function isContentDefined(value) {
1900
1900
  return value !== null && typeof value === "object" && "content" in value;
1901
1901
  }
1902
+ function formatValidationErrorMessage(issues) {
1903
+ return issues.map((issue) => `- ${issue.path}: ${issue.message}`).join("\n");
1904
+ }
1902
1905
  function createTransformer(emitter, cacheManager) {
1903
1906
  const deprecatedWarnings = /* @__PURE__ */ new Set();
1904
1907
  function warnImplicitContentProperty(collection) {
@@ -1914,7 +1917,7 @@ function createTransformer(emitter, cacheManager) {
1914
1917
  emitter.emit("transformer:validation-error", {
1915
1918
  collection,
1916
1919
  file,
1917
- error: new TransformError("Validation", parsedData.issues.map((issue) => issue.message).join(", "))
1920
+ error: new TransformError("Validation", formatValidationErrorMessage(parsedData.issues))
1918
1921
  });
1919
1922
  return null;
1920
1923
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@content-collections/core",
3
3
  "type": "module",
4
- "version": "0.12.0",
4
+ "version": "0.13.1",
5
5
  "description": "Core of Content Collections",
6
6
  "author": "Sebastian Sdorra <s.sdorra@gmail.com>",
7
7
  "license": "MIT",