From e8a001b523519dcfbbd261d3d1d60d58598d5349 Mon Sep 17 00:00:00 2001 From: Roger Date: Tue, 24 Feb 2026 10:01:51 +0100 Subject: [PATCH 1/4] Fix typos in Shaping Rules module documentation --- dev-docs/modules/shapingRulesModule.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dev-docs/modules/shapingRulesModule.md b/dev-docs/modules/shapingRulesModule.md index f793003a94..57f11c1efa 100644 --- a/dev-docs/modules/shapingRulesModule.md +++ b/dev-docs/modules/shapingRulesModule.md @@ -57,7 +57,7 @@ in Japan. It can be provided either statically or by fetching it from external e "default": [], "rules": [ { - "conditions": ["true"], + "condition": ["true"], "results": [ { "function": "excludeBidders", @@ -68,7 +68,7 @@ in Japan. It can be provided either statically or by fetching it from external e ] }, { - "conditions": [], + "condition": [], "results": [] } ] @@ -105,7 +105,7 @@ in Japan. It can be provided either statically or by fetching it from external e | `ruleSets[].modelGroups[].schema[].args` | Arguments for the schema function. | — | | `ruleSets[].modelGroups[].analyticsKey` | Optional key used to produce aTags, identifying experiments or optimization targets. | — | | `ruleSets[].modelGroups[].rules[]` | Optional rule array; if absent, only the default rule is used. | — | -| `ruleSets[].modelGroups[].rules[].conditions[]` | Conditions that must be met for the rule to apply. | — | +| `ruleSets[].modelGroups[].rules[].condition[]` | Conditions that must be met for the rule to apply. | — | | `ruleSets[].modelGroups[].rules[].results[]` | Resulting actions triggered when conditions are met. | — | | `ruleSets[].modelGroups[].rules[].results[].function` | Function defining the result action. | — | | `ruleSets[].modelGroups[].rules[].results[].args` | Arguments for the result function. | — | @@ -178,7 +178,7 @@ pbjs.setConfig({ shapingRules: { rules: { enabled: true, - rulesets: [ + ruleSets: [ { stage: "processed-auction-request", name: "exclude-in-jpn", @@ -196,7 +196,7 @@ pbjs.setConfig({ ], rules: [ { - conditions: ["true"], + condition: ["true"], results: [ { function: "excludeBidders", @@ -233,7 +233,7 @@ pbjs.setConfig({ }, rules: { enabled: true, - rulesets: [ + ruleSets: [ { stage: "processed-auction-request", name: "exclude-in-jpn", @@ -250,7 +250,7 @@ pbjs.setConfig({ ], rules: [ { - conditions: ["Chrome"], + condition: ["Chrome"], results: [ { function: "excludeBidders", From ae044a34a27d69fdeb319830d0dc0f244fecdbad Mon Sep 17 00:00:00 2001 From: Roger Date: Tue, 24 Feb 2026 10:14:01 +0100 Subject: [PATCH 2/4] Fix extraSchemaEvaluators example type --- dev-docs/modules/shapingRulesModule.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/modules/shapingRulesModule.md b/dev-docs/modules/shapingRulesModule.md index 57f11c1efa..2233af2f87 100644 --- a/dev-docs/modules/shapingRulesModule.md +++ b/dev-docs/modules/shapingRulesModule.md @@ -225,7 +225,7 @@ The configuration also allows you to define custom schema evaluators using the ` pbjs.setConfig({ shapingRules: { extraSchemaEvaluators: { - browser: (args, context) => { + browser: (args, context) => () => { if (navigator.userAgent.includes("Chrome")) { return "Chrome"; } From 64244a2ab1732c844d0d53670b052d245ef566dd Mon Sep 17 00:00:00 2001 From: Roger Date: Tue, 24 Feb 2026 10:23:56 +0100 Subject: [PATCH 3/4] Add missing required field version --- dev-docs/modules/shapingRulesModule.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dev-docs/modules/shapingRulesModule.md b/dev-docs/modules/shapingRulesModule.md index 2233af2f87..39f3705f26 100644 --- a/dev-docs/modules/shapingRulesModule.md +++ b/dev-docs/modules/shapingRulesModule.md @@ -178,16 +178,17 @@ pbjs.setConfig({ shapingRules: { rules: { enabled: true, + version: "123", ruleSets: [ { stage: "processed-auction-request", name: "exclude-in-jpn", - version: "1234", + version: "456", modelGroups: [ { weight: 98, analyticsKey: "experiment-name", - version: "4567", + version: "789", schema: [ { function: "deviceCountryIn", @@ -233,16 +234,17 @@ pbjs.setConfig({ }, rules: { enabled: true, + version: "123", ruleSets: [ { stage: "processed-auction-request", name: "exclude-in-jpn", - version: "1234", + version: "456", modelGroups: [ { weight: 98, analyticsKey: "experiment-name", - version: "4567", + version: "789", schema: [ { function: "browser", From 0b3302bf5a433857d407330f470f0e9e15129b9f Mon Sep 17 00:00:00 2001 From: Roger Date: Tue, 24 Feb 2026 11:24:36 +0100 Subject: [PATCH 4/4] Revert changes of `conditions` --- dev-docs/modules/shapingRulesModule.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev-docs/modules/shapingRulesModule.md b/dev-docs/modules/shapingRulesModule.md index 39f3705f26..3c6bd87a87 100644 --- a/dev-docs/modules/shapingRulesModule.md +++ b/dev-docs/modules/shapingRulesModule.md @@ -57,7 +57,7 @@ in Japan. It can be provided either statically or by fetching it from external e "default": [], "rules": [ { - "condition": ["true"], + "conditions": ["true"], "results": [ { "function": "excludeBidders", @@ -68,7 +68,7 @@ in Japan. It can be provided either statically or by fetching it from external e ] }, { - "condition": [], + "conditions": [], "results": [] } ] @@ -105,7 +105,7 @@ in Japan. It can be provided either statically or by fetching it from external e | `ruleSets[].modelGroups[].schema[].args` | Arguments for the schema function. | — | | `ruleSets[].modelGroups[].analyticsKey` | Optional key used to produce aTags, identifying experiments or optimization targets. | — | | `ruleSets[].modelGroups[].rules[]` | Optional rule array; if absent, only the default rule is used. | — | -| `ruleSets[].modelGroups[].rules[].condition[]` | Conditions that must be met for the rule to apply. | — | +| `ruleSets[].modelGroups[].rules[].conditions[]` | Conditions that must be met for the rule to apply. | — | | `ruleSets[].modelGroups[].rules[].results[]` | Resulting actions triggered when conditions are met. | — | | `ruleSets[].modelGroups[].rules[].results[].function` | Function defining the result action. | — | | `ruleSets[].modelGroups[].rules[].results[].args` | Arguments for the result function. | — | @@ -197,7 +197,7 @@ pbjs.setConfig({ ], rules: [ { - condition: ["true"], + conditions: ["true"], results: [ { function: "excludeBidders", @@ -252,7 +252,7 @@ pbjs.setConfig({ ], rules: [ { - condition: ["Chrome"], + conditions: ["Chrome"], results: [ { function: "excludeBidders",