Skip to content

feat(supabase): rename env to runtime and add runtime-version in X-Client-Info#2412

Merged
mandarini merged 1 commit into
feat/x-client-infofrom
claude/strange-germain-48c9aa
Jun 1, 2026
Merged

feat(supabase): rename env to runtime and add runtime-version in X-Client-Info#2412
mandarini merged 1 commit into
feat/x-client-infofrom
claude/strange-germain-48c9aa

Conversation

@grdsdev

@grdsdev grdsdev commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Builds on top of #2359 (the structured X-Client-Info metadata initiative, SDK-902/903).

Two changes:

  1. Renames the env key to runtime per the updated spec
  2. Adds a runtime-version field where the version can be deterministically extracted at module load time

Before / After

Environment Before (#2359) After (this PR)
Node 22 supabase-js/2.x.x; env=node supabase-js/2.x.x; runtime=node; runtime-version=22.13.1
Deno 1.37 supabase-js/2.x.x; env=deno supabase-js/2.x.x; runtime=deno; runtime-version=1.37.0
Browser supabase-js/2.x.x; env=web supabase-js/2.x.x; runtime=web
React Native supabase-js/2.x.x; env=react-native supabase-js/2.x.x; runtime=react-native

Runtime version extraction

  • Node.js: process.version with the leading v stripped (e.g. 22.13.1)
  • Deno: Deno.version.deno (e.g. 1.37.0)
  • Web / React Native: omitted — no deterministic version available

Changes

  • packages/core/supabase-js/src/lib/constants.ts: renamed envruntime, added JS_RUNTIME_VERSION extraction for Node and Deno
  • packages/core/supabase-js/test/unit/constants.test.ts: updated all assertions; added Deno-with-version test and negative runtime-version assertions for web and React Native

Type of Change

  • New feature (feat)

Testing

  • Unit tests added/updated
  • All tests pass locally — the jest-runtime@30.4.2 / clearMocksOnScope error is pre-existing and unrelated to this change (reproduced on master before any edits)

Checklist

  • Code formatted
  • TypeScript type-check passes (tsc --noEmit)
  • Uses conventional commits

🤖 Generated with Claude Code

…ient-Info

Builds on #2359: renames the structured metadata key from `env` to
`runtime` and adds a `runtime-version` field where the version can be
deterministically extracted:

- Node.js: process.version (leading `v` stripped)
- Deno: Deno.version.deno
- Web / React Native: no version appended

Before: supabase-js/2.x.x; env=node
After:  supabase-js/2.x.x; runtime=node; runtime-version=22.13.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@grdsdev grdsdev requested a review from a team as a code owner June 1, 2026 10:20
@github-actions github-actions Bot added the supabase-js Related to the supabase-js library. label Jun 1, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2412

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2412

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2412

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2412

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2412

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2412

commit: 3c8cd48

@mandarini mandarini merged commit 745605b into feat/x-client-info Jun 1, 2026
45 of 58 checks passed
@mandarini mandarini deleted the claude/strange-germain-48c9aa branch June 1, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

supabase-js Related to the supabase-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants