Skip to content

Simplify TSJS core library - remove rendering/auction logic#243

Draft
aram356 wants to merge 1 commit intofeature/gam-integration-frontendfrom
feature/tsjs-core-simplification
Draft

Simplify TSJS core library - remove rendering/auction logic#243
aram356 wants to merge 1 commit intofeature/gam-integration-frontendfrom
feature/tsjs-core-simplification

Conversation

@aram356
Copy link
Collaborator

@aram356 aram356 commented Feb 5, 2026

Summary

⚠️ BREAKING CHANGE: This PR removes the ad rendering and auction logic from the core TSJS library, keeping only configuration and logging.

Removed APIs

  • tsjs.addAdUnits() - ad unit registration
  • tsjs.renderAdUnit() - single ad unit rendering
  • tsjs.renderAllAdUnits() - batch ad unit rendering
  • tsjs.requestAds() - auction request
  • tsjs.getHighestCpmBids() - bid retrieval
  • tsjs.que - command queue

Kept APIs

  • tsjs.version - version string
  • tsjs.setConfig() - configuration
  • tsjs.getConfig() - get current config
  • tsjs.log - logging utilities

Removed Files

  • core/queue.ts, registry.ts, render.ts, request.ts, util.ts
  • core/styles/normalize.css, core/templates/iframe.html
  • integrations/ext/ (Prebid shim - replaced by prebid integration)
  • integrations/testlight/ (obsolete test integration)

Bundle Size

Reduced from ~32KB to ~23KB (gzipped: ~7.5KB)

Migration Path

Test plan

  • Verify npm run build succeeds
  • Verify npm test passes
  • Verify bundle size is reduced
  • Verify removed APIs are no longer available on window.tsjs
  • Verify kept APIs (setConfig, getConfig, log) still work

Dependencies

Closes #251
Related to #179

This is a breaking change that removes the ad rendering and auction logic
from the core library, keeping only configuration and logging.

## Removed APIs
- `tsjs.addAdUnits()` - ad unit registration
- `tsjs.renderAdUnit()` - single ad unit rendering
- `tsjs.renderAllAdUnits()` - batch ad unit rendering
- `tsjs.requestAds()` - auction request
- `tsjs.getHighestCpmBids()` - bid retrieval
- `tsjs.que` - command queue

## Kept APIs
- `tsjs.version` - version string
- `tsjs.setConfig()` - configuration
- `tsjs.getConfig()` - get current config
- `tsjs.log` - logging utilities

## Removed Files
- core/queue.ts, registry.ts, render.ts, request.ts, util.ts
- core/styles/normalize.css, core/templates/iframe.html
- integrations/ext/ (Prebid shim - replaced by prebid integration)
- integrations/testlight/ (obsolete test integration)

## Migration
Use the GAM interceptor integration for rendering Prebid creatives,
or the Prebid NPM integration for server-side bidding.

Bundle size reduced from ~32KB to ~23KB (gzipped: ~7.5KB).
@aram356 aram356 self-assigned this Feb 5, 2026
@aram356 aram356 marked this pull request as draft February 5, 2026 19:34
@aram356 aram356 added enhancement New feature or request and removed enhancement New feature or request labels Feb 5, 2026
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.

1 participant