Skip to content

Add @flags-sdk/supaship adapter#337

Open
madhusudhand wants to merge 1 commit intovercel:mainfrom
madhusudhand:supaship-adapter
Open

Add @flags-sdk/supaship adapter#337
madhusudhand wants to merge 1 commit intovercel:mainfrom
madhusudhand:supaship-adapter

Conversation

@madhusudhand
Copy link

@madhusudhand madhusudhand commented Mar 18, 2026

Summary

This PR introduces a Supaship adapter for the Flags SDK via a new @flags-sdk/supaship package, along with tests and documentation.

It also adds Supaship to the providers catalog in the docs so users can discover and use it as a flag provider.

Motivation

The Flags SDK is designed to support multiple providers through a consistent adapter interface. This PR extends that ecosystem by enabling Supaship as a compatible provider.

This allows teams using Supaship to adopt the Flags SDK without changing their flag evaluation patterns.

Changes

New adapter package: @flags-sdk/supaship

  • Added new package scaffolding and build/test configuration:
    • package.json
    • tsconfig.json
    • tsup.config.js
    • vitest.config.ts
    • CHANGELOG.md
  • Added runtime adapter implementation in packages/adapter-supaship/src/index.ts:
    • createSupashipAdapter(...) factory
    • default lazy singleton supashipAdapter
    • typed exports for Supaship context/value/plugin/network types
    • feature().decide(...) flow that:
      • merges static adapter context + per-call context + request entities
      • resolves values through Supaship client
      • falls back to defaultValue on null/undefined
      • throws a clear error if no value and no default are provided
  • Added test coverage in packages/adapter-supaship/src/index.test.ts for:
    • default client config creation
    • context/entity merge behavior
    • fallback behavior for undefined and null
    • error path when no defaultValue exists
    • default adapter env-var validation
    • lazy initialization (single client creation across calls)

Documentation updates

  • Added provider page: apps/docs/content/docs/providers/supaship.mdx
    • install/setup instructions
    • default and custom adapter usage
    • identify/context example for Next.js
    • feature() usage example
    • links to source and Supaship SDK
  • Added Supaship to provider navigation metadata:
    • apps/docs/content/docs/providers/meta.json
  • Added Supaship branding to provider list:
    • new logo component apps/docs/components/custom/logos/supaship.tsx
    • provider card entry in apps/docs/components/custom/provider-list.tsx

Dependency/lockfile updates

  • Added @supashiphq/javascript-sdk@1.0.0 to package graph for the new adapter package.
  • Commit also includes lockfile.

Test plan

  • pnpm --filter @flags-sdk/supaship test
  • pnpm --filter @flags-sdk/supaship type-check
  • pnpm --filter @flags-sdk/supaship build
  • pnpm --filter docs dev and verify Supaship appears in provider list and docs page renders/examples are correct

@vercel
Copy link
Contributor

vercel bot commented Mar 18, 2026

@madhusudhand is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link

socket-security bot commented Mar 18, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedreact@​19.3.0-canary-46103596-20260305 ⏵ 19.3.0-canary-c80a0750-202603121001008498100

View full report

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