<!--
Copyright (c) 2026 ByteDance Ltd. and/or its affiliates
SPDX-License-Identifier: MIT
-->

# Contributing

Thank you for your interest in improving `@byted-supabase/supabase-js`.

## Development Setup

This workspace uses `pnpm`.

```bash
pnpm install
pnpm --filter @byted-supabase/supabase-js check
```

The package check runs typecheck, Vitest, SDK build, bundle isolation, and ESM export checks.

## Change Guidelines

- Preserve the official `@supabase/supabase-js` `createClient(url, key, options)` shape.
- Keep `@supabase/supabase-js` as a peer dependency.
- Keep host-specific platform SDKs as peer dependencies. Platform SDKs that only some consumers need, such as `@doubao-dev/framework`, should be optional peers.
- Do not add `runtime: 'auto'` as a public option. Omit `runtime` for automatic detection, or pass an explicit runtime name or adapter.
- Keep platform API details inside runtime adapters.
- Do not put mini-program local file paths into official `storage.upload()`; use the mini upload helper.
- Do not add privileged server keys, payment signing, certificate handling, callback verification, or webhook handling to the client SDK.

## Tests

Runtime bug fixes should include focused tests with mocked hosts. When changing package release metadata or published files, run the package check and inspect the `npm pack` file list.

## Release Artifacts

The public NPM package should include only package metadata, README, CHANGELOG, LICENSE, governance docs, built artifacts, and package-local skills. It should not include source files, tests, demo apps, sourcemaps, local environment files, generated tarballs, or internal system URLs.
