-
Notifications
You must be signed in to change notification settings - Fork 18
Release 5.0.0 with plugin API #228
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: master
Are you sure you want to change the base?
Conversation
- Add plugin API: RadarPlugin, RadarPluginContext, and exports - Refactor IIFE build to use src/iife-entry.ts and src/iife-core-entry.ts - Remove verify API and JWT util from core SDK - Update demo to serve verify plugin from sibling repo - Update package exports for plugin entry point - Bump version to 5.0.0
src/http.ts
Outdated
| for (const [pattern, handler] of Http.errorInterceptors) { | ||
| if (host.includes(pattern)) { | ||
| return reject(handler(!!Navigator.online())); | ||
| } |
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.
If there are multiple patterns that match only one will be caught. Honestly I think this whole request system is strange and we should just use fetch.
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.
+1 for fetch
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.
ya +1 here too. i just don't wanna introduce too many new things in this release so tbd on if i'm able to get here
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.
ended up refactoring much of this in fetch: 8efbbd6
def is a bit cleaner - i'm a bit skeptical still on the requestId abort controller thing we've always had so will think ab that
* install plugin on register rather than initialize
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.
getting this up to date
| ], | ||
| }, | ||
|
|
||
| // IIFE (core SDK feature - no maps) |
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.
not needed anymore since it's been split out
1468c77 to
850fc1a
Compare
79b8f70 to
9eae8c4
Compare
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
Copilot reviewed 90 out of 97 changed files in this pull request and generated 12 comments.
Comments suppressed due to low confidence (4)
packages/maps/src/RadarMap.ts:82
- The constructor signature has changed to require a
RadarPluginContextparameter, but this is a breaking change for any code that directly instantiates RadarMap. Consider whether this should be handled differently or documented more explicitly as a breaking change. Users should now useRadar.ui.map()factory instead ofnew RadarMap().
packages/autocomplete/src/autocomplete.ts:87 - The constructor signature has changed to require a
RadarPluginContextparameter, but this is a breaking change for any code that directly instantiates AutocompleteUI. Consider whether this should be handled differently or documented more explicitly as a breaking change. Users should now useRadar.ui.autocomplete()factory instead ofnew AutocompleteUI().
packages/maps/src/RadarMarker.ts:95 - The constructor signature has changed to require a
RadarPluginContextparameter, but this is a breaking change for any code that directly instantiates RadarMarker. Consider whether this should be handled differently or documented more explicitly as a breaking change. Users should now useRadar.ui.marker()factory instead ofnew RadarMarker().
packages/maps/src/RadarMarker.ts:130 - Avoid automated semicolon insertion (96% of all statements in the enclosing function have an explicit semicolon).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| paths: | ||
| - dist | ||
| - packages/maps/dist | ||
| - packages/autocomplete/dist |
Copilot
AI
Feb 12, 2026
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.
The CircleCI workflow persists cdn/ directory from the build job (line 46-48 covers dist folders but not cdn/). If CDN builds are needed for subsequent jobs or artifacts, add cdn and packages/*/cdn to the persist_to_workspace paths list.
| - packages/autocomplete/dist | |
| - packages/autocomplete/dist | |
| - cdn | |
| - packages/maps/cdn | |
| - packages/autocomplete/cdn |
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
Copilot reviewed 114 out of 120 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
v5.0.0 — Plugin architecture
Core SDK split into modular plugins. Maps, Autocomplete, and Fraud/Verify are now separate packages
registered via
Radar.registerPlugin().Breaking changes
Radar.ui.*removed from core — install@radarlabs/plugin-mapsor@radarlabs/autocomplete-ui-pluginmaplibre-glno longer a peer dep of core (moved to maps plugin)trackVerified,startTrackingVerified, etc.) moved to@radarlabs/plugin-fraudunderRadar.fraud.*radar.cssreplaced with per-plugin CSS files<script>tags per plugin (auto-register)What changed
Radar.registerPlugin(plugin)with typedRadarPluginContextpassing coreinternals
packages/maps,packages/autocompletesrc/iife-entry.ts, plugin types viaradar-sdk-js/pluginsubpath exportfraudparam totrackOnceRadarError+ all subclasses + all types exported from main entryPackages
radar-sdk-js@radarlabs/plugin-maps@radarlabs/plugin-autocomplete@radarlabs/plugin-fraud