@supabase/supabase-js 2.93.1 → 2.93.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/supabase-js",
3
- "version": "2.93.1",
3
+ "version": "2.93.2",
4
4
  "description": "Isomorphic Javascript SDK for Supabase",
5
5
  "keywords": [
6
6
  "javascript",
@@ -70,11 +70,11 @@
70
70
  "update:test-deps:bun": "cd test/integration/bun && bun install"
71
71
  },
72
72
  "dependencies": {
73
- "@supabase/auth-js": "2.93.1",
74
- "@supabase/functions-js": "2.93.1",
75
- "@supabase/postgrest-js": "2.93.1",
76
- "@supabase/realtime-js": "2.93.1",
77
- "@supabase/storage-js": "2.93.1"
73
+ "@supabase/auth-js": "2.93.2",
74
+ "@supabase/functions-js": "2.93.2",
75
+ "@supabase/postgrest-js": "2.93.2",
76
+ "@supabase/realtime-js": "2.93.2",
77
+ "@supabase/storage-js": "2.93.2"
78
78
  },
79
79
  "devDependencies": {
80
80
  "jsr": "^0.13.5",
@@ -15,156 +15,7 @@ if (typeof Deno !== 'undefined') {
15
15
  JS_ENV = 'node'
16
16
  }
17
17
 
18
- export function getClientPlatform(): string | null {
19
- // Use dynamic property access to avoid bundler static analysis warnings
20
- const _process = (globalThis as any)['process']
21
- if (_process && _process['platform']) {
22
- const platform = _process['platform']
23
- if (platform === 'darwin') return 'macOS'
24
- if (platform === 'win32') return 'Windows'
25
- if (platform === 'linux') return 'Linux'
26
- if (platform === 'android') return 'Android'
27
- }
28
-
29
- // @ts-ignore
30
- if (typeof navigator !== 'undefined') {
31
- // Modern User-Agent Client Hints API
32
- // @ts-ignore
33
- if (navigator.userAgentData && navigator.userAgentData.platform) {
34
- // @ts-ignore
35
- const platform = navigator.userAgentData.platform
36
- if (platform === 'macOS') return 'macOS'
37
- if (platform === 'Windows') return 'Windows'
38
- if (platform === 'Linux') return 'Linux'
39
- if (platform === 'Android') return 'Android'
40
- if (platform === 'iOS') return 'iOS'
41
- }
42
- }
43
-
44
- return null
45
- }
46
-
47
- export function getClientPlatformVersion(): string | null {
48
- // Node.js / Bun environment
49
- // Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings
50
- // (pattern from realtime-js websocket-factory.ts)
51
- const _process = (globalThis as any)['process']
52
- if (_process) {
53
- const processVersions = _process['versions']
54
- if (processVersions && processVersions['node']) {
55
- // Check if we're in a true server-side Node.js environment (not a browser bundle)
56
- // @ts-ignore
57
- if (typeof window === 'undefined') {
58
- try {
59
- // Use bracket notation to avoid bundler static analysis (same pattern as process)
60
- const _require = (globalThis as any)['require']
61
- if (_require) {
62
- const os = _require('os')
63
- return os.release()
64
- }
65
- } catch (error) {
66
- return null
67
- }
68
- }
69
- }
70
- }
71
-
72
- // Deno environment
73
- // @ts-ignore
74
- if (typeof Deno !== 'undefined' && Deno.osRelease) {
75
- try {
76
- // @ts-ignore
77
- return Deno.osRelease()
78
- } catch (error) {
79
- return null
80
- }
81
- }
82
-
83
- // Browser environment
84
- // @ts-ignore
85
- if (typeof navigator !== 'undefined') {
86
- // Modern User-Agent Client Hints API
87
- // @ts-ignore
88
- if (navigator.userAgentData && navigator.userAgentData.platformVersion) {
89
- // @ts-ignore
90
- return navigator.userAgentData.platformVersion
91
- }
92
- }
93
-
94
- return null
95
- }
96
-
97
- export function getClientRuntime(): string | null {
98
- // @ts-ignore
99
- if (typeof Deno !== 'undefined') {
100
- return 'deno'
101
- }
102
- // @ts-ignore
103
- if (typeof Bun !== 'undefined') {
104
- return 'bun'
105
- }
106
- // Use dynamic property access to avoid bundler static analysis warnings
107
- const _process = (globalThis as any)['process']
108
- if (_process) {
109
- const processVersions = _process['versions']
110
- if (processVersions && processVersions['node']) {
111
- return 'node'
112
- }
113
- }
114
- return null
115
- }
116
-
117
- export function getClientRuntimeVersion(): string | null {
118
- // @ts-ignore
119
- if (typeof Deno !== 'undefined' && Deno.version) {
120
- // @ts-ignore
121
- return Deno.version.deno
122
- }
123
- // @ts-ignore
124
- if (typeof Bun !== 'undefined' && Bun.version) {
125
- // @ts-ignore
126
- return Bun.version
127
- }
128
- // Use dynamic property access to avoid bundler static analysis warnings
129
- const _process = (globalThis as any)['process']
130
- if (_process) {
131
- const processVersions = _process['versions']
132
- if (processVersions && processVersions['node']) {
133
- return processVersions['node']
134
- }
135
- }
136
- return null
137
- }
138
-
139
- function buildHeaders() {
140
- const headers: Record<string, string> = {
141
- 'X-Client-Info': `supabase-js-${JS_ENV}/${version}`,
142
- }
143
-
144
- const platform = getClientPlatform()
145
- if (platform) {
146
- headers['X-Supabase-Client-Platform'] = platform
147
- }
148
-
149
- const platformVersion = getClientPlatformVersion()
150
- if (platformVersion) {
151
- headers['X-Supabase-Client-Platform-Version'] = platformVersion
152
- }
153
-
154
- const runtime = getClientRuntime()
155
- if (runtime) {
156
- headers['X-Supabase-Client-Runtime'] = runtime
157
- }
158
-
159
- const runtimeVersion = getClientRuntimeVersion()
160
- if (runtimeVersion) {
161
- headers['X-Supabase-Client-Runtime-Version'] = runtimeVersion
162
- }
163
-
164
- return headers
165
- }
166
-
167
- export const DEFAULT_HEADERS = buildHeaders()
18
+ export const DEFAULT_HEADERS = { 'X-Client-Info': `supabase-js-${JS_ENV}/${version}` }
168
19
 
169
20
  export const DEFAULT_GLOBAL_OPTIONS = {
170
21
  headers: DEFAULT_HEADERS,
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '2.93.1'
7
+ export const version = '2.93.2'