Skip to content

Conversation

@jaspk06
Copy link
Contributor

@jaspk06 jaspk06 commented Feb 10, 2026

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-maps or
    @radarlabs/autocomplete-ui-plugin
  • maplibre-gl no longer a peer dep of core (moved to maps plugin)
  • Verify API (trackVerified, startTrackingVerified, etc.) moved to @radarlabs/plugin-fraud under
    Radar.fraud.*
  • Single radar.css replaced with per-plugin CSS files
  • CDN: separate <script> tags per plugin (auto-register)

What changed

  • Plugin system: Radar.registerPlugin(plugin) with typed RadarPluginContext passing core
    internals
  • Monorepo: npm workspaces — packages/maps, packages/autocomplete
  • Build: rollup.config.js → rollup.config.ts, IIFE entry at src/iife-entry.ts, plugin types via
    radar-sdk-js/plugin subpath export
  • Core API: removed verify/JWT/desktop code, added fraud param to trackOnce
  • Exports: RadarError + all subclasses + all types exported from main entry
  • Infra: Node 24, upgraded rollup/typescript/mock-xmlhttprequest, plugin release GH Actions
  • Docs: new README, MIGRATION (4→5), CONTRIBUTING, per-plugin READMEs

Packages

Package Description
radar-sdk-js Core — tracking, geocoding, search, routing
@radarlabs/plugin-maps RadarMap, RadarMarker, RadarPopup (MapLibre GL)
@radarlabs/plugin-autocomplete Autocomplete UI widget
@radarlabs/plugin-fraud Verified tracking, location tokens (separate repo)

- 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()));
}
Copy link
Contributor

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for fetch

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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)
Copy link
Contributor Author

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

@jaspk06 jaspk06 force-pushed the jasonliu/sdk-split-spike branch from 1468c77 to 850fc1a Compare February 11, 2026 19:19
@jaspk06 jaspk06 force-pushed the jasonliu/sdk-split-spike branch from 79b8f70 to 9eae8c4 Compare February 12, 2026 02:35
Copy link

Copilot AI left a 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 RadarPluginContext parameter, 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 use Radar.ui.map() factory instead of new RadarMap().
    packages/autocomplete/src/autocomplete.ts:87
  • The constructor signature has changed to require a RadarPluginContext parameter, 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 use Radar.ui.autocomplete() factory instead of new AutocompleteUI().
    packages/maps/src/RadarMarker.ts:95
  • The constructor signature has changed to require a RadarPluginContext parameter, 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 use Radar.ui.marker() factory instead of new 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
Copy link

Copilot AI Feb 12, 2026

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.

Suggested change
- packages/autocomplete/dist
- packages/autocomplete/dist
- cdn
- packages/maps/cdn
- packages/autocomplete/cdn

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants