@contentful/experiences-components-react 3.8.0-dev-20250925T1014-c658e71.0 → 3.8.0-dev-20250926T1559-e1ab24d.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 +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1327,6 +1327,16 @@ const ComponentVariableSchema = z.object({
|
|
|
1327
1327
|
});
|
|
1328
1328
|
const ComponentTreeNodeSchema = BaseComponentTreeNodeSchema.extend({
|
|
1329
1329
|
children: z.lazy(() => ComponentTreeNodeSchema.array()),
|
|
1330
|
+
}).superRefine(({ id, prebindingId, parameters }, ctx) => {
|
|
1331
|
+
// We don't fail if parameters are present but prebindingId is not because
|
|
1332
|
+
// older experiences (updated before 21-09-2025) always included parameters
|
|
1333
|
+
// and they will start failing if we do.
|
|
1334
|
+
if (prebindingId && !parameters) {
|
|
1335
|
+
ctx.addIssue({
|
|
1336
|
+
code: z.ZodIssueCode.custom,
|
|
1337
|
+
message: `Found "prebindingId" but no "parameters" for node with id: "${id}"`,
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1330
1340
|
});
|
|
1331
1341
|
const ComponentTreeSchema = z
|
|
1332
1342
|
.object({
|