@loyalytics/swan-web-sdk
v1.0.3
Published
Swan customer-engagement SDK for Web. Identity, event tracking, offline-resilient queue, and semantic e-commerce events.
Readme
Swan Web SDK (scaffold)
Internal contributor README. Not for customer distribution. The package
is private: true in package.json and version is 0.0.0-scaffold to
prevent accidental npm publish.
Status
Scaffold-only. No public API yet. The PR sequence that brings this to GA:
| PR | Scope |
|---|---|
| A | This scaffold + web-ci.yml umbrella |
| B | Bundle-size, no-runtime-deps, browser-compat gates |
| C | Conformance runner loads shared .feature files — every scenario RED |
| D | TypeScript public surface (type stubs only) |
| E+ | One feature per PR, each turns ≥1 conformance scenario from RED → GREEN |
Customer-visible behavior starts in PR E. Until then this folder builds green CI but ships nothing.
Local development
pnpm install
pnpm typecheck # tsc --noEmit
pnpm test # vitest run
pnpm build # esbuild ESM + CJS + tsc declarationsToolchain: Node 22+, TypeScript 5.5+, vitest 2, esbuild.
Targets
- TypeScript
target: ES2017(matches the SDK's documented browser floor: Chrome 90+, Firefox 90+, Safari 14+, Edge 90+). strict: true+exactOptionalPropertyTypes: true+noImplicitOverride— type-safety floor matches the iOS SDK's Swift strictness posture.
Runtime-dependency floor
dependencies in package.json MUST stay empty. Pure
DOM / Fetch / Web APIs only. Same posture as iOS (Foundation only) and
Android (no transitives). PR B adds a CI gate that fails any PR
introducing a runtime dependency.
