@supabase/postgrest-js 2.104.0-canary.1 → 2.104.0

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/postgrest-js",
3
- "version": "2.104.0-canary.1",
3
+ "version": "2.104.0",
4
4
  "description": "Isomorphic PostgREST client",
5
5
  "keywords": [
6
6
  "postgrest",
@@ -92,25 +92,23 @@ export default abstract class PostgrestBuilder<
92
92
  /**
93
93
  * Creates a builder configured for a specific PostgREST request.
94
94
  *
95
- * @example
95
+ * @example Using supabase-js (recommended)
96
96
  * ```ts
97
- * import { PostgrestQueryBuilder } from '@supabase/postgrest-js'
97
+ * import { createClient } from '@supabase/supabase-js'
98
98
  *
99
- * const builder = new PostgrestQueryBuilder(
100
- * new URL('https://xyzcompany.supabase.co/rest/v1/users'),
101
- * { headers: new Headers({ apikey: 'public-anon-key' }) }
102
- * )
99
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')
100
+ * const { data, error } = await supabase.from('users').select('*')
103
101
  * ```
104
102
  *
105
103
  * @category Database
106
104
  *
107
- * @example Creating a Postgrest query builder
105
+ * @example Standalone import for bundle-sensitive environments
108
106
  * ```ts
109
107
  * import { PostgrestQueryBuilder } from '@supabase/postgrest-js'
110
108
  *
111
109
  * const builder = new PostgrestQueryBuilder(
112
110
  * new URL('https://xyzcompany.supabase.co/rest/v1/users'),
113
- * { headers: new Headers({ apikey: 'public-anon-key' }) }
111
+ * { headers: new Headers({ apikey: 'publishable-or-anon-key' }) }
114
112
  * )
115
113
  * ```
116
114
  */
@@ -58,15 +58,12 @@ export default class PostgrestClient<
58
58
  * When enabled, idempotent requests (GET, HEAD, OPTIONS) that fail with network
59
59
  * errors or HTTP 503/520 responses will be automatically retried up to 3 times
60
60
  * with exponential backoff (1s, 2s, 4s). Defaults to `true`.
61
- * @example
61
+ * @example Using supabase-js (recommended)
62
62
  * ```ts
63
- * import { PostgrestClient } from '@supabase/postgrest-js'
63
+ * import { createClient } from '@supabase/supabase-js'
64
64
  *
65
- * const postgrest = new PostgrestClient('https://xyzcompany.supabase.co/rest/v1', {
66
- * headers: { apikey: 'public-anon-key' },
67
- * schema: 'public',
68
- * timeout: 30000, // 30 second timeout
69
- * })
65
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')
66
+ * const { data, error } = await supabase.from('profiles').select('*')
70
67
  * ```
71
68
  *
72
69
  * @category Database
@@ -75,25 +72,14 @@ export default class PostgrestClient<
75
72
  * - A `timeout` option (in milliseconds) can be set to automatically abort requests that take too long.
76
73
  * - A `urlLengthLimit` option (default: 8000) can be set to control when URL length warnings are included in error messages for aborted requests.
77
74
  *
78
- * @example Creating a Postgrest client
79
- * ```ts
80
- * import { PostgrestClient } from '@supabase/postgrest-js'
81
- *
82
- * const postgrest = new PostgrestClient('https://xyzcompany.supabase.co/rest/v1', {
83
- * headers: { apikey: 'public-anon-key' },
84
- * schema: 'public',
85
- * })
86
- * ```
87
- *
88
- * @example With timeout
75
+ * @example Standalone import for bundle-sensitive environments
89
76
  * ```ts
90
77
  * import { PostgrestClient } from '@supabase/postgrest-js'
91
78
  *
92
79
  * const postgrest = new PostgrestClient('https://xyzcompany.supabase.co/rest/v1', {
93
- * headers: { apikey: 'public-anon-key' },
80
+ * headers: { apikey: 'publishable-or-anon-key' },
94
81
  * schema: 'public',
95
82
  * timeout: 30000, // 30 second timeout
96
- * retry: false, // Disable automatic retries
97
83
  * })
98
84
  * ```
99
85
  */
@@ -44,13 +44,21 @@ export default class PostgrestQueryBuilder<
44
44
  * @param options.urlLengthLimit - Maximum URL length before warning
45
45
  * @param options.retry - Enable automatic retries for transient errors (default: true)
46
46
  *
47
- * @example Creating a Postgrest query builder
47
+ * @example Using supabase-js (recommended)
48
+ * ```ts
49
+ * import { createClient } from '@supabase/supabase-js'
50
+ *
51
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'publishable-or-anon-key')
52
+ * const { data, error } = await supabase.from('users').select('*')
53
+ * ```
54
+ *
55
+ * @example Standalone import for bundle-sensitive environments
48
56
  * ```ts
49
57
  * import { PostgrestQueryBuilder } from '@supabase/postgrest-js'
50
58
  *
51
59
  * const query = new PostgrestQueryBuilder(
52
60
  * new URL('https://xyzcompany.supabase.co/rest/v1/users'),
53
- * { headers: { apikey: 'public-anon-key' }, retry: true }
61
+ * { headers: { apikey: 'publishable-or-anon-key' }, retry: true }
54
62
  * )
55
63
  * ```
56
64
  */
package/src/version.ts CHANGED
@@ -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.104.0-canary.1'
7
+ export const version = '2.104.0'