@contentful/experiences-components-react 3.8.0-beta.0 → 3.8.0-beta.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.
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({