@content-collections/core 0.12.0 → 0.13.0
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.
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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
|
|
1920
|
+
error: new TransformError("Validation", formatValidationErrorMessage(parsedData.issues))
|
|
1918
1921
|
});
|
|
1919
1922
|
return null;
|
|
1920
1923
|
}
|