-
Notifications
You must be signed in to change notification settings - Fork 57
feat: add devPassedAttributes to selectPlacements #1143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
feat: add devPassedAttributes to selectPlacements #1143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a devPassedAttributes field to the selectPlacements functionality to improve debugging capabilities. The devPassedAttributes field preserves the original, unmapped attributes passed by developers, while attributes contains the transformed attributes after mapping and enrichment.
Changes:
- Added
devPassedAttributesfield to the enriched options passed tokit.selectPlacementscontaining the original unmapped attributes - Updated all test expectations in
roktManager.spec.tsto verify thatdevPassedAttributesis correctly passed through - Added two new test cases specifically for
devPassedAttributesbehavior
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/roktManager.ts | Added devPassedAttributes: attributes to the enriched options object passed to kit.selectPlacements |
| test/jest/roktManager.spec.ts | Updated existing test expectations to include devPassedAttributes and added two new test cases verifying original attributes are preserved |
Comments suppressed due to low confidence (3)
src/roktManager.ts:32
- The
IRoktSelectPlacementsOptionsinterface should includedevPassedAttributesas an optional property to properly type the enriched options object that includes this field. Without this, the code at line 247 adds a property that is not part of the declared interface, creating a type mismatch. AdddevPassedAttributes?: IRoktPartnerAttributes;to the interface.
export interface IRoktSelectPlacementsOptions {
attributes: IRoktPartnerAttributes;
identifier?: string;
}
src/roktManager.ts:42
- The
IRoktLauncherinterface referencesIRoktSelectPlacementsOptionswhich should includedevPassedAttributesas an optional field. Once the interface is updated, this signature will automatically reflect the correct type.
selectPlacements: (options: IRoktSelectPlacementsOptions) => Promise<IRoktSelection>;
src/roktManager.ts:67
- The
IRoktKitinterface referencesIRoktSelectPlacementsOptionswhich should includedevPassedAttributesas an optional field. Once the interface is updated, this signature will automatically reflect the correct type.
selectPlacements: (options: IRoktSelectPlacementsOptions) => Promise<IRoktSelection>;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/roktManager.ts
Outdated
| const enrichedOptions = { | ||
| ...options, | ||
| attributes: enrichedAttributes, | ||
| devPassedAttributes: attributes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Is devPassedAttributes something that exists in the Rokt WSDK? If not, I think debugAttributes sounds more appropriate if these are attributes for debugging or testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed devPassedAttributes to debugAttributes
|


Background
devPassedAttributesalong with theenrichedAttributesfor better debugging ofselectPlacementsWhat Has Changed
devPassedAttributesinselectPlacementsScreenshots/Video
Checklist
Additional Notes
Reference Issue (For employees only. Ignore if you are an outside contributor)